From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 9FBBD5B3E for ; Tue, 10 Jul 2018 00:14:59 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2018 15:14:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,330,1526367600"; d="scan'208";a="73467006" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga002.jf.intel.com with ESMTP; 09 Jul 2018 15:14:45 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 9 Jul 2018 15:14:45 -0700 Received: from fmsmsx108.amr.corp.intel.com ([169.254.9.10]) by fmsmsx111.amr.corp.intel.com ([169.254.12.66]) with mapi id 14.03.0319.002; Mon, 9 Jul 2018 15:14:45 -0700 From: "Eads, Gage" To: "Wiles, Keith" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/tap: set queue started and stopped Thread-Index: AQHUF8JgMbrJv+PzZUG8NPa16RhwPKSH4ooA//+LGVCAAHicAIAAAd8A//+LwCA= Date: Mon, 9 Jul 2018 22:14:45 +0000 Message-ID: <9184057F7FC11744A2107296B6B8EB1E446E6F7C@FMSMSX108.amr.corp.intel.com> References: <20180709202049.18137-1-gage.eads@intel.com> <9184057F7FC11744A2107296B6B8EB1E446E6F14@FMSMSX108.amr.corp.intel.com> <8A4C5FFB-F16D-482E-8272-1D9DABA44255@intel.com> In-Reply-To: <8A4C5FFB-F16D-482E-8272-1D9DABA44255@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmRjYmNjMGItYjVhYi00ZWU3LTlmZmQtMzk2MTEwMDA0MTI3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicU91UjZHbUlzdG9pRUcwK2F2ZzVLbGFveVRibjNmM0s1Z0Y3YlptYnZmeTZ1c0NOOVwvM21DRUdUaGM4OW9iQ2wifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.1.200.106] Content-Type: text/plain; charset="us-ascii" 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:15:00 -0000 > -----Original Message----- > From: Wiles, Keith > Sent: Monday, July 9, 2018 5:07 PM > To: Eads, Gage > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] net/tap: set queue started and stopped >=20 >=20 >=20 > > On Jul 9, 2018, at 5:00 PM, Wiles, Keith wrote: > > > > > > > >> On Jul 9, 2018, at 4:51 PM, Eads, Gage wrote: > >> > >> > >> > >>>> > >>>> +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; > >>> > >>> 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] =3D > >>> 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}) a= lready > 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. >=20 > 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. >=20 > > > >> > >> Thanks, > >> Gage > > > > Regards, > > Keith >=20 > Regards, > Keith