Hi Morten, > -----Original Message----- > From: Morten Brørup <m...@smartsharesystems.com> > Sent: Tuesday, 18 June 2024 18:01 > To: Sriram Yagnaraman <sriram.yagnara...@ericsson.com> > Cc: dev@dpdk.org; Bruce Richardson <bruce.richard...@intel.com> > Subject: RE: [PATCH] net/ring: Set mbuf->port for received packets > > [Du får inte e-post ofta från m...@smartsharesystems.com. Läs om varför det > här är viktigt på https://aka.ms/LearnAboutSenderIdentification ] > > > From: Sriram Yagnaraman [mailto:sriram.yagnara...@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?
I am integrating a couple of existing DPDK applications, and they use rte_eth_* API between them today. To keep the API consistent, and not make too many changes in the applications themselves, net_ring seems to be the best option. If someone has a better idea, I would love to hear. There are no "HW" offloads when using net_ring, and IIUC there are no HW related fields that can be set at rx_burst. So, apart from port field, I didn't see much else that needed to be set. > > 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? In my case the enqueuing application originates the flow from SW, so the rte_mbuf does not come from a NIC. > > > > > Please advise if this change is something that can be upstreamed. > > > > Signed-off-by: Sriram Yagnaraman <sriram.yagnara...@ericsson.com>