From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id D569A4A63 for ; Fri, 22 Jul 2016 10:24:52 +0200 (CEST) Received: from alille-653-1-293-182.w90-1.abo.wanadoo.fr ([90.1.53.182] helo=[192.168.1.13]) by mail.droids-corp.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1bQVnq-0008WP-Nw; Fri, 22 Jul 2016 10:27:27 +0200 From: Olivier Matz To: "Ananyev, Konstantin" , "dev@dpdk.org" , "yuanhan.liu@linux.intel.com" References: <1469088510-7552-1-git-send-email-olivier.matz@6wind.com> <1469088510-7552-5-git-send-email-olivier.matz@6wind.com> <2601191342CEEE43887BDE71AB97725836B804B3@irsmsx105.ger.corp.intel.com> Cc: "Chandran, Sugesh" , "Richardson, Bruce" , "Tan, Jianfeng" , "adrien.mazarguil@6wind.com" Message-ID: <20c9df39-1db8-95fb-8f32-5c8bb7257ba5@6wind.com> Date: Fri, 22 Jul 2016 10:24:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0 MIME-Version: 1.0 In-Reply-To: <2601191342CEEE43887BDE71AB97725836B804B3@irsmsx105.ger.corp.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 04/12] mbuf: add function to calculate a checksum 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: Fri, 22 Jul 2016 08:24:53 -0000 Hi Konstantin, On 07/21/2016 12:51 PM, Ananyev, Konstantin wrote: > Hi Olivier, > >> >> This function can be used to calculate the checksum of data embedded in mbuf, that can be composed of several segments. >> >> This function will be used by the virtio pmd in next commits to calculate the checksum in software in case the protocol is not recognized. >> >> Signed-off-by: Olivier Matz >> --- >> doc/guides/rel_notes/release_16_11.rst | 5 ++++ >> lib/librte_mbuf/rte_mbuf.c | 55 ++++++++++++++++++++++++++++++++-- >> lib/librte_mbuf/rte_mbuf.h | 13 ++++++++ >> lib/librte_mbuf/rte_mbuf_version.map | 1 + >> 4 files changed, 72 insertions(+), 2 deletions(-) >> >> diff --git a/doc/guides/rel_notes/release_16_11.rst b/doc/guides/rel_notes/release_16_11.rst >> index 6a591e2..da70f3b 100644 >> --- a/doc/guides/rel_notes/release_16_11.rst >> +++ b/doc/guides/rel_notes/release_16_11.rst >> @@ -53,6 +53,11 @@ New Features >> Added two new functions ``rte_get_rx_ol_flag_list()`` and >> ``rte_get_tx_ol_flag_list()`` to dump offload flags as a string. >> >> +* **Added a functions to calculate the checksum of data in a mbuf.** >> + >> + Added a new function ``rte_pktmbuf_cksum()`` to process the checksum >> + of data embedded in an mbuf chain. >> + >> Resolved Issues >> --------------- >> >> diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index 56f37e6..0304245 100644 >> --- a/lib/librte_mbuf/rte_mbuf.c >> +++ b/lib/librte_mbuf/rte_mbuf.c >> @@ -60,6 +60,7 @@ >> #include >> #include >> #include >> +#include > > As a nit, do we need to introduce a dependency for librte_mbuf on librte_net? > Might be better to put this functionality into librte_net? I tried to have this code in librte_net, also when working on the software packet type parser, and it did not really convince me, mainly because librte_net is just header files as of today (it's not a real library). But I can give it a try and post a patch so we can compare, probably not in the coming days, but I keep a note on it. Also, as I answered to Don, it would make less sense to move software packet type parser in librte_net, since it's not a network feature but more a dpdk mbuf feature. But software packet type needs network headers definitions... so the cat is eating its tail ;) Regards, Olivier