From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 0927568AD for ; Wed, 26 Nov 2014 01:48:04 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 25 Nov 2014 16:55:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,459,1413270000"; d="scan'208";a="643568727" Received: from pgsmsx102.gar.corp.intel.com ([10.221.44.80]) by orsmga002.jf.intel.com with ESMTP; 25 Nov 2014 16:58:57 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by PGSMSX102.gar.corp.intel.com (10.221.44.80) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 26 Nov 2014 08:58:18 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.182]) by shsmsx102.ccr.corp.intel.com ([169.254.2.216]) with mapi id 14.03.0195.001; Wed, 26 Nov 2014 08:58:16 +0800 From: "Zhang, Helin" To: "Ananyev, Konstantin" , 'Olivier MATZ' , "'dev@dpdk.org'" Thread-Topic: [dpdk-dev] [PATCH v2 06/13] mbuf: add functions to get the name of an ol_flag Thread-Index: AQHQAxI9E1xWwGkhJkSEkAfCUUr49JxlJ+CAgAD8JQCAAaggIIAJasXwgAAT37D//5YwgIABQIIw Date: Wed, 26 Nov 2014 00:58:16 +0000 Message-ID: References: <1415635166-1364-1-git-send-email-olivier.matz@6wind.com> <1415984609-2484-1-git-send-email-olivier.matz@6wind.com> <1415984609-2484-7-git-send-email-olivier.matz@6wind.com> <2601191342CEEE43887BDE71AB977258213AE5A1@IRSMSX105.ger.corp.intel.com> <546B1188.2090203@6wind.com> <2601191342CEEE43887BDE71AB977258213B6BDA@IRSMSX105.ger.corp.intel.com> <2601191342CEEE43887BDE71AB977258213B958A@IRSMSX105.ger.corp.intel.com> <2601191342CEEE43887BDE71AB977258213B975F@IRSMSX105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB977258213B975F@IRSMSX105.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "'jigsaw@gmail.com'" Subject: Re: [dpdk-dev] [PATCH v2 06/13] mbuf: add functions to get the name of an ol_flag 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: Wed, 26 Nov 2014 00:48:05 -0000 > -----Original Message----- > From: Ananyev, Konstantin > Sent: Tuesday, November 25, 2014 9:49 PM > To: Zhang, Helin; 'Olivier MATZ'; 'dev@dpdk.org' > Cc: 'jigsaw@gmail.com' > Subject: RE: [dpdk-dev] [PATCH v2 06/13] mbuf: add functions to get the n= ame of > an ol_flag >=20 >=20 >=20 > > -----Original Message----- > > From: Zhang, Helin > > Sent: Tuesday, November 25, 2014 12:15 PM > > To: Ananyev, Konstantin; 'Olivier MATZ'; 'dev@dpdk.org' > > Cc: 'jigsaw@gmail.com' > > Subject: RE: [dpdk-dev] [PATCH v2 06/13] mbuf: add functions to get > > the name of an ol_flag > > > > HI Konstantin > > > > > -----Original Message----- > > > From: Ananyev, Konstantin > > > Sent: Tuesday, November 25, 2014 6:38 PM > > > To: 'Olivier MATZ'; 'dev@dpdk.org' > > > Cc: 'jigsaw@gmail.com'; Zhang, Helin > > > Subject: RE: [dpdk-dev] [PATCH v2 06/13] mbuf: add functions to get > > > the name of an ol_flag > > > > > > Hi Helin, > > > > > > > -----Original Message----- > > > > From: Ananyev, Konstantin > > > > Sent: Wednesday, November 19, 2014 11:07 AM > > > > To: Olivier MATZ; dev@dpdk.org > > > > Cc: jigsaw@gmail.com; Zhang, Helin > > > > Subject: RE: [dpdk-dev] [PATCH v2 06/13] mbuf: add functions to > > > > get the name of an ol_flag > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Olivier MATZ [mailto:olivier.matz@6wind.com] > > > > > Sent: Tuesday, November 18, 2014 9:30 AM > > > > > To: Ananyev, Konstantin; dev@dpdk.org > > > > > Cc: jigsaw@gmail.com; Zhang, Helin > > > > > Subject: Re: [dpdk-dev] [PATCH v2 06/13] mbuf: add functions to > > > > > get the name of an ol_flag > > > > > > > > > > Hi Konstantin, > > > > > > > > > > On 11/17/2014 08:00 PM, Ananyev, Konstantin wrote: > > > > > >> +/* > > > > > >> + * Get the name of a RX offload flag */ const char > > > > > >> +*rte_get_rx_ol_flag_name(uint64_t mask) { > > > > > >> + switch (mask) { > > > > > >> + case PKT_RX_VLAN_PKT: return "PKT_RX_VLAN_PKT"; > > > > > >> + case PKT_RX_RSS_HASH: return "PKT_RX_RSS_HASH"; > > > > > >> + case PKT_RX_FDIR: return "PKT_RX_FDIR"; > > > > > >> + case PKT_RX_L4_CKSUM_BAD: return > "PKT_RX_L4_CKSUM_BAD"; > > > > > >> + case PKT_RX_IP_CKSUM_BAD: return > "PKT_RX_IP_CKSUM_BAD"; > > > > > >> + /* case PKT_RX_EIP_CKSUM_BAD: return > > > > > >> +"PKT_RX_EIP_CKSUM_BAD"; > > > */ > > > > > >> + /* case PKT_RX_OVERSIZE: return "PKT_RX_OVERSIZE"; */ > > > > > >> + /* case PKT_RX_HBUF_OVERFLOW: return > > > "PKT_RX_HBUF_OVERFLOW"; */ > > > > > >> + /* case PKT_RX_RECIP_ERR: return "PKT_RX_RECIP_ERR"; */ > > > > > >> + /* case PKT_RX_MAC_ERR: return "PKT_RX_MAC_ERR"; */ > > > > > > > > > > > > Didn't spot it before, wonder why do you need these 5 > > > > > > commented out > > > lines? > > > > > > In fact, why do we need these flags if they all equal to zero r= ight now? > > > > > > I know these flags were not introduced by that patch, in fact > > > > > > as I can see it was a temporary measure, as old ol_flags were j= ust 16 bits > long: > > > > > > http://dpdk.org/ml/archives/dev/2014-June/003308.html > > > > > > So wonder should now these flags either get proper values or be > removed? > > > > > > > > > > I would be in favor of removing them, or at least the following > > > > > ones (I don't understand how they can help the application): > > > > > > > > > > - PKT_RX_OVERSIZE: Num of desc of an RX pkt oversize. > > > > > - PKT_RX_HBUF_OVERFLOW: Header buffer overflow. > > > > > - PKT_RX_RECIP_ERR: Hardware processing error. > > > > > - PKT_RX_MAC_ERR: MAC error. > > > > > > > > Tend to agree... > > > > Or probably collapse these 4 flags into one: flag PKT_RX_ERR or som= ething. > > > > Might be still used by someone for debugging purposes. > > > > Helin, what do you think? > > > > > > As there is no answer, I suppose you don't care these flags any more. > > > So we can just remove them, right? > > Sorry, I think I care it a bit. I have a lot of emails to be dealt with= , due to the > whole week training. > > Yes, it was added there before new mbuf defined. Why zero? Because of l= ack > of bits for them. > > Unfortunately, I forgot to add them with correct values after new mbuf > introduced. > > Thank you so much for spotting it out! > > > > The error flags were added according to the errors defined by FVL > > datasheet. It could be helpful for middle layer software or > > applications with the specific errors identified. I'd prefer to add the= correct > values for those flags. What do you think? >=20 >=20 > I am ok to have one flag for that something like PKT_RX_HW_ERR (or someth= ing). > Don't really understand why you need all 4 of them - the packet contains = invalid > data anyway, so there is not much use of it. Yes, I agree with you that one bit might be enough. It seems that we have m= ore than one bits for errors previously. Regards, Helin > For debugging purposes you can just add a debug log for all of them. > Something like: >=20 > if (unlikely(error_bits & ...)) { > flags |=3D PKT_RX_MAC_ERR; > PMD_DRV_LOG(DEBUG, ...); > return flags; > } >=20 > Konstantin >=20 > > > > Thanks and Regards, > > Helin > > > > > > > > Konstantin > > > > > > > > > > > > > > > > > I would have say that a statistics counter in the driver is more > > > > > appropriate for this case (maybe there is already a counter in > > > > > the hardware). > > > > > > > > > > I have no i40e hardware to test that, so I don't feel very > > > > > comfortable to modify the i40e driver code to add these stats. > > > > > > > > > > Adding Helin in CC list, maybe he has an idea. > > > > > > > > > > Regards, > > > > > Olivier