From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp105.iad3b.emailsrvr.com (smtp105.iad3b.emailsrvr.com [146.20.161.105]) by dpdk.org (Postfix) with ESMTP id 11C118DAF for ; Sun, 17 Jun 2018 21:00:29 +0200 (CEST) Received: from smtp22.relay.iad3b.emailsrvr.com (localhost [127.0.0.1]) by smtp22.relay.iad3b.emailsrvr.com (SMTP Server) with ESMTP id 813B160070; Sun, 17 Jun 2018 15:00:28 -0400 (EDT) X-Auth-ID: padam.singh@inventum.net Received: by smtp22.relay.iad3b.emailsrvr.com (Authenticated sender: padam.singh-AT-inventum.net) with ESMTPSA id 5A3796006F; Sun, 17 Jun 2018 15:00:27 -0400 (EDT) X-Sender-Id: padam.singh@inventum.net Received: from [192.168.1.36] ([UNAVAILABLE]. [49.207.100.198]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:25 (trex/5.7.12); Sun, 17 Jun 2018 15:00:28 -0400 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) From: Padam Jeet Singh In-Reply-To: <20180617094626.2d72413f@xeon-e3> Date: Mon, 18 Jun 2018 00:30:15 +0530 Cc: dev@dpdk.org, yongwang@vmware.com Content-Transfer-Encoding: quoted-printable Message-Id: References: <45FFB08E-61C4-456F-A332-0881B6BF2BE3@inventum.net> <20180617094626.2d72413f@xeon-e3> To: Stephen Hemminger X-Mailer: Apple Mail (2.3445.8.2) Subject: Re: [dpdk-dev] vmxnet3 TX TCP/UDP checksum not getting computed with L2_len > 14 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2018 19:00:29 -0000 > On 17-Jun-2018, at 10:16 PM, Stephen Hemminger = wrote: >=20 > On Sun, 17 Jun 2018 14:55:06 +0530 > Padam Jeet Singh wrote: >=20 >> Hello, >>=20 >> Issue observed when using vmxnet3 based interface on packet with = following structure is sent: >>=20 >> Ethernet + PPPoE + PPP (22 bytes) as the Layer 2 header,=20 >> IPv4 (20)=20 >> UDP >> DNS Payload >>=20 >> The tx offload value in this case is 0x0f0000000000000 (PKT_TX_IPV4 = | PKT_TX_IP_CKSUM | PKT_TX_UDP_CKSUM) >>=20 >> The checksum of the packet seen by the receiver shows incorrect = checksum and it=E2=80=99s value is the pseudo checksum value that was = set at the time of the TX. However the IP header checksum is correct. >>=20 >> The same issue is not seen when the L2 header is a just the Ethernet = (14 bytes). >>=20 >> Also, with the same setup on the same hardware if we switch the = driver from vmxnet3 to e1000e, all checksums are computed correctly. >>=20 >> Is this a DPDK vmxnet3 driver bug or that of underlying esxi? The = ESXi version is 6.0.0 (Build 3620759). >>=20 >> Thanks, >> Padam >=20 > I don't think VMWare supports IP checksum offload. Since IP checksum = is trivial and in cache, > the IP header checksum offload is usually not a speed up anyway. Linux = for example, never does > IP header checksum offload. It=E2=80=99s not the IP checksum - it=E2=80=99s the TCP/UDP checksum = (L4) that=E2=80=99s not getting computed. In fact the IP checksum is = coming correctly because we are handing it in software. The driver when = queried returns TX offload flags with the IP header checksum bit off, = but L4 checksum (TCP & UDP) are available. The UDP checksum gets = computed correctly if and only if the l2_len is 14. In case of other = encapsulations, e.g. pppoe (l2_len=3D22), this checksum computation is = being skipped and the packet is simply sent out with the pseudo checksum = value of the IP header.=20=