mbox series

[RFC,0/2] support VXLAN header last 8-bits matching

Message ID 20210531101941.60916-1-rongweil@nvidia.com (mailing list archive)
Headers show
Series support VXLAN header last 8-bits matching | expand

Message

Rongwei Liu May 31, 2021, 10:19 a.m. UTC
This update adds support for the VXLAN last 8-bits matching when
creating steering rules. At the PCIe probe stage, we create a
dummy VXLAN matcher using misc5 to check rdma-core library's
capability.

The logic is, group 0 depends on HCA_CAP to enable misc or misc5
for VXLAN matching while group non zero depends on the rdma-core
capability.

Add a new testpmd pattern field 'last_rsvd' that supports the
last 8-bits matching of VXLAN header.

The examples for the "last_rsvd" pattern field are as below:

1. ...pattern eth / ipv4 / udp / vxlan last_rsvd is 0x80 / end ...
This flow will exactly match the last 8-bits to be 0x80.

2. ...pattern eth / ipv4 / udp / vxlan last_rsvd spec 0x80
vxlan mask 0x80 / end ...
This flow will only match the MSB of the last 8-bits to be 1.

rongwei liu (2):
  drivers: add VXLAN header the last 8-bits matching support
  app/testpmd: support VXLAN last 8-bits field matching

 app/test-pmd/cmdline_flow.c                 |   9 ++
 app/test-pmd/util.c                         |   5 +-
 doc/guides/nics/mlx5.rst                    |  11 +-
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |   1 +
 drivers/common/mlx5/mlx5_devx_cmds.c        |   3 +
 drivers/common/mlx5/mlx5_devx_cmds.h        |   6 +
 drivers/common/mlx5/mlx5_prm.h              |  41 +++++-
 drivers/net/mlx5/linux/mlx5_os.c            |  77 ++++++++++
 drivers/net/mlx5/mlx5.h                     |   2 +
 drivers/net/mlx5/mlx5_flow.c                |  26 +++-
 drivers/net/mlx5/mlx5_flow.h                |   4 +-
 drivers/net/mlx5/mlx5_flow_dv.c             | 152 ++++++++++++++------
 drivers/net/mlx5/mlx5_flow_verbs.c          |   3 +-
 drivers/vdpa/mlx5/mlx5_vdpa_steer.c         |   6 +-
 14 files changed, 283 insertions(+), 63 deletions(-)