From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <keith.wiles@intel.com>
Received: from mga03.intel.com (mga03.intel.com [134.134.136.65])
 by dpdk.org (Postfix) with ESMTP id 970965B18
 for <dev@dpdk.org>; Tue, 10 Jul 2018 00:00:36 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga006.jf.intel.com ([10.7.209.51])
 by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 09 Jul 2018 15:00:33 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.51,330,1526367600"; d="scan'208";a="56344485"
Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203])
 by orsmga006.jf.intel.com with ESMTP; 09 Jul 2018 15:00:14 -0700
Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by
 FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS)
 id 14.3.319.2; Mon, 9 Jul 2018 15:00:13 -0700
Received: from fmsmsx117.amr.corp.intel.com ([169.254.3.3]) by
 fmsmsx121.amr.corp.intel.com ([169.254.6.169]) with mapi id 14.03.0319.002;
 Mon, 9 Jul 2018 15:00:14 -0700
From: "Wiles, Keith" <keith.wiles@intel.com>
To: "Eads, Gage" <gage.eads@intel.com>
CC: "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: [PATCH] net/tap: set queue started and stopped
Thread-Index: AQHUF8JgMbrJv+PzZUG8NPa16RhwPKSH4ooA//+LGVCAAHicAA==
Date: Mon, 9 Jul 2018 22:00:12 +0000
Message-ID: <BB91A9A1-2E7D-46B4-8390-BA8DCDAF8A60@intel.com>
References: <20180709202049.18137-1-gage.eads@intel.com>
 <D26C29E0-1DB0-4F42-9691-73AB67ACB467@intel.com>
 <9184057F7FC11744A2107296B6B8EB1E446E6F14@FMSMSX108.amr.corp.intel.com>
In-Reply-To: <9184057F7FC11744A2107296B6B8EB1E446E6F14@FMSMSX108.amr.corp.intel.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [10.254.111.179]
Content-Type: text/plain; charset="us-ascii"
Content-ID: <BEEB717654E49748A1A72AFDB28545D0@intel.com>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH] net/tap: set queue started and stopped
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 09 Jul 2018 22:00:37 -0000



> On Jul 9, 2018, at 4:51 PM, Eads, Gage <gage.eads@intel.com> wrote:
>=20
> <snip>
>=20
>>>=20
>>> +static int
>>> +tap_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
>>> +{
>>> +	dev->data->rx_queue_state[rx_queue_id] =3D
>> RTE_ETH_QUEUE_STATE_STARTED;
>>=20
>> We need to verify the rx_queue_id is valid before setting the state.
>>=20
>> if (rx_queue_id < dev->data>nb_rx_queues)
>> 	dev->data->rx_queue_state[rx_queue_id] =3D
>> RTE_ETH_QUEUE_STATE_STARTED;
>> else
>> 	return -1;
>>=20
>> This needs to be done for each of these routines.
>>=20
>=20
> The ethdev layer function (rte_eth_dev_{rx, tx}_queue_{start, stop}) alre=
ady 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 sho=
uld check in the ethdev layer. We do not need to duplicate more checks.

Thanks for spotting that one.

>=20
> Thanks,
> Gage

Regards,
Keith