]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/mlx5: Add support for RDMA TX FT headers modifying
authorMichael Guralnik <michaelgur@mellanox.com>
Fri, 15 May 2020 22:16:54 +0000 (15:16 -0700)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 18 May 2020 16:21:46 +0000 (09:21 -0700)
Support adding header modifying actions to the RDMA TX flow table.

Signed-off-by: Michael Guralnik <michaelgur@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/infiniband/hw/mlx5/flow.c
drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c

index 69cb7e6e8955c66c1f22dd73e10ed0f548ca4384..3a0601c2052c6d3430bc813499e2519321f35165 100644 (file)
@@ -404,7 +404,10 @@ static bool mlx5_ib_modify_header_supported(struct mlx5_ib_dev *dev)
 {
        return MLX5_CAP_FLOWTABLE_NIC_RX(dev->mdev,
                                         max_modify_header_actions) ||
-              MLX5_CAP_FLOWTABLE_NIC_TX(dev->mdev, max_modify_header_actions);
+              MLX5_CAP_FLOWTABLE_NIC_TX(dev->mdev,
+                                        max_modify_header_actions) ||
+              MLX5_CAP_FLOWTABLE_RDMA_TX(dev->mdev,
+                                        max_modify_header_actions);
 }
 
 static int UVERBS_HANDLER(MLX5_IB_METHOD_FLOW_ACTION_CREATE_MODIFY_HEADER)(
index 1a8e826ac86b95d9cf40331e7432cf8766b222aa..465a1076a4777e0786ecc735e931ebcfeb26642b 100644 (file)
@@ -781,6 +781,10 @@ static int mlx5_cmd_modify_header_alloc(struct mlx5_flow_root_namespace *ns,
                max_actions = MLX5_CAP_ESW_INGRESS_ACL(dev, max_modify_header_actions);
                table_type = FS_FT_ESW_INGRESS_ACL;
                break;
+       case MLX5_FLOW_NAMESPACE_RDMA_TX:
+               max_actions = MLX5_CAP_FLOWTABLE_RDMA_TX(dev, max_modify_header_actions);
+               table_type = FS_FT_RDMA_TX;
+               break;
        default:
                return -EOPNOTSUPP;
        }