netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manish Chopra <manishc@marvell.com>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: ndo_xdp_xmit - on which queue to transmit the packet (if core_id >= total_xdp_queues ) ?
Date: Fri, 6 Sep 2019 20:49:20 +0000	[thread overview]
Message-ID: <DM6PR18MB3388D5F49B3A0A3522A40184ABBA0@DM6PR18MB3388.namprd18.prod.outlook.com> (raw)

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.

             reply	other threads:[~2019-09-06 20:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06 20:49 Manish Chopra [this message]
2019-09-06 22:56 ` ndo_xdp_xmit - on which queue to transmit the packet (if core_id >= total_xdp_queues ) ? Toke Høiland-Jørgensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR18MB3388D5F49B3A0A3522A40184ABBA0@DM6PR18MB3388.namprd18.prod.outlook.com \
    --to=manishc@marvell.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).