netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ndo_xdp_xmit - on which queue to transmit the packet (if core_id >= total_xdp_queues ) ?
@ 2019-09-06 20:49 Manish Chopra
  2019-09-06 22:56 ` Toke Høiland-Jørgensen
  0 siblings, 1 reply; 2+ messages in thread
From: Manish Chopra @ 2019-09-06 20:49 UTC (permalink / raw)
  To: netdev

Hello,

I am working on XDP_REDIRECT implementation and got a query. Some of the ethernet drivers decide the xdp queue index on which xdp packet should be redirected based
on smp_processor_id() in their ndo_xdp_xmit() handler, if smp_processor_id() >= total_num_xdp_queues, they decide to drop the packets and return error from the handler.
I am hitting the same condition where using 8 XDP queues, I get CPU id 8 to redirect the XDP packet and I am not sure if it should be dropped or can be transmitted on a
queue (= smp_processor_id() % total_num_xdp_queues) safely ?.

freescale/dpaa2 seems to be handling this case by sending the packet on the queue (= smp_processor_id() % total_num_xdp_queues) but unsure what should be the expected behavior. 

Regards,
Manish Chopra.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-06 22:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 20:49 ndo_xdp_xmit - on which queue to transmit the packet (if core_id >= total_xdp_queues ) ? Manish Chopra
2019-09-06 22:56 ` Toke Høiland-Jørgensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).