All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-rc] RDMA/mlx5: Fix flow destination setting for RDMA TX flow table
@ 2020-08-03  5:58 Leon Romanovsky
  2020-08-06  0:21 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Leon Romanovsky @ 2020-08-03  5:58 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Michael Guralnik, linux-rdma, Maor Gottlieb, Mark Bloch

From: Michael Guralnik <michaelgur@mellanox.com>

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")
Signed-off-by: Michael Guralnik <michaelgur@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 drivers/infiniband/hw/mlx5/fs.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/mlx5/fs.c b/drivers/infiniband/hw/mlx5/fs.c
index fbbb1adac273..d75f461eba50 100644
--- a/drivers/infiniband/hw/mlx5/fs.c
+++ b/drivers/infiniband/hw/mlx5/fs.c
@@ -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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH rdma-rc] RDMA/mlx5: Fix flow destination setting for RDMA TX flow table
  2020-08-03  5:58 [PATCH rdma-rc] RDMA/mlx5: Fix flow destination setting for RDMA TX flow table Leon Romanovsky
@ 2020-08-06  0:21 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2020-08-06  0:21 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Doug Ledford, Michael Guralnik, linux-rdma, Maor Gottlieb, Mark Bloch

On Mon, Aug 03, 2020 at 08:58:49AM +0300, Leon Romanovsky wrote:
> From: Michael Guralnik <michaelgur@mellanox.com>
> 
> 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")
> Signed-off-by: Michael Guralnik <michaelgur@mellanox.com>
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> ---
>  drivers/infiniband/hw/mlx5/fs.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Applied to for-next for this merge window, thanks

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-06  0:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-03  5:58 [PATCH rdma-rc] RDMA/mlx5: Fix flow destination setting for RDMA TX flow table Leon Romanovsky
2020-08-06  0:21 ` Jason Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.