From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpbguseast2.qq.com (smtpbguseast2.qq.com [54.204.34.130]) by dpdk.org (Postfix) with ESMTP id 3DE1F2BB8 for ; Wed, 27 Feb 2019 03:40:20 +0100 (CET) X-QQ-mid: bizesmtp12t1551235213takl4n8j Received: from DESKTOPDQ7VDGF (unknown [202.106.72.206]) by esmtp6.qq.com (ESMTP) with id ; Wed, 27 Feb 2019 10:40:12 +0800 (CST) X-QQ-SSF: 00400000000000B0D210B00A0000000 X-QQ-FEAT: 3rrtyEm/zAZ0QFDQRO76Jk+ZWAs5wM2eDmECIb/JMqivsr0P2ntVmxKgPqzow rnVwYRaVMOjc2FGr7FlTpPPHHdr20+lugLtixkyOMgt2yVORpgEAWf5SaNeIrS0kLwJILG2 DMcwmd4gHaYTQOGSh7FxB0XQ+CpK4z6vWGAdAebii9QOr4bTFppWPkQMKzpw2ZszwgYP3be CL+fmh0MnPUdKw+b2a7AjTL81ar1rtSbVvXX4X0QIIOlN1hJWFDvnnyHAW5xSOAUnDem6sy 01L70M948MtDd9ZZhgt7AWKKZvs84VWK/xhg== X-QQ-GoodBg: 2 From: =?UTF-8?B?5a6L5o23?= To: "'Stephen Hemminger'" Cc: "'users'" References: <5c74f8e3.1c69fb81.b9311.cde6SMTPIN_ADDED_BROKEN@mx.google.com> <20190226074815.6203533d@shemminger-XPS-13-9360> In-Reply-To: <20190226074815.6203533d@shemminger-XPS-13-9360> Date: Wed, 27 Feb 2019 10:40:10 +0800 Message-ID: <000501d4ce45$c28294f0$4787bed0$@zctt.com>+31E35DEBAAE50FE7 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQGltHmbJHMRXH+aVP/MZC/92YMSLwE9/9hZpkcVtLA= Content-Language: zh-cn X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:zctt.com:qybgforeign:qybgforeign4 X-QQ-Bgrelay: 1 Subject: [dpdk-users] =?utf-8?b?562U5aSNOiAgSG93IHRvIG1ha2UgdmlydHVhbCBO?= =?utf-8?q?IC_=28virtio_and_vmxnet3=29_support_IP_header_checksum?= =?utf-8?q?=3F?= X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2019 02:40:22 -0000 Thanks,=20 I run testpmd for checking tx_offload capabilities, Virtio do not = support IP checksum. vmxnet3 can't start by testpmd, I need send another email about this. Thanks Jie -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- =E5=8F=91=E4=BB=B6=E4=BA=BA: Stephen Hemminger = [mailto:stephen@networkplumber.org]=20 =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2019=E5=B9=B42=E6=9C=8826=E6=97=A5 = 23:48 =E6=94=B6=E4=BB=B6=E4=BA=BA: =E5=AE=8B=E6=8D=B7 =E6=8A=84=E9=80=81: 'users' =E4=B8=BB=E9=A2=98: Re: [dpdk-users] How to make virtual NIC (virtio and = vmxnet3) support IP header checksum? On Tue, 26 Feb 2019 16:29:00 +0800 =E5=AE=8B=E6=8D=B7 wrote: > Hi All >=20 > I test the DPDK virtual nics both in Esxi and KVM, I used DPDK =20 > vmxnet3, virtio and e1000 nic. I need create IP packets and TX them. >=20 > =20 >=20 > I set the rte_mbuf as below before TX. >=20 > mb->l2_len =3D len(out_eth) >=20 > mb->l3_len =3D len(out_ip) >=20 > mb->ol_flags |=3D PKT_TX_IPV4 | PKT_TX_IP_CSUM >=20 > =20 >=20 > It worked well with DPDK virtual e1000 nic, the IP header checksum=20 > will be set correct value. but vmxnet3 and virtio just keep 0 for IP=20 > header checksum. >=20 > I disable above code and call rte_ipv4_cksum for each IP header=20 > checksum. it worked with vmxnet3 and virtio when TX slowly, but=20 > checksum invalid once TX quicklyL >=20 > =20 >=20 > Why the DPDK vmxnet3 and virtio drivers don't support IP checksum? >=20 > If there=E2=80=99s an easy way for adding the IP header checksum with = vmxnet3=20 > and virtio ? >=20 > =20 >=20 > =20 >=20 > Thanks >=20 > =20 >=20 > Jie >=20 You need to look at the TX_OFFLOAD capability flags in dev_info. Many drivers do not support IP checksum offload.