From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 2C8101C68F for ; Fri, 11 May 2018 15:34:32 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 May 2018 06:34:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,388,1520924400"; d="scan'208";a="48470869" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 11 May 2018 06:34:31 -0700 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 11 May 2018 06:34:31 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 11 May 2018 06:34:31 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.210]) by shsmsx102.ccr.corp.intel.com ([169.254.2.79]) with mapi id 14.03.0319.002; Fri, 11 May 2018 21:33:24 +0800 From: "Zhang, Qi Z" To: "Ananyev, Konstantin" , "Wu, Yanglong" , "dev@dpdk.org" CC: "Lu, Wenzhuo" , "Wu, Yanglong" Thread-Topic: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue status Thread-Index: AQHT6QIv9LAsPfoUa0e5x+7vxPZHYaQprumAgACRq/D//4JvAIAAsQsA//+ByACAAJE7QA== Date: Fri, 11 May 2018 13:33:23 +0000 Message-ID: <039ED4275CED7440929022BC67E70611531B1574@SHSMSX103.ccr.corp.intel.com> References: <20180511082228.158405-1-yanglong.wu@intel.com> <2601191342CEEE43887BDE71AB977258AEDC5D28@irsmsx105.ger.corp.intel.com> <039ED4275CED7440929022BC67E70611531B135E@SHSMSX103.ccr.corp.intel.com> <2601191342CEEE43887BDE71AB977258AEDC5DA4@irsmsx105.ger.corp.intel.com> <039ED4275CED7440929022BC67E70611531B14E8@SHSMSX103.ccr.corp.intel.com> <2601191342CEEE43887BDE71AB977258AEDC6099@irsmsx105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB977258AEDC6099@irsmsx105.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODZkMDNiNmUtYWJmMi00ZTBkLWE0ODYtZjE0ZjY2M2FmZWVkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJyTDJhdnJMRnlKQWErT2liWW4wWCtNbmpHczBCWkpkcjN3TUV4VjZhK3VIYzJ2NW5oRjU4elwvOFJ0VUlOZG5oNSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.239.127.40] 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 13:34:33 -0000 > -----Original Message----- > From: Ananyev, Konstantin > Sent: Friday, May 11, 2018 8:53 PM > To: Zhang, Qi Z ; Wu, Yanglong > ; dev@dpdk.org > Cc: Lu, Wenzhuo ; Wu, Yanglong > > Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue status >=20 >=20 >=20 > > -----Original Message----- > > From: Zhang, Qi Z > > Sent: Friday, May 11, 2018 1:34 PM > > To: Ananyev, Konstantin ; Wu, Yanglong > > ; dev@dpdk.org > > Cc: Lu, Wenzhuo ; Wu, Yanglong > > > > Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue > > status > > > > > > > > > -----Original Message----- > > > From: Ananyev, Konstantin > > > Sent: Friday, May 11, 2018 5:51 PM > > > To: Zhang, Qi Z ; Wu, Yanglong > > > ; dev@dpdk.org > > > Cc: Lu, Wenzhuo ; Wu, Yanglong > > > > > > Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue > > > status > > > > > > > > > > > > > -----Original Message----- > > > > From: Zhang, Qi Z > > > > Sent: Friday, May 11, 2018 10:24 AM > > > > To: Ananyev, Konstantin ; Wu, > > > > Yanglong ; dev@dpdk.org > > > > Cc: Lu, Wenzhuo ; Wu, Yanglong > > > > > > > > Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue > > > > status > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Ananyev, Konstantin > > > > > Sent: Friday, May 11, 2018 4:39 PM > > > > > To: Wu, Yanglong ; dev@dpdk.org > > > > > Cc: Zhang, Qi Z ; Lu, Wenzhuo > > > > > ; Wu, Yanglong > > > > > Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue > > > > > status > > > > > > > > > > > > > > > > > > > > > -----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 > > > > > > > > > > > > Relax the check for queue setup, since some device may not > > > > > > update queue states during dev_stop. > > > > > > > > > > > > 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(-) > > > > > > > > > > > > diff --git a/lib/librte_ethdev/rte_ethdev.c > > > > > > b/lib/librte_ethdev/rte_ethdev.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 rx_queue_id, > > > > > > RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP)) > > > > > > return -EBUSY; > > > > > > > > > > > > - 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; > > > > > > > > > > > > rxq =3D dev->data->rx_queues; > > > > > > @@ -1611,8 +1612,9 @@ rte_eth_tx_queue_setup(uint16_t port_id, > > > > > uint16_t tx_queue_id, > > > > > > RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP)) > > > > > > return -EBUSY; > > > > > > > > > > > > - 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; > > > > > > > > > > > > txq =3D dev->data->tx_queues; > > > > > > -- > > > > > > > > > > That would break runtime queue setup. > > > > > > > > Em... would you explain more, I can't figure out why this break > > > > runtime > > > queue setup so far. > > > > > > Ah yes, it was me not reading code properly. > > > So yep - you right it wouldn't break things. > > > > > > > > > > > > Why not fix offending PMDs instead? > > > > > > > > Ixgbe, i40e have this issue, not sure what about others. > > > > probably we should fix at rte_eth_dev_stop to save all PMD? > > > > > > Probably yes, that's a good thing to do in long term anyway. > > > > I'm thinking if it's better to move all queue state change into ethdev = layer. > > So there could be a patch to update queue states properly at > > dev_start/dev_stop/queue_start/queue_stop and maintainer help them self > to cleanup PMD, and I think our proposed fix should be part of this. > > But for now, can we just keep current simple fix? >=20 > Yes, I think that's a good one, that's why I acked it, see below. > Konstantin oh, I missed that :) >=20 > > > > Regards > > Qi > > > > > > > > > > > > > > > > > > > > 2.11.0 > > > > > > Acked-by: Konstantin Ananyev