From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 2EF5658CF for ; Wed, 8 Mar 2017 12:08:26 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP; 08 Mar 2017 03:08:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,262,1486454400"; d="scan'208";a="1139474260" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by fmsmga002.fm.intel.com with ESMTP; 08 Mar 2017 03:08:24 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.173]) by IRSMSX107.ger.corp.intel.com ([169.254.10.3]) with mapi id 14.03.0248.002; Wed, 8 Mar 2017 11:08:23 +0000 From: "De Lara Guarch, Pablo" To: Thomas Monjalon , "Singh, Jasvinder" CC: "dev@dpdk.org" , "Doherty, Declan" Thread-Topic: [dpdk-dev] [PATCH v2 1/2] librte_net: add crc init and compute APIs Thread-Index: AQHSk1V/Q9oqscMC1kSp+yCoEQGkRqGH9bWAgALIeVA= Date: Wed, 8 Mar 2017 11:08:23 +0000 Message-ID: References: <1487969657-172541-2-git-send-email-jasvinder.singh@intel.com> <1924972.0cHYGgSmY3@xps13> <54CBAA185211B4429112C315DA58FF6DF9103A@IRSMSX103.ger.corp.intel.com> <4909384.YypA4ZyVZF@xps13> In-Reply-To: <4909384.YypA4ZyVZF@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzVmNTNiNDMtZTNlMy00NWIyLTgyY2QtNzJkYjg2YmIyY2IzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlZjYjRKM1pNVTJKYXlyRXRhVG5ISk1VbnhabkEzVlFwamsyVXU0T1d5ams9In0= x-ctpclassification: CTP_IC 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] [PATCH v2 1/2] librte_net: add crc init and compute APIs 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: Wed, 08 Mar 2017 11:08:26 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Monday, March 06, 2017 3:28 PM > To: Singh, Jasvinder > Cc: dev@dpdk.org; Doherty, Declan; De Lara Guarch, Pablo > Subject: Re: [dpdk-dev] [PATCH v2 1/2] librte_net: add crc init and compu= te > APIs >=20 > 2017-03-02 13:03, Singh, Jasvinder: > > Hi Thomas, > > > > > -----Original Message----- > > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > Sent: Wednesday, March 1, 2017 6:46 PM > > > To: Singh, Jasvinder > > > Cc: dev@dpdk.org; Doherty, Declan > > > Subject: Re: [dpdk-dev] [PATCH v2 1/2] librte_net: add crc init and > compute > > > APIs > > > > > > 2017-02-28 12:08, Jasvinder Singh: > > > > lib/librte_net/rte_net_crc.c | 664 > > > +++++++++++++++++++++++++++++++++++++ > > > > lib/librte_net/rte_net_crc.h | 101 ++++++ > > > > > > I think it should be in librte_hash. > > > > > > Please check lib/librte_hash/rte_hash_crc.h > > > > Is it good to include payload crc calculation in hash library as I see = all hash > related functionality there? >=20 > I think yes. Pablo? I think this doesn't belong in the hash library. These new functions calcul= ate CRC, but not as a hash function. Yes, CRC can be used as hash function (in fact, it is used as such in the h= ash library, the CRC32C version, and I assume that's why it is in there), but its use is= much broader (its main purpose is not to be a hash function, but for data error detectio= n, for any data). Therefore, I would suggest either creating a separate library for this, if = we want to use this as a broader use, or leave it in net library, if we want to focus on calculating CRC for Ethe= rnet frames. Regarding to the CRC that we have in the hash library, if we go for a separ= ate library, we could move that function there, but then it would have to follow the fun= ction prototype of a hash function, defined in the hash library.=20 Thanks, Pablo