From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 541C5A00E6 for ; Sat, 18 May 2019 17:18:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9ED272082; Sat, 18 May 2019 17:18:42 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 7D5351C0B for ; Sat, 18 May 2019 17:18:40 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 May 2019 08:18:39 -0700 X-ExtLoop1: 1 Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by fmsmga001.fm.intel.com with ESMTP; 18 May 2019 08:18:38 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.155]) by IRSMSX104.ger.corp.intel.com ([169.254.5.93]) with mapi id 14.03.0415.000; Sat, 18 May 2019 16:18:37 +0100 From: "Ananyev, Konstantin" To: Sunil Kumar Kori , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 1/3] lib/librte_ip_frag: Remove PKT_TX_IP_CKSUM offload flags Thread-Index: AQHVC9yB0s5GeTeHPEGwuQr3PLuxvaZxAaag Date: Sat, 18 May 2019 15:18:36 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725801616357C3@irsmsx105.ger.corp.intel.com> References: <1558005895-30340-1-git-send-email-skori@marvell.com> <1558006933-32247-1-git-send-email-skori@marvell.com> <1558006933-32247-2-git-send-email-skori@marvell.com> In-Reply-To: <1558006933-32247-2-git-send-email-skori@marvell.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTk4NDhhYzEtZWUzZS00Y2EyLWIzZTQtNjJhMTU0NzIwYTdhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRVZrcGhlT0dXejFKQ1wvcitoVTJQRTE4UVhNbVhoZ3VpSnVXN0tDbUFKK1NJb2xjaHB6Y1BmZUFmRGdOalRuTGwifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action 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/3] lib/librte_ip_frag: Remove PKT_TX_IP_CKSUM offload flags 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, =20 > Currently PKT_TX_IP_CKSUM is being set into mbuf->ol_flags > during fragmentation and reassemble operation implicitly. > Because of this, application is forced to use checksum offload > whether it is supported by platform or not. >=20 > Also documentation does not provide any expected value of ol_flags > in returned mbuf (reassembled or fragmented) so application will never > come to know that which offloads are enabled. So transmission may be fail= ed > for the platforms which does not support checksum offload. >=20 > Also, IPv6 does not contain any checksum field in header so setting > mbuf->ol_flags with PKT_TX_IP_CKSUM is itself invalid. >=20 > So removing mentioned flag from the library. As there is a change in public API behavior, I think it deserves update in = release notes. Apart from that: Acked-by: Konstantin Ananyev >=20 > Signed-off-by: Sunil Kumar Kori > --- > lib/librte_ip_frag/rte_ipv4_fragmentation.c | 1 - > lib/librte_ip_frag/rte_ipv4_reassembly.c | 3 --- > lib/librte_ip_frag/rte_ipv6_reassembly.c | 3 --- > 3 files changed, 7 deletions(-) >=20 > diff --git a/lib/librte_ip_frag/rte_ipv4_fragmentation.c b/lib/librte_ip_= frag/rte_ipv4_fragmentation.c > index a96fb03..13e60fb 100644 > --- a/lib/librte_ip_frag/rte_ipv4_fragmentation.c > +++ b/lib/librte_ip_frag/rte_ipv4_fragmentation.c > @@ -173,7 +173,6 @@ static inline void __free_fragments(struct rte_mbuf *= mb[], uint32_t num) > fragment_offset =3D (uint16_t)(fragment_offset + > out_pkt->pkt_len - sizeof(struct ipv4_hdr)); >=20 > - out_pkt->ol_flags |=3D PKT_TX_IP_CKSUM; > out_pkt->l3_len =3D sizeof(struct ipv4_hdr); >=20 > /* Write the fragment to the output list */ > diff --git a/lib/librte_ip_frag/rte_ipv4_reassembly.c b/lib/librte_ip_fra= g/rte_ipv4_reassembly.c > index 1029b7a..4e20431 100644 > --- a/lib/librte_ip_frag/rte_ipv4_reassembly.c > +++ b/lib/librte_ip_frag/rte_ipv4_reassembly.c > @@ -66,9 +66,6 @@ struct rte_mbuf * > m =3D fp->frags[IP_FIRST_FRAG_IDX].mb; > fp->frags[IP_FIRST_FRAG_IDX].mb =3D NULL; >=20 > - /* update mbuf fields for reassembled packet. */ > - m->ol_flags |=3D PKT_TX_IP_CKSUM; > - > /* update ipv4 header for the reassembled packet */ > ip_hdr =3D rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *, m->l2_len); >=20 > diff --git a/lib/librte_ip_frag/rte_ipv6_reassembly.c b/lib/librte_ip_fra= g/rte_ipv6_reassembly.c > index 855e3f7..eb8b849 100644 > --- a/lib/librte_ip_frag/rte_ipv6_reassembly.c > +++ b/lib/librte_ip_frag/rte_ipv6_reassembly.c > @@ -89,9 +89,6 @@ struct rte_mbuf * > m =3D fp->frags[IP_FIRST_FRAG_IDX].mb; > fp->frags[IP_FIRST_FRAG_IDX].mb =3D NULL; >=20 > - /* update mbuf fields for reassembled packet. */ > - m->ol_flags |=3D PKT_TX_IP_CKSUM; > - > /* update ipv6 header for the reassembled datagram */ > ip_hdr =3D rte_pktmbuf_mtod_offset(m, struct ipv6_hdr *, m->l2_len); >=20 > -- > 1.8.3.1