]> Git Repo - linux.git/commitdiff
RDMA/mlx5: Fix flow destination setting for RDMA TX flow table
authorMichael Guralnik <[email protected]>
Mon, 3 Aug 2020 05:58:49 +0000 (08:58 +0300)
committerJason Gunthorpe <[email protected]>
Thu, 6 Aug 2020 00:09:39 +0000 (21:09 -0300)
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")
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]>
drivers/infiniband/hw/mlx5/fs.c

index 1a7e6226f11ae4b8cf98b9b0592fdfdaaeeeb742..e9cfb9a2ef41b397450fa678fd741899484ef56d 100644 (file)
@@ -1865,12 +1865,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;
This page took 0.062575 seconds and 4 git commands to generate.