DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Eads, Gage" <gage.eads@intel.com>
To: "Wiles, Keith" <keith.wiles@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/tap: set queue started and stopped
Date: Mon, 9 Jul 2018 22:14:45 +0000	[thread overview]
Message-ID: <9184057F7FC11744A2107296B6B8EB1E446E6F7C@FMSMSX108.amr.corp.intel.com> (raw)
In-Reply-To: <8A4C5FFB-F16D-482E-8272-1D9DABA44255@intel.com>



> -----Original Message-----
> From: Wiles, Keith
> Sent: Monday, July 9, 2018 5:07 PM
> To: Eads, Gage <gage.eads@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] net/tap: set queue started and stopped
> 
> 
> 
> > On Jul 9, 2018, at 5:00 PM, Wiles, Keith <keith.wiles@intel.com> wrote:
> >
> >
> >
> >> On Jul 9, 2018, at 4:51 PM, Eads, Gage <gage.eads@intel.com> wrote:
> >>
> >> <snip>
> >>
> >>>>
> >>>> +static int
> >>>> +tap_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
> >>>> +{
> >>>> +	dev->data->rx_queue_state[rx_queue_id] =
> >>> RTE_ETH_QUEUE_STATE_STARTED;
> >>>
> >>> We need to verify the rx_queue_id is valid before setting the state.
> >>>
> >>> if (rx_queue_id < dev->data>nb_rx_queues)
> >>> 	dev->data->rx_queue_state[rx_queue_id] =
> >>> RTE_ETH_QUEUE_STATE_STARTED; else
> >>> 	return -1;
> >>>
> >>> This needs to be done for each of these routines.
> >>>
> >>
> >> The ethdev layer function (rte_eth_dev_{rx, tx}_queue_{start, stop}) already
> does the queue ID bounds check -- do you prefer to duplicate it here?
> >
> > I looked in ixgb driver and it was checking I then assumed needed it. I should
> check in the ethdev layer. We do not need to duplicate more checks.
> >
> > Thanks for spotting that one.
> 
> Looks like a number of the Intel drivers check the queue_id in the PMD :-(

Well, these queue start/stop functions shouldn't be called in the main loop, so a redundant check should be fine performance-wise. Perhaps not ok from a code maintenance perspective.

> 
> >
> >>
> >> Thanks,
> >> Gage
> >
> > Regards,
> > Keith
> 
> Regards,
> Keith

  reply	other threads:[~2018-07-09 22:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-09 20:20 Gage Eads
2018-07-09 21:46 ` Wiles, Keith
2018-07-09 21:51   ` Eads, Gage
2018-07-09 22:00     ` Wiles, Keith
2018-07-09 22:06       ` Wiles, Keith
2018-07-09 22:14         ` Eads, Gage [this message]
2018-07-09 22:01 ` Wiles, Keith
2018-07-19  9:56   ` Ferruh Yigit

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=9184057F7FC11744A2107296B6B8EB1E446E6F7C@FMSMSX108.amr.corp.intel.com \
    --to=gage.eads@intel.com \
    --cc=dev@dpdk.org \
    --cc=keith.wiles@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).