[RFC 1/5] ethdev: add port affinity match item

Ori Kam orika at nvidia.com
Wed Jan 11 17:41:12 CET 2023


Hi Jiawei,

> -----Original Message-----
> From: Jiawei(Jonny) Wang <jiaweiw at nvidia.com>
> Sent: Wednesday, 21 December 2022 12:30
> 
> 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.
> 
> 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.
> 
> This patch also adds the testpmd command line to match the new item:
> 	flow create 0 ingress group 0 pattern port_affinity affinity is 1 /
> 	end actions queue index 0 / end
> 
> The above command means that creates a flow on a single DPDK port and
> matches the packet from the first physical port (assumes the affinity 1
> stands for the first port) and redirects these packets into RxQ 0.
> 
> Signed-off-by: Jiawei Wang <jiaweiw at nvidia.com>
> ---

Acked-by: Ori Kam <orika at nvidia.com>
Best,
Ori


More information about the dev mailing list