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 03E2143829 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 F1C9942E23; Tue, 5 Mar 2024 16:36:14 +0100 (CET) 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 8C7D5410D3 for ; Tue, 5 Mar 2024 16:36:13 +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=gdO0faMVzD6/dMR/DYPYUYYBYcF0e3pjI2Qxi3fWpQI=; b=gfGQOo/Rqxj5YvCkM2x+PTK3orpxwfWzA1rV3N1/TzyofaXUyhIGbQxWmAWNfBHHGCVM5q k6F6U7bMTvGY1xyGEVFN0jxsJGFhaxtob2J4rlwQ53RtnFPup5QHe0qIhJQHr+MRmyOOjn PFcP2NsFFkXadabpAHDEllbdk8KTyAc= 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-588-jH0uJFMGN9WJSkapqEKkzg-1; Tue, 05 Mar 2024 10:36:09 -0500 X-MC-Unique: jH0uJFMGN9WJSkapqEKkzg-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 3D87A101CC6E; Tue, 5 Mar 2024 15:36:09 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.194.197]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9447E200AE7F; Tue, 5 Mar 2024 15:36:08 +0000 (UTC) From: Kevin Traynor To: Alan Elder Cc: Ferruh Yigit , dpdk stable Subject: patch 'net: add macros for VLAN metadata parsing' has been queued to stable release 21.11.7 Date: Tue, 5 Mar 2024 15:34:29 +0000 Message-ID: <20240305153449.263666-56-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/d100a5e79625ddcd2617f39b3147a16f658c0a70 Thanks. Kevin --- >From d100a5e79625ddcd2617f39b3147a16f658c0a70 Mon Sep 17 00:00:00 2001 From: Alan Elder Date: Mon, 19 Feb 2024 09:31:25 +0000 Subject: [PATCH] net: add macros for VLAN metadata parsing [ upstream commit b74087f15e16c42fe4ff9c4d603cc7a51a1aa1dc ] Add common macros for extracting parts of VLAN tag. Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Signed-off-by: Alan Elder Reviewed-by: Ferruh Yigit --- .mailmap | 1 + lib/net/rte_ether.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/.mailmap b/.mailmap index 5891d511a4..dde19c1fe8 100644 --- a/.mailmap +++ b/.mailmap @@ -32,4 +32,5 @@ Alain Leon Alan Carew Alan Dewar +Alan Elder Alan Liu Alan Winkowski diff --git a/lib/net/rte_ether.h b/lib/net/rte_ether.h index 3d9852d9e2..1d84fc1098 100644 --- a/lib/net/rte_ether.h +++ b/lib/net/rte_ether.h @@ -48,4 +48,18 @@ extern "C" { #define RTE_ETHER_MIN_MTU 68 /**< Minimum MTU for IPv4 packets, see RFC 791. */ +/* VLAN header fields */ +#define RTE_VLAN_DEI_SHIFT 12 +#define RTE_VLAN_PRI_SHIFT 13 +#define RTE_VLAN_PRI_MASK 0xe000 /* Priority Code Point */ +#define RTE_VLAN_DEI_MASK 0x1000 /* Drop Eligible Indicator */ +#define RTE_VLAN_ID_MASK 0x0fff /* VLAN Identifier */ + +#define RTE_VLAN_TCI_ID(vlan_tci) ((vlan_tci) & RTE_VLAN_ID_MASK) +#define RTE_VLAN_TCI_PRI(vlan_tci) (((vlan_tci) & RTE_VLAN_PRI_MASK) >> RTE_VLAN_PRI_SHIFT) +#define RTE_VLAN_TCI_DEI(vlan_tci) (((vlan_tci) & RTE_VLAN_DEI_MASK) >> RTE_VLAN_DEI_SHIFT) +#define RTE_VLAN_TCI_MAKE(id, pri, dei) ((id) | \ + ((pri) << RTE_VLAN_PRI_SHIFT) | \ + ((dei) << RTE_VLAN_DEI_SHIFT)) + /** * Ethernet address: -- 2.43.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 14:08:55.978579391 +0000 +++ 0056-net-add-macros-for-VLAN-metadata-parsing.patch 2024-03-05 14:08:54.700520898 +0000 @@ -1 +1 @@ -From b74087f15e16c42fe4ff9c4d603cc7a51a1aa1dc Mon Sep 17 00:00:00 2001 +From d100a5e79625ddcd2617f39b3147a16f658c0a70 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b74087f15e16c42fe4ff9c4d603cc7a51a1aa1dc ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index b2d0fc0729..12d2875641 100644 +index 5891d511a4..dde19c1fe8 100644 @@ -22 +23 @@ -@@ -35,4 +35,5 @@ Alan Brady +@@ -32,4 +32,5 @@ Alain Leon @@ -29 +30 @@ -index ce073ea818..75285bdd12 100644 +index 3d9852d9e2..1d84fc1098 100644 @@ -32 +33 @@ -@@ -47,4 +47,18 @@ extern "C" { +@@ -48,4 +48,18 @@ extern "C" {