[PATCH] net/ring: Set mbuf->port for received packets
Morten Brørup
mb at smartsharesystems.com
Tue Jun 18 18:00:34 CEST 2024
> From: Sriram Yagnaraman [mailto:sriram.yagnaraman at ericsson.com]
>
> When using ring based ethdev, mbuf->port is not set on received packets.
>
> For applications that use the mbuf->port to identify the incoming port,
> especially when eventdev RX adapter pulls the packet on a different core
> and the application running on a worker core has no clue on the incoming
> port. This change adds some cycles at receive, to set the port of
> course.
I agree that the mbuf->port field must be set before returning from rte_eth_rx_burst().
I'm not aware how applications use the ring based ethdev, so I might be asking silly questions...
How about all the other mbuf fields normally set by the PMD before returning from rte_eth_rx_burst()?
Is the enqueueing core supposed to set them?
Or if the ring is only used for queueing packets originally received (at a physical port) by the enqueueing core, why not keep the mbuf->port value from the original reception?
>
> Please advise if this change is something that can be upstreamed.
>
> Signed-off-by: Sriram Yagnaraman <sriram.yagnaraman at ericsson.com>
More information about the dev
mailing list