Skip to contentSkip to conversation

RDMA/mlx5: Fix flow destination setting for RDMA TX flow table

PATCH Applied Leon Romanovsky 2 participants 2 messages Aug 3, 2020 – Aug 6, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/mlx5: Fix flow destination setting for RDMA TX flow table

From: Michael Guralnik <[email protected]>

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 24670b1a3166 ("net/mlx5: Add support for RDMA TX steering")
---
 drivers/infiniband/hw/mlx5/fs.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/infiniband/hw/mlx5/fs.c +4 -2
index fbbb1adac273..d75f461eba50 100644
@@ -1866,12 +1866,14 @@ static int get_dests(struct uverbs_attr_bundle *attrs,
 		else
 			*dest_id = mqp->raw_packet_qp.rq.tirn;
 		*dest_type = MLX5_FLOW_DESTINATION_TYPE_TIR;
-	} else if (fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_EGRESS) {
+	} else if (fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_EGRESS ||
+		   fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_RDMA_TX) {
 		*dest_type = MLX5_FLOW_DESTINATION_TYPE_PORT;
 	}
 
 	if (*dest_type == MLX5_FLOW_DESTINATION_TYPE_TIR &&
-	    fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_EGRESS)
+	    (fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_EGRESS ||
+	     fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_RDMA_TX))
 		return -EINVAL;
 
 	return 0;

--
2.26.2

maintainer Applied
#1 lore raw
Quoted 13 lines · Leon Romanovsky

From: Michael Guralnik <[email protected]>

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.

Quoted 6 lines
Fixes 24670b1a3166 ("net/mlx5: Add support for RDMA TX steering")
---
 drivers/infiniband/hw/mlx5/fs.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Applied to for-next for this merge window, thanks

Jason