From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by dpdk.org (Postfix) with ESMTP id 39A4227D for ; Tue, 26 Feb 2019 16:48:19 +0100 (CET) Received: by mail-pl1-f179.google.com with SMTP id v11so1002934plg.9 for ; Tue, 26 Feb 2019 07:48:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RG+ZJHrwtsvwJi3odND7X2DNcLjCvY+c+b0jlN7/dGs=; b=1wExvbImShVoyBCJ4juDGNdMg5MjoCeGVZcnuP5+oSxVrd3tDFAGHiHaj+CR9NlxJ/ qTH9RpFs7OKbLjhJVyg8sEFdtYY3t70yN+eLNQ0Ed2eFFpaFTxOxL0wVXiEm7LGVHKUn X+loEa8zNphPmyJQ9z72krBLujesCS8eMR1rB11Tg3fzVmc+ixnW4Z3wU5DtMEV/QGRZ +prnYcLoPt39B0KaYuLcT8FQS69LvRloYgak7p25mhEEsy6c86Hk9wGkt97Nw9ct5J8G LQMj1R8+OWaq+u63k/vTrvowBfM5ah+IkLYGOfTkYKROmykKoKOJolZBISTt/1E0fBDC 2WmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RG+ZJHrwtsvwJi3odND7X2DNcLjCvY+c+b0jlN7/dGs=; b=QxstQ89a924FnHVoTmoT+Gvoiw6vwqXiSOz7U1uH5XybQCpQmChD0UkxEoBam9yy76 +d3+Iw2AFKNUfEvlxMIVw7XjePokwmd2XPtvbo6d4jaoolbAvTE/pBBckPgXFGTV5ukE GCVuafzYH0SQ9gV1HARX6kCa/6xzOaFDGUeQ/LGtL3/2RPefO76bEAVQARxpEDfU0CKA VbsxblczfuPAzykhgm8vD8xoQJnP1+9xSb3CG3fPlZAXhvRiz7wWzyztdJlu9VbjnrEl dMPqHLqIndm0uI7WuNUB/UxOprAr1gAncTwkehv4nuLxF6P3wW/avkRfUmhcS2SJEZZq koYw== X-Gm-Message-State: AHQUAubpAvSFoVHOKFmr2Hz6868b5mEIO3hPkNJ06ND5CY8o6we/HyPP 6I/yIRDgf60tG3cQopXh+egtkPeHqUM= X-Google-Smtp-Source: AHgI3IZCcinwZO1Y0tWXn48P8gl8hrD0Wypur9oQiKFqbtvf4rHT650s0V5YBKXUUl7WH7oSLnK3eQ== X-Received: by 2002:a17:902:ea8c:: with SMTP id cv12mr26276482plb.123.1551196098355; Tue, 26 Feb 2019 07:48:18 -0800 (PST) Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id z127sm25733825pfb.80.2019.02.26.07.48.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Feb 2019 07:48:18 -0800 (PST) Date: Tue, 26 Feb 2019 07:48:15 -0800 From: Stephen Hemminger To: =?UTF-8?B?5a6L5o23?= Cc: "'users'" Message-ID: <20190226074815.6203533d@shemminger-XPS-13-9360> In-Reply-To: <5c74f8e3.1c69fb81.b9311.cde6SMTPIN_ADDED_BROKEN@mx.google.com> References: <5c74f8e3.1c69fb81.b9311.cde6SMTPIN_ADDED_BROKEN@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-users] How to make virtual NIC (virtio and vmxnet3) support IP header checksum? 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: Tue, 26 Feb 2019 15:48:19 -0000 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 vmxne= t3, > 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 will be > set correct value. but vmxnet3 and virtio just keep 0 for IP header > checksum.=20 >=20 > I disable above code and call rte_ipv4_cksum for each IP header checksum.= it > worked with vmxnet3 and virtio when TX slowly, but 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 vmx= net3 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.