net/mlx5: Refactor imm_inval_pkey field in cqe struct
authorRaed Salem <raeds@mellanox.com>
Fri, 24 Apr 2020 19:45:05 +0000 (12:45 -0700)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 28 Apr 2020 19:45:15 +0000 (12:45 -0700)
commit244faedfd4d8e8c8e9f3c628d29bb74196b49743
tree9846736bab211981c70a1dc1e4e0fb01781b622f
parentdff8e2d15283dd92582ddeec25ca86e4cf2618c7
net/mlx5: Refactor imm_inval_pkey field in cqe struct

The imm_inval_pkey field can hold four different types of data,
depends on the usage, the data could be one of the below:
- Immediate field of the received message
- Invalidate rkey
- Pkey of the packet
- Flow table metadata

Current implementation doesn't reflect the intended usage of the
field at usage time.

Reflect the different types by replace this field with a union,
modify code where this field is used to reflect its intended
usage.

Signed-off-by: Raed Salem <raeds@mellanox.com>
Reviewed-by: Huy Nguyen <huyn@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/infiniband/hw/mlx5/cq.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
include/linux/mlx5/device.h