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 82B86C656 for ; Thu, 18 Jun 2015 16:37:19 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 18 Jun 2015 07:37:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,638,1427785200"; d="scan'208";a="713319644" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by orsmga001.jf.intel.com with ESMTP; 18 Jun 2015 07:37:17 -0700 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.171]) by IRSMSX154.ger.corp.intel.com ([169.254.12.91]) with mapi id 14.03.0224.002; Thu, 18 Jun 2015 15:37:16 +0100 From: "Walukiewicz, Miroslaw" To: "Ananyev, Konstantin" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCHv2 0/5] ethdev: add new API to retrieve RX/TX queue information Thread-Index: AQHQqcmFOASKEYwvhUqOkft6ht1Rn52yQPqg///9oQCAABFo4A== Date: Thu, 18 Jun 2015 14:37:15 +0000 Message-ID: <7C4248CAE043B144B1CD242D27562653454ABE0C@IRSMSX104.ger.corp.intel.com> References: <1434560084-21237-2-git-send-email-konstantin.ananyev@intel.com> <1434633528-23329-1-git-send-email-konstantin.ananyev@intel.com> <7C4248CAE043B144B1CD242D27562653454ABD61@IRSMSX104.ger.corp.intel.com> <2601191342CEEE43887BDE71AB97725836A1389C@irsmsx105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB97725836A1389C@irsmsx105.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCHv2 0/5] ethdev: add new API to retrieve RX/TX queue information X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2015 14:37:20 -0000 > -----Original Message----- > From: Ananyev, Konstantin > Sent: Thursday, June 18, 2015 4:17 PM > To: Walukiewicz, Miroslaw; dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCHv2 0/5] ethdev: add new API to retrieve RX/= TX > queue information >=20 > Hi Mirek, >=20 > > -----Original Message----- > > From: Walukiewicz, Miroslaw > > Sent: Thursday, June 18, 2015 2:31 PM > > To: Ananyev, Konstantin; dev@dpdk.org > > Subject: RE: [dpdk-dev] [PATCHv2 0/5] ethdev: add new API to retrieve > RX/TX queue information > > > > Konstantin, > > > > Is there a possibility to read information about available space in NIC= queue > for TX. >=20 > I suppose it is possible as some future addition. > As I said in the commit message, I left some reserved space, so extra fie= lds > could be added to the structure without ABI breakage. > For now, I just added some static/config information for the queue, but I= think > it is possible and plausible to have some runtime information too. >=20 > > > > It is quite easy to compute (or even available directly) and very usef= ul > especially for application sending multi-descriptor packets like > > TCP TSO. > > > > Now there is no access to such information and the transmit packet func= tion > must be called to > > be sure that there is available space. >=20 > Hmm, as I said I was thinking about adding some RT information in future: > number of free descriptors (from SW point of view), index of next descrip= tor > to process by SW, etc. > But my thought it would be use by some watchdog thread to collect > statistics/detect stall, etc. > I didn't intend it to be used by IO thread. >=20 > I am not sure why do you need to call such function at RT? > PMD wouldn't TX a packet, if there is not enough free TXDs for the whole > packet. > From other side upper layer, can't always calculate correctly how many TX= D it > would really need > (context descriptors might be needed, etc). > Plus, even if nb_tx_free=3D=3DX, in reality it could be there much more = free > TXDs, and SW just need > to process them (and would do that at next tx_burst() call. > So, why just not: > ... > n =3D tx_burst(..., nb_tx); > if (n < nb_tx) {requeue unsent of packets;} > ? >=20 The case is TCP TSO operation as I said. I really use the that method proposed by you but it very expensive way. The TX path in TCP is very complex and expensive.=20 It is desirable to create the TCP TSO segments that fits the space in queue= to avoid re-queue of packets=20 making the TX path much more complex.=20 For ixgbe the TSO segments are up to 40 descriptors (max 64K of data) and m= aking the TX queue full is just simple. Having the possibility for reading number of descriptors available to send = can improve TCP TX process in the way=20 that when there is no space in TX queue we can just not enter the complex T= X path and spent time making more=20 useful job than re-queue. Also It is easy to fit the TSO segment to available space in TX queue inste= ad of sending always a large 64K TCP segments=20 and count on the result of tx_burst and re-queue in case of lack of space. Mirek > Konstantin >=20 > > > > Mirek > > > > > -----Original Message----- > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Konstantin > Ananyev > > > Sent: Thursday, June 18, 2015 3:19 PM > > > To: dev@dpdk.org > > > Subject: [dpdk-dev] [PATCHv2 0/5] ethdev: add new API to retrieve RX/= TX > > > queue information > > > > > > Add the ability for the upper layer to query RX/TX queue information. > > > Right now supported for: > > > ixgbe, i40e, e1000 PMDs. > > > > > > Konstantin Ananyev (5): > > > ethdev: add new API to retrieve RX/TX queue information > > > i40e: add support for eth_(rxq|txq)_info_get > > > ixgbe: add support for eth_(rxq|txq)_info_get > > > e1000: add support for eth_(rxq|txq)_info_get > > > testpmd: add new command to display RX/TX queue information > > > > > > app/test-pmd/cmdline.c | 48 +++++++++++++++++++++++++ > > > app/test-pmd/config.c | 67 > > > ++++++++++++++++++++++++++++++++++ > > > app/test-pmd/testpmd.h | 2 ++ > > > drivers/net/e1000/e1000_ethdev.h | 12 +++++++ > > > drivers/net/e1000/em_ethdev.c | 2 ++ > > > drivers/net/e1000/em_rxtx.c | 38 ++++++++++++++++++++ > > > drivers/net/e1000/igb_ethdev.c | 4 +++ > > > drivers/net/e1000/igb_rxtx.c | 36 +++++++++++++++++++ > > > drivers/net/i40e/i40e_ethdev.c | 2 ++ > > > drivers/net/i40e/i40e_ethdev.h | 5 +++ > > > drivers/net/i40e/i40e_rxtx.c | 42 ++++++++++++++++++++++ > > > drivers/net/ixgbe/ixgbe_ethdev.c | 4 +++ > > > drivers/net/ixgbe/ixgbe_ethdev.h | 6 ++++ > > > drivers/net/ixgbe/ixgbe_rxtx.c | 42 ++++++++++++++++++++++ > > > lib/librte_ether/rte_ethdev.c | 54 ++++++++++++++++++++++++++++ > > > lib/librte_ether/rte_ethdev.h | 77 > > > +++++++++++++++++++++++++++++++++++++++- > > > 16 files changed, 440 insertions(+), 1 deletion(-) > > > > > > -- > > > 1.8.5.3