From: Ye Xiaolong <xiaolong.ye@intel.com>
To: "Loftus, Ciara" <ciara.loftus@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"Laatz, Kevin" <kevin.laatz@intel.com>,
"Richardson, Bruce" <bruce.richardson@intel.com>
Subject: Re: [dpdk-dev] [PATCH 2/3] net/af_xdp: support pinning of IRQs
Date: Fri, 27 Sep 2019 22:06:49 +0800 [thread overview]
Message-ID: <20190927140649.GB112560@intel.com> (raw)
In-Reply-To: <74F120C019F4A64C9B78E802F6AD4CC27921D015@IRSMSX106.ger.corp.intel.com>
On 09/27, Loftus, Ciara wrote:
>[snip]
>
>> >+
>> >+static void
>> >+configure_irqs(struct pmd_internals *internals, uint16_t rx_queue_id)
>> >+{
>> >+ int coreid = internals->queue_irqs[rx_queue_id];
>> >+ char driver[NAME_MAX];
>> >+ uint16_t netdev_qid = rx_queue_id + internals->start_queue_idx;
>> >+ regex_t r;
>> >+ int interrupt;
>> >+
>> >+ if (coreid < 0)
>> >+ return;
>> >+
>> >+ if (coreid > (get_nprocs() - 1)) {
>> >+ AF_XDP_LOG(ERR, "Affinitisation failed - invalid coreid %i\n",
>> >+ coreid);
>> >+ return;
>> >+ }
>>
>> I think we can combine above 2 sanity checks together.
>>
>
>Hi Xiaolong,
>
>Thanks for your review. I agree with all of your feedback except this one.
>
>configure_irqs() is called for every queue. The queues with no affinity have a coreid initialized to -1. So coreid < 0 is a valid value and we should return with no error. However for the case where coreid > nprocs, this is an actual error and we should report that with a log.
>What do you think?
It makes sense, thanks for the explanation.
Thanks,
Xiaolong
>
>Thanks,
>Ciara
>
>[snip]
>
>> >@@ -697,6 +996,8 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
>> > goto err;
>> > }
>> >
>> >+ configure_irqs(internals, rx_queue_id);
>> >+
>> > rxq->fds[0].fd = xsk_socket__fd(rxq->xsk);
>> > rxq->fds[0].events = POLLIN;
>> >
>> >@@ -834,6 +1135,39 @@ parse_name_arg(const char *key __rte_unused,
>> > return 0;
>> > }
>> >
>
next prev parent reply other threads:[~2019-09-27 14:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-19 14:15 [dpdk-dev] [PATCH 0/3] AF_XDP tx halt fix, IRQ pinning and unaligned chunks Ciara Loftus
2019-09-19 14:15 ` [dpdk-dev] [PATCH 1/3] net/af_xdp: fix Tx halt when no recv packets Ciara Loftus
2019-09-19 14:15 ` [dpdk-dev] [PATCH 2/3] net/af_xdp: support pinning of IRQs Ciara Loftus
2019-09-24 14:12 ` Ye Xiaolong
2019-09-27 13:21 ` Loftus, Ciara
2019-09-27 14:06 ` Ye Xiaolong [this message]
2019-09-24 16:42 ` Stephen Hemminger
2019-09-19 14:15 ` [dpdk-dev] [PATCH 3/3] net/af_xdp: enable support for unaligned umem chunks Ciara Loftus
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=20190927140649.GB112560@intel.com \
--to=xiaolong.ye@intel.com \
--cc=bruce.richardson@intel.com \
--cc=ciara.loftus@intel.com \
--cc=dev@dpdk.org \
--cc=kevin.laatz@intel.com \
/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).