From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 96AF52906 for ; Tue, 11 Oct 2016 15:43:07 +0200 (CEST) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E439265D0A; Tue, 11 Oct 2016 13:43:06 +0000 (UTC) Received: from [10.36.6.57] (vpn1-6-57.ams2.redhat.com [10.36.6.57]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9BDh0ZS027927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 Oct 2016 09:43:02 -0400 To: Olivier Matz , dev@dpdk.org, yuanhan.liu@linux.intel.com References: <1469088510-7552-1-git-send-email-olivier.matz@6wind.com> <1475485223-30566-1-git-send-email-olivier.matz@6wind.com> <1475485223-30566-6-git-send-email-olivier.matz@6wind.com> Cc: konstantin.ananyev@intel.com, sugesh.chandran@intel.com, bruce.richardson@intel.com, jianfeng.tan@intel.com, helin.zhang@intel.com, adrien.mazarguil@6wind.com, stephen@networkplumber.org, dprovan@bivio.net, xiao.w.wang@intel.com From: Maxime Coquelin Message-ID: <96f1e5be-5d99-caa8-814a-f09868d258bd@redhat.com> Date: Tue, 11 Oct 2016 15:43:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1475485223-30566-6-git-send-email-olivier.matz@6wind.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 11 Oct 2016 13:43:07 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v2 05/12] mbuf: add new Rx checksum mbuf flags 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: Tue, 11 Oct 2016 13:43:08 -0000 On 10/03/2016 11:00 AM, Olivier Matz wrote: > Following discussions in [1] and [2], introduce a new bit to > describe the Rx checksum status in mbuf. > > Before this patch, only one flag was available: > PKT_RX_L4_CKSUM_BAD: L4 cksum of RX pkt. is not OK. > > And same for L3: > PKT_RX_IP_CKSUM_BAD: IP cksum of RX pkt. is not OK. > > This had 2 issues: > - it was not possible to differentiate "checksum good" from > "checksum unknown". > - it was not possible for a virtual driver to say "the checksum > in packet may be wrong, but data integrity is valid". > > This patch tries to solve this issue by having 4 states (2 bits) > for the IP and L4 Rx checksums. New values are: > > - PKT_RX_L4_CKSUM_UNKNOWN: no information about the RX L4 checksum > -> the application should verify the checksum by sw > - PKT_RX_L4_CKSUM_BAD: the L4 checksum in the packet is wrong > -> the application can drop the packet without additional check > - PKT_RX_L4_CKSUM_GOOD: the L4 checksum in the packet is valid > -> the application can accept the packet without verifying the > checksum by sw > - PKT_RX_L4_CKSUM_NONE: the L4 checksum is not correct in the packet > data, but the integrity of the L4 data is verified. > -> the application can process the packet but must not verify the > checksum by sw. It has to take care to recalculate the cksum > if the packet is transmitted (either by sw or using tx offload) > > And same for L3 (replace L4 by IP in description above). > > This commit tries to be compatible with existing applications that > only check the existing flag (CKSUM_BAD). > > [1] http://dpdk.org/ml/archives/dev/2016-May/039920.html > [2] http://dpdk.org/ml/archives/dev/2016-June/040007.html > > Signed-off-by: Olivier Matz > --- > doc/guides/rel_notes/release_16_11.rst | 6 ++++ > lib/librte_mbuf/rte_mbuf.c | 16 +++++++++-- > lib/librte_mbuf/rte_mbuf.h | 51 ++++++++++++++++++++++++++++++++-- > 3 files changed, 68 insertions(+), 5 deletions(-) > > diff --git a/doc/guides/rel_notes/release_16_11.rst b/doc/guides/rel_notes/release_16_11.rst > index f29b44c..2aff84c 100644 > --- a/doc/guides/rel_notes/release_16_11.rst > +++ b/doc/guides/rel_notes/release_16_11.rst > @@ -60,6 +60,12 @@ New Features > Added a new function ``rte_raw_cksum_mbuf()`` to process the checksum of > data embedded in an mbuf chain. > > +* **Added new Rx checksum mbuf flags.** > + > + Added new Rx checksum flags in mbufs to described more states: unknown, s/described/describe/ With this typo fixed, it looks good to me: Reviewed-by: Maxime Coquelin Thanks, Maxime