From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by dpdk.org (Postfix) with ESMTP id 6DADB952 for ; Fri, 17 Jul 2015 16:23:46 +0200 (CEST) Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 17 Jul 2015 15:23:46 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 17 Jul 2015 15:23:42 +0100 X-Helo: d06dlp01.portsmouth.uk.ibm.com X-MailFrom: ACzubak@pl.ibm.com X-RcptTo: dev@dpdk.org Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id CDC3417D8059 for ; Fri, 17 Jul 2015 15:25:02 +0100 (BST) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t6HENgjF38928486 for ; Fri, 17 Jul 2015 14:23:42 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t6H9GRUW024871 for ; Fri, 17 Jul 2015 05:16:27 -0400 Received: from d06ml423.portsmouth.uk.ibm.com (d06ml423.portsmouth.uk.ibm.com [9.149.104.189]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t6H9GRYk024865 for ; Fri, 17 Jul 2015 05:16:27 -0400 To: dev@dpdk.org MIME-Version: 1.0 X-KeepSent: B88811EF:D6B426D3-C1257E85:0047E0C7; type=4; name=$KeepSent X-Mailer: Lotus Notes Release 8.5.3FP5 Septem 15, 2011 From: Angela Czubak Message-ID: Date: Fri, 17 Jul 2015 16:23:41 +0200 X-MIMETrack: Serialize by Router on D06ML423/06/M/IBM(Release 9.0.1FP3|January 12, 2015) at 17/07/2015 16:23:41, Serialize complete at 17/07/2015 16:23:41 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15071714-0021-0000-0000-000004A16E86 Content-Type: text/plain; charset="US-ASCII" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2015 14:23:46 -0000 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: 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) 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: References: From: Andriy Berestovskyy Date: Fri, 17 Jul 2015 16:37:45 +0200 Message-ID: To: Angela Czubak 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 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