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 2349F42ECF for ; Thu, 20 Jul 2023 17:21:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0501F427F2; Thu, 20 Jul 2023 17:21:03 +0200 (CEST) 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 371DD40685 for ; Thu, 20 Jul 2023 17:21:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689866460; 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=CpuKH/s2IpMrTRl6iI1WAAm9hbk6Z+Q83Gj1cnzTbWg=; b=De6f8a1n1Tr68WMvT/sHoGvsNQd5DVXEfiqr4puGOt0b/Sm8E62sGKcOSZgrebNho7rCN4 6ofJIw/FBDhFE9WuVHH2pFCzu4AKo83HFFwXfJ1gKkZMTL3/aqZEL3hfkkhRHS5NAO81WM YNeWMD2MOwOrrkATGPvRT2H/lAGbnOI= 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-393-F7_LJqbLNpC4Tv6HRXjKkA-1; Thu, 20 Jul 2023 11:20:50 -0400 X-MC-Unique: F7_LJqbLNpC4Tv6HRXjKkA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 12028104D984; Thu, 20 Jul 2023 15:20:32 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB9F64A9004; Thu, 20 Jul 2023 15:20:30 +0000 (UTC) From: Kevin Traynor To: David Christensen Cc: Stephen Hemminger , Ferruh Yigit , dpdk stable Subject: patch 'net/tap: set locally administered bit for fixed MAC address' has been queued to stable release 21.11.5 Date: Thu, 20 Jul 2023 16:17:35 +0100 Message-ID: <20230720151942.262154-24-ktraynor@redhat.com> In-Reply-To: <20230720151942.262154-1-ktraynor@redhat.com> References: <20230720151942.262154-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 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.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/25/23. 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/aae992cbfb060f84c39dd3ac59b067ae35c097b3 Thanks. Kevin --- >From aae992cbfb060f84c39dd3ac59b067ae35c097b3 Mon Sep 17 00:00:00 2001 From: David Christensen Date: Tue, 25 Apr 2023 16:58:06 -0400 Subject: [PATCH] net/tap: set locally administered bit for fixed MAC address [ upstream commit c3006be2acab49c6b77ae9c9ef04b061e5dacbd6 ] When the tap driver is loaded and the user selects the optional "mac=fixed" setting, the tap driver incorrectly uses a globally unique EUI-48 identifier (as documented in RFC 7042) of 00:64:74:61:70:. Since this is a locally generated ID, the Local bit in the MAC address should be set to 1, resulting in the new address 02:64:74:61:70:. Bugzilla ID: 1198 Fixes: f6921783fee6 ("net/tap: add support for fixed MAC addresses") Signed-off-by: David Christensen Acked-by: Stephen Hemminger Acked-by: Ferruh Yigit --- doc/guides/nics/tap.rst | 8 ++++---- drivers/net/tap/rte_eth_tap.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/guides/nics/tap.rst b/doc/guides/nics/tap.rst index 681010d9ed..84ec805170 100644 --- a/doc/guides/nics/tap.rst +++ b/doc/guides/nics/tap.rst @@ -35,12 +35,12 @@ Using the option ``mac=fixed`` you can create a fixed known MAC address:: The MAC address will have a fixed value with the last octet incrementing by one for each interface string containing ``mac=fixed``. The MAC address is formatted -as 00:'d':'t':'a':'p':[00-FF]. Convert the characters to hex and you get the -actual MAC address: ``00:64:74:61:70:[00-FF]``. +as 02:'d':'t':'a':'p':[00-FF]. Convert the characters to hex and you get the +actual MAC address: ``02:64:74:61:70:[00-FF]``. - --vdev=net_tap0,mac="00:64:74:61:70:11" + --vdev=net_tap0,mac="02:64:74:61:70:11" The MAC address will have a user value passed as string. The MAC address is in format with delimiter ``:``. The string is byte converted to hex and you get -the actual MAC address: ``00:64:74:61:70:11``. +the actual MAC address: ``02:64:74:61:70:11``. It is possible to specify a remote netdevice to capture packets from by adding diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index e020a2417b..2dbb25f85d 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -2276,6 +2276,6 @@ set_mac_type(const char *key __rte_unused, static int iface_idx; - /* fixed mac = 00:64:74:61:70: */ - memcpy((char *)user_mac->addr_bytes, "\0dtap", + /* fixed mac = 02:64:74:61:70: */ + memcpy((char *)user_mac->addr_bytes, "\002dtap", RTE_ETHER_ADDR_LEN); user_mac->addr_bytes[RTE_ETHER_ADDR_LEN - 1] = -- 2.41.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-07-20 16:17:58.043203598 +0100 +++ 0024-net-tap-set-locally-administered-bit-for-fixed-MAC-a.patch 2023-07-20 16:17:54.497749838 +0100 @@ -1 +1 @@ -From c3006be2acab49c6b77ae9c9ef04b061e5dacbd6 Mon Sep 17 00:00:00 2001 +From aae992cbfb060f84c39dd3ac59b067ae35c097b3 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c3006be2acab49c6b77ae9c9ef04b061e5dacbd6 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index 2f7417bddd..07df0d35a2 100644 +index 681010d9ed..84ec805170 100644 @@ -47 +48 @@ -index 089ac202fa..bf98f75559 100644 +index e020a2417b..2dbb25f85d 100644 @@ -50 +51 @@ -@@ -2304,6 +2304,6 @@ set_mac_type(const char *key __rte_unused, +@@ -2276,6 +2276,6 @@ set_mac_type(const char *key __rte_unused,