[RFC 0/5] add new port affinity item and affinity in Tx queue API
Jiawei Wang
jiaweiw at nvidia.com
Wed Dec 21 11:29:29 CET 2022
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(-)
--
2.18.1
More information about the dev
mailing list