From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 49A99A0093 for ; Tue, 10 May 2022 14:30:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 441A34282B; Tue, 10 May 2022 14:30:39 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id DFC184282B for ; Tue, 10 May 2022 14:30:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652185837; 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=LQqvhlp2b6cviy02wAEj20dTavc4tca4WSAf4J/ASG8=; b=eU2hHgFi+v7RtFjwxsi+LcdEklq2fsuPxUiiwv43bBHFTNVwrSu3D0l5g5C3q1Okq9mNxK Lak+i0bOuxlTXXz7qEesR8S3fPvt0gdEQAusy+mruSOlnv92WhJeQEj2b/XNeb4xYcXgpU dRbmtwMK2nGIcd8zuExS79N9t6/dt8I= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-454-K7-GztyRN9uHpuZRLcJvKA-1; Tue, 10 May 2022 08:30:33 -0400 X-MC-Unique: K7-GztyRN9uHpuZRLcJvKA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 47D7C811E7A; Tue, 10 May 2022 12:30:33 +0000 (UTC) Received: from rh.Home (unknown [10.39.195.199]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0F69940CFD19; Tue, 10 May 2022 12:30:31 +0000 (UTC) From: Kevin Traynor To: Long Li Cc: Stephen Hemminger , Ferruh Yigit , dpdk stable Subject: patch 'net/netvsc: fix calculation of checksums based on mbuf flag' has been queued to stable release 21.11.2 Date: Tue, 10 May 2022 13:29:47 +0100 Message-Id: <20220510123010.159523-10-ktraynor@redhat.com> In-Reply-To: <20220510123010.159523-1-ktraynor@redhat.com> References: <20220510123010.159523-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 21.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/15/22. 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 rebasing (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 This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/550f0d82881008e4240fc1f9839e04283aae4b0b Thanks. Kevin --- >From 550f0d82881008e4240fc1f9839e04283aae4b0b Mon Sep 17 00:00:00 2001 From: Long Li Date: Thu, 24 Mar 2022 10:46:08 -0700 Subject: [PATCH] net/netvsc: fix calculation of checksums based on mbuf flag [ upstream commit 559a1f2eeaaddccc83e1668a8ee375c34699e48b ] The netvsc should use RTE_MBUF_F_TX_L4_MASK and check the masked value to decide the correct way to calculate checksums. Not checking for RTE_MBUF_F_TX_L4_MASK results in incorrect RNDIS packets sent to VSP and incorrect checksums calculated by the VSP. Fixes: 4e9c73e96e ("net/netvsc: add Hyper-V network device") Signed-off-by: Long Li Acked-by: Stephen Hemminger Reviewed-by: Ferruh Yigit --- drivers/net/netvsc/hn_rxtx.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c index 50ca1710ef..bf33bb031e 100644 --- a/drivers/net/netvsc/hn_rxtx.c +++ b/drivers/net/netvsc/hn_rxtx.c @@ -1349,6 +1349,9 @@ static void hn_encap(struct rndis_packet_msg *pkt, m->tso_segsz); } - } else if (m->ol_flags & - (RTE_MBUF_F_TX_TCP_CKSUM | RTE_MBUF_F_TX_UDP_CKSUM | RTE_MBUF_F_TX_IP_CKSUM)) { + } else if ((m->ol_flags & RTE_MBUF_F_TX_L4_MASK) == + RTE_MBUF_F_TX_TCP_CKSUM || + (m->ol_flags & RTE_MBUF_F_TX_L4_MASK) == + RTE_MBUF_F_TX_UDP_CKSUM || + (m->ol_flags & RTE_MBUF_F_TX_IP_CKSUM)) { pi_data = hn_rndis_pktinfo_append(pkt, NDIS_TXCSUM_INFO_SIZE, NDIS_PKTINFO_TYPE_CSUM); @@ -1364,7 +1367,9 @@ static void hn_encap(struct rndis_packet_msg *pkt, } - if (m->ol_flags & RTE_MBUF_F_TX_TCP_CKSUM) + if ((m->ol_flags & RTE_MBUF_F_TX_L4_MASK) == + RTE_MBUF_F_TX_TCP_CKSUM) *pi_data |= NDIS_TXCSUM_INFO_MKTCPCS(hlen); - else if (m->ol_flags & RTE_MBUF_F_TX_UDP_CKSUM) + else if ((m->ol_flags & RTE_MBUF_F_TX_L4_MASK) == + RTE_MBUF_F_TX_UDP_CKSUM) *pi_data |= NDIS_TXCSUM_INFO_MKUDPCS(hlen); } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-05-10 13:24:21.843134234 +0100 +++ 0010-net-netvsc-fix-calculation-of-checksums-based-on-mbu.patch 2022-05-10 13:24:21.572646319 +0100 @@ -1 +1 @@ -From 559a1f2eeaaddccc83e1668a8ee375c34699e48b Mon Sep 17 00:00:00 2001 +From 550f0d82881008e4240fc1f9839e04283aae4b0b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 559a1f2eeaaddccc83e1668a8ee375c34699e48b ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 3e3488f1b8..1afc14f280 100644 +index 50ca1710ef..bf33bb031e 100644 @@ -26 +27 @@ -@@ -1347,6 +1347,9 @@ static void hn_encap(struct rndis_packet_msg *pkt, +@@ -1349,6 +1349,9 @@ static void hn_encap(struct rndis_packet_msg *pkt, @@ -38 +39 @@ -@@ -1362,7 +1365,9 @@ static void hn_encap(struct rndis_packet_msg *pkt, +@@ -1364,7 +1367,9 @@ static void hn_encap(struct rndis_packet_msg *pkt,