From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 2F98D234 for ; Wed, 15 Mar 2017 18:35:57 +0100 (CET) Received: by mail-wm0-f43.google.com with SMTP id u132so16592568wmg.0 for ; Wed, 15 Mar 2017 10:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=6L9r29CeXZxgVolf28zZcFYLqykMZ3ytfGZ3/f3oEs4=; b=hg1hqJ5sV+OwratnVC/XgVmuFcMU6d84Pb+LBQbxWJWupNteCsKTK3JQSNLYq4RbUJ 023STDc5Un/9Coidfj4Ff9B2LDvv6s1XdYJKBtQq+tZtffa6NeQiLOxW202qvO1CZi2I Klq4cmslqZQmHG8Xzz8MFid+LusnxyMzZuV5ykLi5uAS5QTJnBoirOVQKRyuTuQVzNDc ohOtKdLgdj2pU9YsL/IYaI2PIdK9T+GHZzZjhO1UtbU3SallqoxLCiVBpf79P/wD3KbE zogjh6xCc3G5fhETjl8PMrXHRyZ8UTrxKMmuZWgrYPJypeZFsNATIW5qlGhyIWlZeUSx r4WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=6L9r29CeXZxgVolf28zZcFYLqykMZ3ytfGZ3/f3oEs4=; b=tFOnptMt+UqROedINMafpBGKHxUOMQYsb3LwEZaluX9pOgGpvCbHpWH4McwkqLcQfP /STFYu3ZsTkOMZahGy5QA0s0fI1kz49E9jUd836CMJ8Mr7FMusAwOVnZ/CA+pIo/b0i7 xmWlf+86q8FVwkx/m8MeIqKlhTT18mbeYG52OWOd0vQHoP0rLU2FGlHbYTlYrcYln6ih l5RSZTGlyZP8ri2ShywxqXVnjTpRniH17r+wz3OxDKvYfatMzi+Fqjz92p4Z+qRxWSo4 YzT4x6AzQo9DS+W5rpCvJ32vD45lWZwOmLC7SUnvre7jE/N7HUlGRgu962ikEuPj/dkJ 1DWg== X-Gm-Message-State: AFeK/H3DZsAH3Hc0xn8K9zpC+7BbXYX9I6pScneG8Pv5RwuqeYzl67MbRAHj6qCOomERzbef X-Received: by 10.28.55.68 with SMTP id e65mr5712899wma.62.1489599356763; Wed, 15 Mar 2017 10:35:56 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id i133sm1248681wmg.26.2017.03.15.10.35.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Mar 2017 10:35:56 -0700 (PDT) From: Thomas Monjalon To: "De Lara Guarch, Pablo" Cc: "Singh, Jasvinder" , dev@dpdk.org, "Doherty, Declan" Date: Wed, 15 Mar 2017 18:35:55 +0100 Message-ID: <6450918.dWRLMxV3EZ@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: <1487969657-172541-2-git-send-email-jasvinder.singh@intel.com> <4909384.YypA4ZyVZF@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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, 15 Mar 2017 17:35:57 -0000 2017-03-08 11:08, De Lara Guarch, Pablo: > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > 2017-03-02 13:03, Singh, Jasvinder: > > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > > 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? > > > > I think yes. Pablo? > > I think this doesn't belong in the hash library. These new functions calculate CRC, but not as a hash function. Can't we say that a CRC is a hash? What is a hash? A function generating the same output bytes from given input bytes. I think you must separate hash functions and hash table management. > Yes, CRC can be used as hash function (in fact, it is used as such in the hash 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 detection, for any data). The librte_hash has several hash functions, including CRC32C and Toeplitz. > 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 Ethernet frames. I don't think Toeplitz should go in librte_net. That's why I suggest to keep every kind of hash functions in librte_hash. > Regarding to the CRC that we have in the hash library, if we go for a separate library, > we could move that function there, but then it would have to follow the function prototype of a hash function, > defined in the hash library.