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 65281A05D3 for ; Mon, 20 May 2019 10:15:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6ED2F378B; Mon, 20 May 2019 10:15:57 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id BEFCB9E4 for ; Mon, 20 May 2019 10:15:55 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 May 2019 01:15:54 -0700 X-ExtLoop1: 1 Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by orsmga006.jf.intel.com with ESMTP; 20 May 2019 01:15:53 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.155]) by IRSMSX103.ger.corp.intel.com ([169.254.3.133]) with mapi id 14.03.0415.000; Mon, 20 May 2019 09:15:52 +0100 From: "Ananyev, Konstantin" To: Sunil Kumar Kori , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 2/3] examples/ip_fragmentation: Enabling IP checksum offload in mbuf Thread-Index: AQHVC9yHnZOx+NpTukme1A79+JRUkaZxAk9wgAKb0ICAABJScA== Date: Mon, 20 May 2019 08:15:51 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258016163609D@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-3-git-send-email-skori@marvell.com> <2601191342CEEE43887BDE71AB97725801616357D4@irsmsx105.ger.corp.intel.com> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTdmYjk4ZWEtMmQ2YS00Y2JiLWFiMzQtYmRjZjM0NTQxZDFlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoib21qTlpLYkhCUVA5M29EMExJNmNoaHpoaHBRa0RMb0tnOU1qWUZcLzdFKzk2VDZEYXJYNkM0VEdMRGJNWnhRWW4ifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 2/3] examples/ip_fragmentation: Enabling IP checksum offload in mbuf 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" > -----Original Message----- > From: Sunil Kumar Kori [mailto:skori@marvell.com] > Sent: Monday, May 20, 2019 9:09 AM > To: Ananyev, Konstantin ; dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH v2 2/3] examples/ip_fragmentation: Enablin= g IP checksum offload in mbuf >=20 > Hi, >=20 > Regards > Sunil Kumar Kori >=20 > >-----Original Message----- > >From: Ananyev, Konstantin > >Sent: Saturday, May 18, 2019 8:51 PM > >To: Sunil Kumar Kori ; dev@dpdk.org > >Subject: [EXT] RE: [dpdk-dev] [PATCH v2 2/3] examples/ip_fragmentation: > >Enabling IP checksum offload in mbuf > > > >External Email > > > >---------------------------------------------------------------------- > > > > > >> -----Original Message----- > >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Sunil Kumar Kori > >> Sent: Thursday, May 16, 2019 12:42 PM > >> To: dev@dpdk.org > >> Cc: skori@marvell.com > >> Subject: [dpdk-dev] [PATCH v2 2/3] examples/ip_fragmentation: Enabling= IP > >checksum offload in mbuf > >> > >> As per the documentation to use any IP offload features, application > >> must set required offload flags into mbuf->ol_flags. > >> > >> Signed-off-by: Sunil Kumar Kori > >> --- > >> examples/ip_fragmentation/main.c | 7 +++++-- > >> 1 file changed, 5 insertions(+), 2 deletions(-) > >> > >> diff --git a/examples/ip_fragmentation/main.c > >b/examples/ip_fragmentation/main.c > >> index e90a61e..d821967 100644 > >> --- a/examples/ip_fragmentation/main.c > >> +++ b/examples/ip_fragmentation/main.c > >> @@ -354,10 +354,13 @@ struct rte_lpm6_config lpm6_config =3D { > >> > >> /* src addr */ > >> ether_addr_copy(&ports_eth_addr[port_out], ð_hdr- > >>s_addr); > >> - if (ipv6) > >> + if (ipv6) { > >> eth_hdr->ether_type =3D > >rte_be_to_cpu_16(ETHER_TYPE_IPv6); > >> - else > >> + m->ol_flags |=3D PKT_TX_IPV6; > > > >Is there is any point to do that? > >This sample app, as I remember doesn't request any extra HW offloads. > >Same comment for patch #3. > >Konstantin > > > > > Is this comment valid for IPv6 only ? Yes, my comment is about the following line of code: m->ol_flags |=3D PKT_TX_IPV6; > Otherwise for IPv4, it is required as IP checksum is neither being update= d by library nor > by the application. > >> + } else { > >> eth_hdr->ether_type =3D > >rte_be_to_cpu_16(ETHER_TYPE_IPv4); > >> + m->ol_flags |=3D (PKT_TX_IPV4 | PKT_TX_IP_CKSUM); > >> + } > >> } > >> > >> len +=3D len2; > >> -- > >> 1.8.3.1