From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andriy Berestovskyy Subject: Re: Non-working TX IP checksum offload Date: Fri, 17 Jul 2015 16:37:45 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org To: Angela Czubak Return-path: Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by dpdk.org (Postfix) with ESMTP id B6B935A79 for ; Fri, 17 Jul 2015 16:38:04 +0200 (CEST) Received: by wibud3 with SMTP id ud3so40924280wib.1 for ; Fri, 17 Jul 2015 07:38:04 -0700 (PDT) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Cze=C5=9B=C4=87 Angela, Make sure your NIC is configured properly as described in this thread: http://dpdk.org/ml/archives/dev/2015-May/018096.html Andriy On Fri, Jul 17, 2015 at 4:23 PM, Angela Czubak wrote: > Hi, > > I have some difficulties using ip checksum tx offload capabilities - I > think I set everything as advised by the API documentation, but > unfortunately the packet leaves the interface with its ip checksum still > being zero (it reaches its destination). > > What I do is: > buffer->ol_flags |=3D PKT_TX_IP_CKSUM|PKT_TX_IPV4; > ip_header->hdr_checksum =3D 0; > buffer->l3_len =3D sizeof(struct ipv4_hdr); > buffer->l2_len =3D sizeof(struct ether_hdr); > > In L4 there's UDP, which checksum is zeroed if that matters. > > Is there something I am missing? The NIC is Intel Corporation Ethernet > Controller X710 for 10GbE SFP+ (rev 01). > > What is more, is there any particular reason for assuming in > i40e_xmit_pkts that offloading checksums is unlikely (I mean the line no > 1307 "if (unlikely(ol_flags & I40E_TX_CKSUM_OFFLOAD_MASK))" at > dpdk-2.0.0/lib/librte_pmd_i40e/i40e_rxtx.c)? > > Regards, > Angela --=20 Andriy Berestovskyy