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 21:51:48 +0000	[thread overview]
Message-ID: <9184057F7FC11744A2107296B6B8EB1E446E6F14@FMSMSX108.amr.corp.intel.com> (raw)
In-Reply-To: <D26C29E0-1DB0-4F42-9691-73AB67ACB467@intel.com>

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

Thanks,
Gage

  reply	other threads:[~2018-07-09 21:51 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 [this message]
2018-07-09 22:00     ` Wiles, Keith
2018-07-09 22:06       ` Wiles, Keith
2018-07-09 22:14         ` Eads, Gage
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=9184057F7FC11744A2107296B6B8EB1E446E6F14@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).