From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 0200F5323 for ; Mon, 27 Jan 2014 01:36:55 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 26 Jan 2014 16:34:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.95,725,1384329600"; d="scan'208";a="465073885" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by fmsmga001.fm.intel.com with ESMTP; 26 Jan 2014 16:38:12 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.202]) by IRSMSX104.ger.corp.intel.com ([169.254.5.244]) with mapi id 14.03.0123.003; Mon, 27 Jan 2014 00:38:09 +0000 From: "Ananyev, Konstantin" To: "Wiles, Roger Keith (Wind River)" , "Banashankar KV" Thread-Topic: [dpdk-dev] pktgen offload checksum flag not able to make it work with pacp packets. Thread-Index: AQHPGiBkLUtfc9JAs0amzVcLileUbZqWTX0AgAFsPsA= Date: Mon, 27 Jan 2014 00:38:09 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725808E61A0F@IRSMSX105.ger.corp.intel.com> References: <4FE91E82-8097-451E-A36D-2F1254573A89@windriver.com> <7B58AC42-4409-4448-A748-BADA7F37E32C@windriver.com> In-Reply-To: <7B58AC42-4409-4448-A748-BADA7F37E32C@windriver.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Cc: "" Subject: Re: [dpdk-dev] pktgen offload checksum flag not able to make it work with pacp packets. 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: Mon, 27 Jan 2014 00:36:56 -0000 Hey, As I remember, for TCP and UDP checksum HW offload, SW is responsible for g= enerating and setting psudo-header checksum. >>From 82599 datasheet, 7.2.5.2: Note: For non-TSO, software still needs to calculate a full checksum for th= e TCP/ UDP pseudo-header. This checksum of the pseudo-header should be placed in the packet data buffer at the appropriate offset for the checksum calculation. Refer to app/test-pmd/csumonly.c for an example. Konstantin -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wiles, Roger Keith Sent: Sunday, January 26, 2014 2:47 AM To: Banashankar KV Cc: Subject: Re: [dpdk-dev] pktgen offload checksum flag not able to make it wo= rk with pacp packets. Hi Banashankar, The tx_conf is used in the pktgen_config_ports() with the rte_eth_tx_queue_= setup() and I am not sure why it matters that tx_conf is disable. The value= s are mostly zero, but some type of interaction must be going on. It may be= the txq_flags being set to IXGBE_SIMPLE_FLAGS and it is overriding the th= e per packet flag later. You will need to look at the driver to determine t= he real reason. The checksum should not be wrong unless the hardware registers are not setu= p correctly, but I would not think that is the case. You may want to verify= the checksum is correct another way, because I can not see the hardware do= ing the checksum wrong. Thanks ++Keith Keith Wiles, Principal Technologist for Networking member of the CTO office= , Wind River mobile 940.213.5533 [Powering 30 Years of Innovation] On Jan 25, 2014, at 4:53 PM, Banashankar KV > wrote: Hi, Thanks a lot for the reply ! Yes I have checked those examples and had set all those flags. But IP check= sum started working after commenting off the txq_flags from the pktgen.c fi= le's tx_conf . And I added the following flag to calculate the tcp checksum. m->ol_flags |=3D PKT_TX_TCP_CKSUM its calculating the TCP checksum but turning out to be wrong checksum. Thanks Banashankar On Fri, Jan 24, 2014 at 11:44 AM, Wiles, Roger Keith > wrote: I have not enabled that feature myself, but I would expect it to work as lo= ng as the hardware does. What does the docs say about enabling hardware off= load support? Did you look at the following files: ip_reassembly/ipv4_rsmbl.h: m->ol_flags |=3D PKT_TX_IP_CKSUM; ipv4_frag/rte_ipv4_frag.h: out_pkt->ol_flags |=3D PKT_TX_IP_CK= SUM; Thanks ++Keith Keith Wiles, Principal Technologist for Networking member of the CTO office= , Wind River mobile 940.213.5533 [Powering 30 Years of In= novation] On Jan 24, 2014, at 12:54 PM, Banashankar KV > wrote: I was modifying a packet in pktgen_pcap_mbuf_ctor() and after modifying I w= anted to offload the checksum calculation to h/w so I am setting these flag= s in pktgen_pcap_mbuf_ctor function. m->pkt.vlan_macip.f.l2_len =3D sizeof(struct ether_hdr); = m->pkt.vlan_macip.f.l3_len =3D sizeof(struct ipv4_hdr); m->ol_flags =3D PKT_TX_IP_CKSUM I even tried with setting .txq_flags =3D 0 in rte_eth_txconf struct in pktg= en.c. But still not able to get the h/w checksum. Am I missing anything ? Thanks Banashankar -------------------------------------------------------------- Intel Shannon Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 Business address: Dromore House, East Park, Shannon, Co. Clare This e-mail and any attachments may contain confidential material for the s= ole use of the intended recipient(s). Any review or distribution by others = is strictly prohibited. If you are not the intended recipient, please conta= ct the sender and delete all copies.