[PATCH v5 1/2] ethdev: introduce the Tx map API for aggregated ports
Jiawei(Jonny) Wang
jiaweiw at nvidia.com
Wed Feb 15 12:41:50 CET 2023
Hi Ori, Thomas and Ferruh,
Could you please help to review it?
Thanks.
> -----Original Message-----
> From: Jiawei Wang <jiaweiw at nvidia.com>
> Sent: Tuesday, February 14, 2023 11:49 PM
> To: Slava Ovsiienko <viacheslavo at nvidia.com>; Ori Kam <orika at nvidia.com>;
> NBU-Contact-Thomas Monjalon (EXTERNAL) <thomas at monjalon.net>;
> andrew.rybchenko at oktetlabs.ru; Aman Singh <aman.deep.singh at intel.com>;
> Yuying Zhang <yuying.zhang at intel.com>; Ferruh Yigit <ferruh.yigit at amd.com>
> Cc: dev at dpdk.org; Raslan Darawsheh <rasland at nvidia.com>
> Subject: [PATCH v5 1/2] ethdev: introduce the Tx map API for aggregated ports
>
> When multiple ports are aggregated into a single DPDK port,
> (example: Linux bonding, DPDK bonding, failsafe, etc.), we want to know which
> port use for Tx via a queue.
>
> This patch introduces the new ethdev API rte_eth_dev_map_aggr_tx_affinity(),
> it's used to map a Tx queue with an aggregated port of the DPDK port
> (specified with port_id), The affinity is the number of the aggregated port.
> Value 0 means no affinity and traffic could be routed to any aggregated port,
> this is the default current behavior.
>
> The maximum number of affinity is given by rte_eth_dev_count_aggr_ports().
>
> Add the trace point for ethdev rte_eth_dev_count_aggr_ports() and
> rte_eth_dev_map_aggr_tx_affinity() functions.
>
> Add the testpmd command line:
> testpmd> port config (port_id) txq (queue_id) affinity (value)
>
> For example, there're two physical ports connected to a single DPDK port (port
> id 0), and affinity 1 stood for the first physical port and affinity 2 stood for the
> second physical port.
> Use the below commands to config tx phy affinity for per Tx Queue:
> port config 0 txq 0 affinity 1
> port config 0 txq 1 affinity 1
> port config 0 txq 2 affinity 2
> port config 0 txq 3 affinity 2
>
> These commands config the Tx Queue index 0 and Tx Queue index 1 with phy
> affinity 1, uses Tx Queue 0 or Tx Queue 1 send packets, these packets will be
> sent from the first physical port, and similar with the second physical port if
> sending packets with Tx Queue 2 or Tx Queue 3.
>
> Signed-off-by: Jiawei Wang <jiaweiw at nvidia.com>
> ---
> app/test-pmd/cmdline.c | 96 +++++++++++++++++++++
> doc/guides/rel_notes/release_23_03.rst | 7 ++
> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 14 +++
> lib/ethdev/ethdev_driver.h | 39 +++++++++
> lib/ethdev/ethdev_trace.h | 17 ++++
> lib/ethdev/ethdev_trace_points.c | 6 ++
> lib/ethdev/rte_ethdev.c | 49 +++++++++++
> lib/ethdev/rte_ethdev.h | 46 ++++++++++
> lib/ethdev/version.map | 2 +
> 9 files changed, 276 insertions(+)
>
snip
> 2.18.1
More information about the dev
mailing list