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 C12D243829 for ; Tue, 5 Mar 2024 16:36:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 51B3D42E61; Tue, 5 Mar 2024 16:36:15 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 25295410D3 for ; Tue, 5 Mar 2024 16:36:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709652973; 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=9Et9xdCuRnEQKbrETh9O0bU6WJGvb1e6jZh6K7g15vo=; b=WY1aVrl1X79tE9K9xYAj0Kzr4xjQwTRIzWRKGwU8C2lrj31w+t6QaVetxcM/O4W8YH+V0u Zt+ZPu8+X1urquWAuWBhuyuv+vH/8gJ+pQSrv3lU3x25xkFuL5ykXDLQRXHEiZFvZcD0T+ 8AskrhLaB4Mu4Qr+wh19NiVfmNJSGhg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-563-fUhMAPZfMjWDB0vzs6B4Ag-1; Tue, 05 Mar 2024 10:36:10 -0500 X-MC-Unique: fUhMAPZfMjWDB0vzs6B4Ag-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 23D42800264; Tue, 5 Mar 2024 15:36:10 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.194.197]) by smtp.corp.redhat.com (Postfix) with ESMTP id 796D0200AE7F; Tue, 5 Mar 2024 15:36:09 +0000 (UTC) From: Kevin Traynor To: Alan Elder Cc: Ferruh Yigit , dpdk stable Subject: patch 'net/netvsc: fix VLAN metadata parsing' has been queued to stable release 21.11.7 Date: Tue, 5 Mar 2024 15:34:30 +0000 Message-ID: <20240305153449.263666-57-ktraynor@redhat.com> In-Reply-To: <20240305153449.263666-1-ktraynor@redhat.com> References: <20240305153449.263666-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 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.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/11/24. 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/7d331e7bd1bc0f69539c6b48b7ea732742b7dfcb Thanks. Kevin --- >From 7d331e7bd1bc0f69539c6b48b7ea732742b7dfcb Mon Sep 17 00:00:00 2001 From: Alan Elder Date: Mon, 19 Feb 2024 09:31:39 +0000 Subject: [PATCH] net/netvsc: fix VLAN metadata parsing [ upstream commit f7654c8c13f46ab537e8220ea4d6b4911f9f0fd5 ] The previous code incorrectly parsed the VLAN ID and priority. If the 16-bits of VLAN ID and priority/CFI on the wire was 0123456789ABCDEF the code parsed it as 456789ABCDEF3012. There were macros defined to handle this conversion but they were not used. Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Signed-off-by: Alan Elder Acked-by: Ferruh Yigit --- drivers/net/netvsc/hn_rxtx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c index 7a3bd523a5..aba206565d 100644 --- a/drivers/net/netvsc/hn_rxtx.c +++ b/drivers/net/netvsc/hn_rxtx.c @@ -615,5 +615,7 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb, if (info->vlan_info != HN_NDIS_VLAN_INFO_INVALID) { - m->vlan_tci = info->vlan_info; + m->vlan_tci = RTE_VLAN_TCI_MAKE(NDIS_VLAN_INFO_ID(info->vlan_info), + NDIS_VLAN_INFO_PRI(info->vlan_info), + NDIS_VLAN_INFO_CFI(info->vlan_info)); m->ol_flags |= RTE_MBUF_F_RX_VLAN_STRIPPED | RTE_MBUF_F_RX_VLAN; @@ -1335,5 +1337,7 @@ static void hn_encap(struct rndis_packet_msg *pkt, pi_data = hn_rndis_pktinfo_append(pkt, NDIS_VLAN_INFO_SIZE, NDIS_PKTINFO_TYPE_VLAN); - *pi_data = m->vlan_tci; + *pi_data = NDIS_VLAN_INFO_MAKE(RTE_VLAN_TCI_ID(m->vlan_tci), + RTE_VLAN_TCI_PRI(m->vlan_tci), + RTE_VLAN_TCI_DEI(m->vlan_tci)); } -- 2.43.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 14:08:56.000706478 +0000 +++ 0057-net-netvsc-fix-VLAN-metadata-parsing.patch 2024-03-05 14:08:54.701520900 +0000 @@ -1 +1 @@ -From f7654c8c13f46ab537e8220ea4d6b4911f9f0fd5 Mon Sep 17 00:00:00 2001 +From 7d331e7bd1bc0f69539c6b48b7ea732742b7dfcb Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit f7654c8c13f46ab537e8220ea4d6b4911f9f0fd5 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index e4f5015aa3..9bf1ec5509 100644 +index 7a3bd523a5..aba206565d 100644 @@ -25 +26 @@ -@@ -613,5 +613,7 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb, +@@ -615,5 +615,7 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb, @@ -34 +35 @@ -@@ -1333,5 +1335,7 @@ static void hn_encap(struct rndis_packet_msg *pkt, +@@ -1335,5 +1337,7 @@ static void hn_encap(struct rndis_packet_msg *pkt,