DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Loftus, Ciara" <ciara.loftus@intel.com>
To: "Ye, Xiaolong" <xiaolong.ye@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 13:21:08 +0000	[thread overview]
Message-ID: <74F120C019F4A64C9B78E802F6AD4CC27921D015@IRSMSX106.ger.corp.intel.com> (raw)
In-Reply-To: <20190924141233.GA67866@intel.com>

[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?

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;
> > }
> >


  reply	other threads:[~2019-09-27 13:23 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 [this message]
2019-09-27 14:06       ` Ye Xiaolong
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=74F120C019F4A64C9B78E802F6AD4CC27921D015@IRSMSX106.ger.corp.intel.com \
    --to=ciara.loftus@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=kevin.laatz@intel.com \
    --cc=xiaolong.ye@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).