From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 0A9955F2D for ; Tue, 10 Jul 2018 00:07:06 +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 fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2018 15:07:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,330,1526367600"; d="scan'208";a="56346189" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga006.jf.intel.com with ESMTP; 09 Jul 2018 15:06:55 -0700 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 9 Jul 2018 15:06:55 -0700 Received: from fmsmsx117.amr.corp.intel.com ([169.254.3.3]) by fmsmsx156.amr.corp.intel.com ([169.254.13.214]) with mapi id 14.03.0319.002; Mon, 9 Jul 2018 15:06:55 -0700 From: "Wiles, Keith" To: "Eads, Gage" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/tap: set queue started and stopped Thread-Index: AQHUF8JgMbrJv+PzZUG8NPa16RhwPKSH4ooA//+LGVCAAHicAIAAAd8A Date: Mon, 9 Jul 2018 22:06:54 +0000 Message-ID: <8A4C5FFB-F16D-482E-8272-1D9DABA44255@intel.com> References: <20180709202049.18137-1-gage.eads@intel.com> <9184057F7FC11744A2107296B6B8EB1E446E6F14@FMSMSX108.amr.corp.intel.com> In-Reply-To: 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: <71E8D174BF4DD241915325CCB6950D55@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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2018 22:07:07 -0000 > On Jul 9, 2018, at 5:00 PM, Wiles, Keith wrote: >=20 >=20 >=20 >> On Jul 9, 2018, at 4:51 PM, Eads, Gage wrote: >>=20 >> >>=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}) alr= eady does the queue ID bounds check -- do you prefer to duplicate it here? >=20 > I looked in ixgb driver and it was checking I then assumed needed it. I s= hould check in the ethdev layer. We do not need to duplicate more checks. >=20 > Thanks for spotting that one. Looks like a number of the Intel drivers check the queue_id in the PMD :-( >=20 >>=20 >> Thanks, >> Gage >=20 > Regards, > Keith Regards, Keith