Skip to content

Commit 23fcc7d

Browse files
mikijoyjgunthorpe
authored andcommitted
RDMA/mlx5: Fix flow destination setting for RDMA TX flow table
For RDMA TX flow table, set destination type to be 'port' and prevent creation of flows with TIR destination. As RDMA TX is an egress flow table the rules on this flow table should not forward traffic back to the NIC and should set the destination to be the port. Without the setting of this destination type flow rules on the RDMA TX flow tables are not created as FW invokes a syndrome for undefined destination for the rule. Fixes: 24670b1 ("net/mlx5: Add support for RDMA TX steering") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michael Guralnik <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 76251e1 commit 23fcc7d

File tree

1 file changed

+4
-2
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+4
-2
lines changed

drivers/infiniband/hw/mlx5/fs.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,12 +1865,14 @@ static int get_dests(struct uverbs_attr_bundle *attrs,
18651865
else
18661866
*dest_id = mqp->raw_packet_qp.rq.tirn;
18671867
*dest_type = MLX5_FLOW_DESTINATION_TYPE_TIR;
1868-
} else if (fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_EGRESS) {
1868+
} else if (fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_EGRESS ||
1869+
fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_RDMA_TX) {
18691870
*dest_type = MLX5_FLOW_DESTINATION_TYPE_PORT;
18701871
}
18711872

18721873
if (*dest_type == MLX5_FLOW_DESTINATION_TYPE_TIR &&
1873-
fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_EGRESS)
1874+
(fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_EGRESS ||
1875+
fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_RDMA_TX))
18741876
return -EINVAL;
18751877

18761878
return 0;

0 commit comments

Comments
 (0)