Skip to content

Support mlx5 flow steering with RAW data

Leon Romanovsky linux-rdma netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 10 repliesIn review
  2. v18 patches 8 repliesSuperseded

Changes in v2 from the cover letter

* Fix matcher to use the correct size.
* Rephrase commit log of the first patch.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8net/mlx5: Add forward compatible support for the FTE match datadrivers/net/ethernet/mellanox/mlx5/core/fs_core.c+1 -761 reply
2/8net/mlx5: Add support for flow table destination numberdrivers/net/ethernet/mellanox/mlx5/core/diag/fs_tracepoint.c drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +2 more+23 -101 reply
3/8IB/mlx5: Introduce flow steering matcher objectdrivers/infiniband/core/uverbs_std_types_flow_action.c drivers/infiniband/hw/mlx5/Makefile drivers/infiniband/hw/mlx5/flow.c +3 more+184 -30 replies
4/8IB: Consider ib_flow creation by the KABI infrastructuredrivers/infiniband/core/uverbs_cmd.c drivers/infiniband/core/uverbs_std_types.c include/rdma/ib_verbs.h+8 -20 replies
5/8IB/mlx5: Introduce vendor create and destroy flow methodsdrivers/infiniband/hw/mlx5/devx.c drivers/infiniband/hw/mlx5/flow.c drivers/infiniband/hw/mlx5/main.c +4 more+202 -120 replies
6/8IB/mlx5: Support adding flow steering rule by raw datadrivers/infiniband/hw/mlx5/main.c drivers/infiniband/hw/mlx5/mlx5_ib.h+201 -170 replies
7/8IB/mlx5: Add support for a flow table destinationdrivers/infiniband/hw/mlx5/main.c+8 -50 replies
8/8IB/mlx5: Expose vendor flow treesdrivers/infiniband/hw/mlx5/flow.c drivers/infiniband/hw/mlx5/main.c drivers/infiniband/hw/mlx5/mlx5_ib.h+15 -10 replies

Reviews trailers per patch

2 of 8 patches have a Reviewed-by or Acked-by.

PatchSaeed Mahameed
1/8A-b
2/8A-b
3/8
4/8
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH rdma-next v2 0/8] Support mlx5 flow steering with RAW data

From: Leon Romanovsky <[email protected]>

Changelog:
v1->v2:
* Fix matcher to use the correct size.
* Rephrase commit log of the first patch.
v0->v1:
* Fixed ADD_UVERBS_ATTRIBUTES_SIMPLE macro to pass the real address. �* Replaced UA_ALLOC_AND_COPY to regular copy_from
* Added UVERBS_ATTR_NO_DATA new macro for cleaner code.
* Used ib_dev from uobj when it exists.
* ib_is_destroy_retryable was replaced by ib_destroy_usecnt

-------------------------------------------------------------------------

Quoted 1 line

From Yishai:

This series introduces vendor create and destroy flow methods on the uverbs flow object by using the KABI infra-structure.

It's done in a way that enables the driver to get its specific device attributes in a raw data to match its underlay specification while still using the generic ib_flow object for cleanup and code sharing.

In addition, a specific mlx5 matcher object and its create/destroy methods were introduced. This object matches the underlay flow steering mask specification and is used as part of mlx5 create flow input data.

This series supports IB_QP/TIR as its flow steering destination as applicable today via the ib_create_flow API, however, it adds also an option to work with DEVX object which its destination can be both TIR and flow table.

Few changes were done in the mlx5 core layer to support forward compatible for the device specification raw data and to support flow table when the DEVX destination is used.

As part of this series the default IB destroy handler (i.e. uverbs_destroy_def_handler()) was exposed from IB core to be used by the drivers and existing code was refactored to use it.

Thanks

Yishai Hadas (8):
net/mlx5: Add forward compatible support for the FTE match data net/mlx5: Add support for flow table destination number IB/mlx5: Introduce flow steering matcher object
IB: Consider ib_flow creation by the KABI infrastructure IB/mlx5: Introduce vendor create and destroy flow methods IB/mlx5: Support adding flow steering rule by raw data IB/mlx5: Add support for a flow table destination IB/mlx5: Expose vendor flow trees

 drivers/infiniband/core/uverbs_cmd.c               |   4 +
 drivers/infiniband/core/uverbs_std_types.c         |   5 +-
 .../infiniband/core/uverbs_std_types_flow_action.c |   3 +-
 drivers/infiniband/hw/mlx5/Makefile                |   1 +
 drivers/infiniband/hw/mlx5/devx.c                  |  22 ++
 drivers/infiniband/hw/mlx5/flow.c                  | 254 +++++++++++++++++++++
 drivers/infiniband/hw/mlx5/main.c                  | 230 +++++++++++++++++--
 drivers/infiniband/hw/mlx5/mlx5_ib.h               |  31 +++
 .../mellanox/mlx5/core/diag/fs_tracepoint.c        |   3 +
 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c   |  24 +-
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c  |  81 +------
 include/linux/mlx5/fs.h                            |   1 +
 include/linux/mlx5/mlx5_ifc.h                      |   1 +
 include/rdma/ib_verbs.h                            |  15 ++
 include/rdma/uverbs_ioctl.h                        |   2 +
 include/rdma/uverbs_named_ioctl.h                  |  29 ++-
 include/uapi/rdma/mlx5_user_ioctl_cmds.h           |  50 +++-
 17 files changed, 636 insertions(+), 120 deletions(-)
 create mode 100644 drivers/infiniband/hw/mlx5/flow.c