Skip to content

Mellanox ConnectX-4/Connect-IB sniffer support

Leon Romanovsky linux-rdma 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7net/mlx5: Introduce sniffer steering hardware capabilitiesinclude/linux/mlx5/device.h include/linux/mlx5/mlx5_ifc.h+15 -10 replies
2/7net/mlx5: Add sniffer namespacesdrivers/net/ethernet/mellanox/mlx5/core/fs_core.c drivers/net/ethernet/mellanox/mlx5/core/fs_core.h include/linux/mlx5/fs.h+64 -00 replies
3/7IB/mlx5: Fix steering resource leakdrivers/infiniband/hw/mlx5/main.c+1 -00 replies
4/7IB/mlx5: Save flow table priority handler instead of indexdrivers/infiniband/hw/mlx5/main.c drivers/infiniband/hw/mlx5/mlx5_ib.h+3 -30 replies
5/7IB/mlx5: Fix coverity warningdrivers/infiniband/hw/mlx5/main.c+4 -40 replies
6/7IB/mlx5: Increase flow table reference count in create ruledrivers/infiniband/hw/mlx5/main.c+3 -10 replies
7/7IB/mlx5: Add sniffer support to steeringdrivers/infiniband/hw/mlx5/main.c drivers/infiniband/hw/mlx5/mlx5_ib.h+74 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH rdma-next 0/7] Mellanox ConnectX-4/Connect-IB sniffer support

This patch set adds sniffer support to mlx5 flow steering. A sniffer rule could be created via ib_create_flow verb with IB_FLOW_ATTR_SNIFFER type. When the user adds a sniffer rule, its destination QP expects to receive all incoming and outgoing packets from the port. Only raw packet QPs are supported as destinations.

In ConnectX-4 based adapters, each incoming packet is duplicated and sent to the sniffer RX flow table in addition to the NIC RX root flow table. Each out going packet is duplicated and sent to the sniffer TX flow table in addition to the wire.

In order to sniff all the traffic, we add a single "*" rule both to the RX and TX sniffer flow tables. "*" rule is used to receive all the traffic, this rule don't contain any criteria.

Available in the "topic/sniffer-verb" topic branch of this git repo:
git://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git

Or for browsing:
https://git.kernel.org/cgit/linux/kernel/git/leon/linux-rdma.git/log/?h=topic/sniffer-verb

Thanks,
Maor & Leon

Maor Gottlieb (7):
net/mlx5: Introduce sniffer steering hardware capabilities net/mlx5: Add sniffer namespaces
IB/mlx5: Fix steering resource leak
IB/mlx5: Save flow table priority handler instead of index IB/mlx5: Fix coverity warning
IB/mlx5: Increase flow table reference count in create rule IB/mlx5: Add sniffer support to steering

 drivers/infiniband/hw/mlx5/main.c                 | 91 ++++++++++++++++++++---
 drivers/infiniband/hw/mlx5/mlx5_ib.h              |  4 +-
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 58 +++++++++++++++
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.h |  4 +
 include/linux/mlx5/device.h                       | 12 +++
 include/linux/mlx5/fs.h                           |  2 +
 include/linux/mlx5/mlx5_ifc.h                     |  4 +-
 7 files changed, 164 insertions(+), 11 deletions(-)

--
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html