DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Non-working TX IP checksum offload
@ 2015-07-17 14:23 Angela Czubak
       [not found] ` <CAOysbxpcKiGRj3Dvb9CyRW1UABRCX0skmCyZa8vugbbsLrwoAA@mail.gmail.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Angela Czubak @ 2015-07-17 14:23 UTC (permalink / raw)
  To: dev

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 |= PKT_TX_IP_CKSUM|PKT_TX_IPV4;
ip_header->hdr_checksum = 0;
buffer->l3_len = sizeof(struct ipv4_hdr);
buffer->l2_len = 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
From aber@semihalf.com  Fri Jul 17 16:38:04 2015
Return-Path: <aber@semihalf.com>
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 <dev@dpdk.org>; Fri, 17 Jul 2015 16:38:04 +0200 (CEST)
Received: by wibud3 with SMTP id ud3so40924280wib.1
 for <dev@dpdk.org>; Fri, 17 Jul 2015 07:38:04 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:in-reply-to:references:from:date
 :message-id:subject:to:cc:content-type:content-transfer-encoding;
 bh=E8fxDH9ZFoTpjkN4M4Qa+8XKdNtPrRWU5Ye7jcuw+qE=;
 b=btd1xoDt2k8WqZqL4/xyOPVGw/VqwNKX+TBoCCWeV+Ynyeoh2lk1HvTW2+OjoCju+S
 wJ4mVszPXnrcDlZGvU8FzB5CFys/u2a5zINJhpq5HE6b+6rom0hnfTKl2TG19aIGwfHr
 xYrdc/JCcoxAKoEhe6a+TW1XI65T26YNrmrUiPWnCLm6xtFw6NrQpNKvvl0W8CjR1EDx
 xKusqigyzsvriW92/YGhgjiaCSeh1NeBNrBpvAttP/FWnzPi3eto0FtJfbpbBMK43+Z5
 /pKUHwiclbTATiGp/NBBMihrr5qTWoQabhliJHRaW4xpQtOXc4Fv+mbvnj63m+XoczLo
 wGnQ==
X-Gm-Message-State: ALoCoQlQYVQT8RD1kgXYdzrBLE/27cT2TReLIKBDohOwduZ9gDxZdzNsAe0vYbDZ5Ju1RaMXRNx8
X-Received: by 10.194.47.164 with SMTP id e4mr29473188wjn.157.1437143884560;
 Fri, 17 Jul 2015 07:38:04 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.27.187.197 with HTTP; Fri, 17 Jul 2015 07:37:45 -0700 (PDT)
In-Reply-To: <OFB88811EF.D6B426D3-ONC1257E85.0047E0C7-C1257E85.004F1301@pl.ibm.com>
References: <OFB88811EF.D6B426D3-ONC1257E85.0047E0C7-C1257E85.004F1301@pl.ibm.com>
From: Andriy Berestovskyy <aber@semihalf.com>
Date: Fri, 17 Jul 2015 16:37:45 +0200
Message-ID: <CAOysbxpcKiGRj3Dvb9CyRW1UABRCX0skmCyZa8vugbbsLrwoAA@mail.gmail.com>
To: Angela Czubak <ACzubak@pl.ibm.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] Non-working TX IP checksum offload
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 17 Jul 2015 14:38:05 -0000

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 <ACzubak@pl.ibm.com> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] Non-working TX IP checksum offload
       [not found] ` <CAOysbxpcKiGRj3Dvb9CyRW1UABRCX0skmCyZa8vugbbsLrwoAA@mail.gmail.com>
@ 2015-07-21 13:11   ` Angela Czubak
  0 siblings, 0 replies; 2+ messages in thread
From: Angela Czubak @ 2015-07-21 13:11 UTC (permalink / raw)
  To: Andriy Berestovskyy; +Cc: dev

Hi Andriy,

thank you, that solved it.

Regards,
Angela

Andriy Berestovskyy <aber@semihalf.com> wrote on 07/17/2015 04:37:45 PM:

> From: Andriy Berestovskyy <aber@semihalf.com>
> To: Angela Czubak/Poland/Contr/IBM@IBMPL, 
> Cc: dev@dpdk.org
> Date: 07/17/2015 04:38 PM
> Subject: Re: [dpdk-dev] Non-working TX IP checksum offload
> 
> Cześć 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 <ACzubak@pl.ibm.com> 
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 |= PKT_TX_IP_CKSUM|PKT_TX_IPV4;
> > ip_header->hdr_checksum = 0;
> > buffer->l3_len = sizeof(struct ipv4_hdr);
> > buffer->l2_len = 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
> 
> 
> 
> -- 
> Andriy Berestovskyy
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-21 13:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-17 14:23 [dpdk-dev] Non-working TX IP checksum offload Angela Czubak
     [not found] ` <CAOysbxpcKiGRj3Dvb9CyRW1UABRCX0skmCyZa8vugbbsLrwoAA@mail.gmail.com>
2015-07-21 13:11   ` Angela Czubak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).