RDMA/mlx5: Enable sniffer when device is in switchdev mode
Subsystems (2)
PATCH 1/1 RDMA/mlx5: Enable sniffer when device is in switchdev mode
From: Maor Gottlieb <[email protected]>
In order to allow sniffer when the RDMA device is in switchdev mode, we don't need to set the source port when creating the sniffer rule.
Signed-off-by Maor Gottlieb <[email protected]>
Reviewed-by Mark Bloch <[email protected]>
Signed-off-by Leon Romanovsky <[email protected]>
---
Sorry for being late and sending this in merge window, this patch is small enough to be taken anyway. It was in my queue for a weeks already, simply missed it.
Thanks
--- drivers/infiniband/hw/mlx5/fs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/fs.c +2 -1
@@ -954,7 +954,7 @@ static struct mlx5_ib_flow_handler *_create_flow_rule(struct mlx5_ib_dev *dev,if (!flow_is_multicast_only (flow_attr))set_underlay_qp (dev, spec, underlay_qpn); -if (dev->is_rep) { +if (dev->is_rep && flow_attr->type !=IB_FLOW_ATTR_SNIFFER ) {struct mlx5_eswitch_rep *rep; rep = dev->port[flow_attr->port -1 ].rep;
@@ -1116,6 +1116,7 @@ static struct mlx5_ib_flow_handler *create_sniffer_rule(struct mlx5_ib_dev *dev,int err;static const struct ib_flow_attr flow_attr = { .num_of_specs =0 , + .type =IB_FLOW_ATTR_SNIFFER , .size =sizeof (flow_attr) };
--
2.26.2
Quoted 11 lines · Leon Romanovsky
From: Maor Gottlieb <[email protected]>
In order to allow sniffer when the RDMA device is in switchdev mode, we don't need to set the source port when creating the sniffer rule.
Signed-off-by Maor Gottlieb <[email protected]>Reviewed-by Mark Bloch <[email protected]>Signed-off-by Leon Romanovsky <[email protected]>--- drivers/infiniband/hw/mlx5/fs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to for-next, thanks
Jason