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 C35D41BD37 for ; Fri, 11 May 2018 10:39:08 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 May 2018 01:39:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,387,1520924400"; d="scan'208";a="198497298" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by orsmga004.jf.intel.com with ESMTP; 11 May 2018 01:39:06 -0700 Received: from irsmsx156.ger.corp.intel.com (10.108.20.68) by IRSMSX152.ger.corp.intel.com (163.33.192.66) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 11 May 2018 09:39:06 +0100 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.214]) by IRSMSX156.ger.corp.intel.com ([169.254.3.233]) with mapi id 14.03.0319.002; Fri, 11 May 2018 09:39:05 +0100 From: "Ananyev, Konstantin" To: "Wu, Yanglong" , "dev@dpdk.org" CC: "Zhang, Qi Z" , "Lu, Wenzhuo" , "Wu, Yanglong" Thread-Topic: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue status Thread-Index: AQHT6QI0JtyHHhiU90yD9BmJVv6Rc6QqNLXw Date: Fri, 11 May 2018 08:39:05 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258AEDC5D28@irsmsx105.ger.corp.intel.com> References: <20180511082228.158405-1-yanglong.wu@intel.com> In-Reply-To: <20180511082228.158405-1-yanglong.wu@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODZkMDNiNmUtYWJmMi00ZTBkLWE0ODYtZjE0ZjY2M2FmZWVkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IkxnTjUrWmptM3VicU02XC9LM0kzSngwSDQ1MVNnNjNVRmY4Y0RoZ2FieXJvPSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue status 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: Fri, 11 May 2018 08:39:10 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yanglong Wu > Sent: Friday, May 11, 2018 9:22 AM > To: dev@dpdk.org > Cc: Zhang, Qi Z ; Lu, Wenzhuo ; Wu, Yanglong > Subject: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue status >=20 > Relax the check for queue setup, since some device > may not update queue states during dev_stop. >=20 > Fixes: cac923cfea47 ("ethdev: support runtime queue setup") > Signed-off-by: Yanglong Wu > --- > lib/librte_ethdev/rte_ethdev.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) >=20 > diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethde= v.c > index a357ee09f..34379642a 100644 > --- a/lib/librte_ethdev/rte_ethdev.c > +++ b/lib/librte_ethdev/rte_ethdev.c > @@ -1479,8 +1479,9 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t r= x_queue_id, > RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP)) > return -EBUSY; >=20 > - if (dev->data->rx_queue_state[rx_queue_id] !=3D > - RTE_ETH_QUEUE_STATE_STOPPED) > + if (dev->data->dev_started && > + (dev->data->rx_queue_state[rx_queue_id] !=3D > + RTE_ETH_QUEUE_STATE_STOPPED)) > return -EBUSY; >=20 > rxq =3D dev->data->rx_queues; > @@ -1611,8 +1612,9 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t t= x_queue_id, > RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP)) > return -EBUSY; >=20 > - if (dev->data->tx_queue_state[tx_queue_id] !=3D > - RTE_ETH_QUEUE_STATE_STOPPED) > + if (dev->data->dev_started && > + (dev->data->tx_queue_state[tx_queue_id] !=3D > + RTE_ETH_QUEUE_STATE_STOPPED)) > return -EBUSY; >=20 > txq =3D dev->data->tx_queues; > -- That would break runtime queue setup. Why not fix offending PMDs instead? > 2.11.0