common/mlx5: fix RSS key copy to TIR context
authorDekel Peled <dekelp@mellanox.com>
Sun, 29 Mar 2020 09:18:27 +0000 (12:18 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:05 +0000 (13:57 +0200)
commita4e6ea97a5212f5b59cc65a1293ad23e67ade8fc
tree72bd684923c17249613de62df71892530a60e0f4
parent40b9e7f65fe1ef9f65f80c59e11b0af3d362a80d
common/mlx5: fix RSS key copy to TIR context

In function mlx5_devx_cmd_create_tir(), the 40 bytes of RSS key are
copied in 10 iterations, 4 bytes each time using the MLX5_SET macro.
As result the RSS key is copied into TIR context in swapped byte order.
This patch fixes the issue, using memcpy() to copy the RSS key as is.
The struct member mlx5_devx_tir_attr.rx_hash_toeplitz_key is updated
to byte array type.

Fixes: c3aea272eed8 ("net/mlx5: create advanced Rx object via DevX")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
drivers/common/mlx5/mlx5_devx_cmds.c
drivers/common/mlx5/mlx5_devx_cmds.h
drivers/net/mlx5/mlx5_rxq.c
drivers/vdpa/mlx5/mlx5_vdpa_steer.c