From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp97.ord1c.emailsrvr.com (smtp97.ord1c.emailsrvr.com [108.166.43.97]) by dpdk.org (Postfix) with ESMTP id 71BE28D9E for ; Wed, 28 Oct 2015 07:50:26 +0100 (CET) Received: from smtp5.relay.ord1c.emailsrvr.com (localhost.localdomain [127.0.0.1]) by smtp5.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id DAE5B1803C9 for ; Wed, 28 Oct 2015 02:50:25 -0400 (EDT) Received: by smtp5.relay.ord1c.emailsrvr.com (Authenticated sender: padam.singh-AT-inventum.net) with ESMTPSA id 44FCA18021A for ; Wed, 28 Oct 2015 02:50:25 -0400 (EDT) X-Sender-Id: padam.singh@inventum.net Received: from [172.16.1.231] ([UNAVAILABLE]. [103.25.205.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:25 (trex/5.4.2); Wed, 28 Oct 2015 06:50:25 GMT From: Padam Jeet Singh Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <9E9D668A-17B5-4047-85B3-13519F898467@inventum.net> Date: Wed, 28 Oct 2015 12:20:22 +0530 To: "dev@dpdk.org" Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) X-Mailer: Apple Mail (2.2070.6) Subject: [dpdk-dev] Wrong TCP Checkum computed by hardware 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: Wed, 28 Oct 2015 06:50:26 -0000 Hi, While implementing a sample packet generation code, I am setting up the = offload flags so that the hardware (82599ES in my case) computes the IP = and TCP Checksums. However, it seems that only the IP checksum is = computed whereas the TCP Checksum is computed, but computed wrong. Here = is a snippet of what I doing: /* First reset all offload flags */ mbuf->ol_flags =3D (uint16_t) (mbuf->ol_flags & (~PKT_TX_OFFLOAD_MASK)); /* Then enable IP Checksum offload */ mbuf->ol_flags |=3D PKT_TX_IP_CKSUM; /* This is required to be set to 0 */ ipv4hdr->hdr_checksum =3D 0; mbuf->ol_flags |=3D PKT_TX_TCP_CKSUM; /* Compute the PSD header */ tcphdr->cksum =3D rte_ipv4_phdr_cksum(ipv4hdr); When I replace the checksum computation from hardware-offload to a = software implementation, the checksum computed is correct. I have = verified both the cases with Wireshark on the system receiving the = packets. Any hint what could I be doing wrong here? Thanks, Padam=