From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id BFEA258EC for ; Mon, 9 Jul 2018 23:51:50 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2018 14:51:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,330,1526367600"; d="scan'208";a="65622983" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga003.jf.intel.com with ESMTP; 09 Jul 2018 14:51:49 -0700 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 9 Jul 2018 14:51:49 -0700 Received: from fmsmsx108.amr.corp.intel.com ([169.254.9.10]) by fmsmsx156.amr.corp.intel.com ([169.254.13.214]) with mapi id 14.03.0319.002; Mon, 9 Jul 2018 14:51:49 -0700 From: "Eads, Gage" To: "Wiles, Keith" CC: "dev@dpdk.org" Thread-Topic: [PATCH] net/tap: set queue started and stopped Thread-Index: AQHUF8JgMbrJv+PzZUG8NPa16RhwPKSH4ooA//+LGVA= Date: Mon, 9 Jul 2018 21:51:48 +0000 Message-ID: <9184057F7FC11744A2107296B6B8EB1E446E6F14@FMSMSX108.amr.corp.intel.com> References: <20180709202049.18137-1-gage.eads@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzQ2NzMzNDAtYTEyYS00MzRhLTlhZDYtMmExOTBhOGNjMTIxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiR3NMV1dmRjRGYWR4XC9rVGJidVwvQmwrYUxhS0Vlbk1OMENzcnZiT1ZzNFZwWmduYlhWck44NXlmSk42NFwvbHBsaSJ9 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 21:51:51 -0000 > > > > +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 The ethdev layer function (rte_eth_dev_{rx, tx}_queue_{start, stop}) alread= y does the queue ID bounds check -- do you prefer to duplicate it here? Thanks, Gage