Skip to content

RFC add new port affinity item and affinity in Tx queue API

Jiawei Wang dpdk-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5ethdev: add port affinity match itemapp/test-pmd/cmdline_flow.c doc/guides/prog_guide/rte_flow.rst doc/guides/rel_notes/release_22_03.rst +3 more+74 -05 replies
2/5ethdev: introduce the affinity field in Tx queue APIapp/test-pmd/cmdline.c devtools/libabigail.abignore doc/guides/rel_notes/release_22_03.rst +2 more+107 -05 replies
3/5drivers: add lag Rx port affinity in PRMdrivers/common/mlx5/mlx5_devx_cmds.c drivers/common/mlx5/mlx5_devx_cmds.h drivers/common/mlx5/mlx5_prm.h +2 more+15 -20 replies
4/5net/mlx5: add port affinity item supportdoc/guides/nics/features/mlx5.ini doc/guides/nics/mlx5.rst drivers/net/mlx5/linux/mlx5_os.c +4 more+119 -10 replies
5/5drivers: enhance the Tx queue affinitydrivers/common/mlx5/mlx5_prm.h drivers/net/mlx5/mlx5.c drivers/net/mlx5/mlx5_devx.c +2 more+42 -400 replies

Reviews trailers per patch

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

PatchOri Kam
1/5A-b
2/5A-b
3/5
4/5
5/5

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

Read the v1 thread

Cover letter [RFC 0/5] add new port affinity item and affinity in Tx queue API

For the multiple hardware ports connect to a single DPDK port (mhpsdp), currently there is no information to indicate the packet belongs to which hardware port.

This patch introduces a new port affinity item in rte flow API, and the port affinity value reflects the physical port affinity of the received packets.

The example of match the affinity item:
testpmd> flow create 0 ingress group 0 pattern port_affinity affinity is 1 / end actions queue index 0 / end

This patch adds the tx_affinity setting in Tx queue API, the affinity value reflects packets be sent to which hardware port.

The testpmd command format as below:
testpmd> port config (port_id) txq (queue_id) affinity (value)

While uses the port affinity as a matching item in the flow, and sets the same affinity on the tx queue, then the packet can be sent from the same hardware port with received.

Jiawei Wang (5):
ethdev: add port affinity match item
ethdev: introduce the affinity field in Tx queue API
drivers: add lag Rx port affinity in PRM net/mlx5: add port affinity item support
drivers: enhance the Tx queue affinity

 app/test-pmd/cmdline.c                      | 84 ++++++++++++++++++
 app/test-pmd/cmdline_flow.c                 | 29 +++++++
 devtools/libabigail.abignore                |  5 ++
 doc/guides/nics/features/mlx5.ini           |  1 +
 doc/guides/nics/mlx5.rst                    |  4 +-
 doc/guides/prog_guide/rte_flow.rst          |  7 ++
 doc/guides/rel_notes/release_22_03.rst      |  9 ++
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 17 ++++
 drivers/common/mlx5/mlx5_devx_cmds.c        |  3 +
 drivers/common/mlx5/mlx5_devx_cmds.h        |  1 +
 drivers/common/mlx5/mlx5_prm.h              | 15 ++--
 drivers/net/mlx5/linux/mlx5_os.c            |  6 ++
 drivers/net/mlx5/mlx5.c                     | 43 +++++-----
 drivers/net/mlx5/mlx5.h                     |  3 +
 drivers/net/mlx5/mlx5_devx.c                | 21 +++--
 drivers/net/mlx5/mlx5_flow.h                |  3 +
 drivers/net/mlx5/mlx5_flow_dv.c             | 95 +++++++++++++++++++++
 drivers/net/mlx5/mlx5_flow_hw.c             | 14 +++
 drivers/net/mlx5/mlx5_tx.h                  |  1 +
 drivers/net/mlx5/mlx5_txq.c                 |  9 ++
 lib/ethdev/rte_ethdev.h                     |  1 +
 lib/ethdev/rte_flow.c                       |  1 +
 lib/ethdev/rte_flow.h                       | 28 ++++++
 23 files changed, 357 insertions(+), 43 deletions(-)
Signature · 1 line
2.18.1