From: "Wiles, Keith" <keith.wiles@intel.com>
To: "Eads, Gage" <gage.eads@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:06:54 +0000 [thread overview]
Message-ID: <8A4C5FFB-F16D-482E-8272-1D9DABA44255@intel.com> (raw)
In-Reply-To: <BB91A9A1-2E7D-46B4-8390-BA8DCDAF8A60@intel.com>
> 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 :-(
>
>>
>> Thanks,
>> Gage
>
> Regards,
> Keith
Regards,
Keith
next prev parent reply other threads:[~2018-07-09 22:07 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 [this message]
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=8A4C5FFB-F16D-482E-8272-1D9DABA44255@intel.com \
--to=keith.wiles@intel.com \
--cc=dev@dpdk.org \
--cc=gage.eads@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).