From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8FFB0A04F0 for ; Tue, 10 Dec 2019 16:00:56 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8840C1BECF; Tue, 10 Dec 2019 16:00:56 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 5AA291BECF for ; Tue, 10 Dec 2019 16:00:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575990054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DcuklkmlHrtsTUWsFg9j1z3ynW6i5ezIiBDpGkFD5qM=; b=MSn/cPgXUIWFGP9JiFomk0SVlRC19BvOfQqmUYV2iwqRbNauueATcRXykljonvwmbreX0B SOPI8WApZL58byYd04iR/hbYyU7Kq8+dzxWpI9O8sMdcIedBWzdmyaoxUJR3SjU5aVAOiT nzdNwfnLqN6s1VkHKaCv8Z0rHm4cw/c= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-211-k3AO0QHbM-a_kiod4Hiv_A-1; Tue, 10 Dec 2019 10:00:51 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 345901883528; Tue, 10 Dec 2019 15:00:50 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-64.ams2.redhat.com [10.36.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 098B65D9C5; Tue, 10 Dec 2019 15:00:48 +0000 (UTC) From: Kevin Traynor To: Flavio Leitner Cc: Maxime Coquelin , dpdk stable Date: Tue, 10 Dec 2019 14:59:05 +0000 Message-Id: <20191210145937.32755-31-ktraynor@redhat.com> In-Reply-To: <20191210145937.32755-1-ktraynor@redhat.com> References: <20191210145937.32755-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: k3AO0QHbM-a_kiod4Hiv_A-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'vhost: fix IPv4 checksum' has been queued to LTS release 18.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/16/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/63e3d795a7688b7d68= 03a75ca675012bca930f9d Thanks. Kevin. --- >From 63e3d795a7688b7d6803a75ca675012bca930f9d Mon Sep 17 00:00:00 2001 From: Flavio Leitner Date: Thu, 24 Oct 2019 13:29:19 -0300 Subject: [PATCH] vhost: fix IPv4 checksum [ upstream commit 84c39beb2fdbef86b917a18ade8d2e2baa3de732 ] Currently the IPv4 header checksum is calculated including its current value, which can be a valid checksum or just garbage. In any case, if the original value is not zero, then the result is always wrong. The IPv4 checksum is defined in RFC791, page 14 says: Header Checksum: 16 bits The checksum algorithm is: The checksum field is the 16 bit one's complement of the one's complement sum of all 16 bit words in the header. For purposes of computing the checksum, the value of the checksum field is zero. Thus force the csum field to always be zero. Fixes: b08b8cfeb2ae ("vhost: fix IP checksum") Signed-off-by: Flavio Leitner Reviewed-by: Maxime Coquelin --- lib/librte_vhost/virtio_net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index a6576891a..740db2ed7 100644 --- a/lib/librte_vhost/virtio_net.c +++ b/lib/librte_vhost/virtio_net.c @@ -269,4 +269,5 @@ virtio_enqueue_offload(struct rte_mbuf *m_buf, struct v= irtio_net_hdr *net_hdr) =09=09ipv4_hdr =3D rte_pktmbuf_mtod_offset(m_buf, struct ipv4_hdr *, =09=09=09=09=09=09 m_buf->l2_len); +=09=09ipv4_hdr->hdr_checksum =3D 0; =09=09ipv4_hdr->hdr_checksum =3D rte_ipv4_cksum(ipv4_hdr); =09} --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-10 14:49:41.209899453 +0000 +++ 0031-vhost-fix-IPv4-checksum.patch=092019-12-10 14:49:39.046457879 +000= 0 @@ -1 +1 @@ -From 84c39beb2fdbef86b917a18ade8d2e2baa3de732 Mon Sep 17 00:00:00 2001 +From 63e3d795a7688b7d6803a75ca675012bca930f9d Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 84c39beb2fdbef86b917a18ade8d2e2baa3de732 ] + @@ -22 +23,0 @@ -Cc: stable@dpdk.org @@ -31 +32 @@ -index eae7825f0..cde7498c7 100644 +index a6576891a..740db2ed7 100644 @@ -34,2 +35,2 @@ -@@ -446,4 +446,5 @@ virtio_enqueue_offload(struct rte_mbuf *m_buf, struct = virtio_net_hdr *net_hdr) - =09=09ipv4_hdr =3D rte_pktmbuf_mtod_offset(m_buf, struct rte_ipv4_hdr *, +@@ -269,4 +269,5 @@ virtio_enqueue_offload(struct rte_mbuf *m_buf, struct = virtio_net_hdr *net_hdr) + =09=09ipv4_hdr =3D rte_pktmbuf_mtod_offset(m_buf, struct ipv4_hdr *,