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 A602B42CBC for ; Thu, 15 Jun 2023 03:34:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A08F640E0F; Thu, 15 Jun 2023 03:34:08 +0200 (CEST) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mails.dpdk.org (Postfix) with ESMTP id 401A440DDA for ; Thu, 15 Jun 2023 03:34:07 +0200 (CEST) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-3f8cc04c2adso13729065e9.3 for ; Wed, 14 Jun 2023 18:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686792847; x=1689384847; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fbnN30v/fpvQ9rRtOzfp7ApgGK5NSvVxVZpGRwdkCkI=; b=gcjL6rUEBcz8dnEOjzdlojtyIgJsEB/r+Jr0vkEHGbiTBsGPIQFMXbxSuDNzz9n7LZ QapVlxY1yUp49kwEqyLK0oM3yvwlBLxTmBvwWqdWM0HRXa89wZ6HzZ9Z3lePhNqZYwt4 bHDARIx+ruz/+r3m+9jqmJmXNpsmRjTDbdMbYohcxBJ4g0m2t3hW1pox8YDDy3ArDqdJ uDsu9O0Kx9efCYz4A68oIp+b57Gfn10OTyCz4eIiW48BoSIUw8R7Fr2LXn3SpR7CHAdq pX1X+kgpNTgqLmgkPck7yoj8fMr0NTIVA4MYhGikMC3gdkabX0AjIxpuyO5DdFkfLGg0 DAjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686792847; x=1689384847; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fbnN30v/fpvQ9rRtOzfp7ApgGK5NSvVxVZpGRwdkCkI=; b=Qun+m1dGEJ4+xiWuYRHEyS2Pf3j1f5v8rbGIZNBqBE25lKSWkuiq6ezWQF4ZfDw2M1 hu2PIz1asjDtYGn9K/s1pab/VmA1d+ZVz6Vg8e9DOgoUh3F8VaWHwKGlW2k7xof4kjEC eb9K3fwpOGHf/1OAaMP0QrlqBNT/s7zZtjVgaVEEj3Wu4gxzwa12xj/8wvWnhxUyIx8j rDI8pNYGBnNNr/i0+s2kk9/c3r8UglBdYDUeqAxY+GfrrY401Iwm/+rIlAae1Ysei74A 22nO6sghUmjXhXB+erPvXofr530ZFljl1yFCNzhIZFyLm8KKImUTz57nkiyLSeqcdZY5 rZ4g== X-Gm-Message-State: AC+VfDzYxf0hud9fcs2N5Uz+UQpXmufFocBGNJQEydzcwHwjT2MXYBxZ aqhGd+u+fFFWds2QSjNI4XlIYwEFhtih16nO X-Google-Smtp-Source: ACHHUZ6bOUe3gNjwd6Ww8xSpjsrbEAFp/WpN+/t+KB1TxHksxg1T7Q7hJTEidd+8MHhfZzt/eQNmPw== X-Received: by 2002:a1c:f70a:0:b0:3f5:d0b8:4a53 with SMTP id v10-20020a1cf70a000000b003f5d0b84a53mr14788597wmh.34.1686792846758; Wed, 14 Jun 2023 18:34:06 -0700 (PDT) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id w11-20020a1cf60b000000b003f7ff6b1201sm18725428wmc.29.2023.06.14.18.34.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 18:34:06 -0700 (PDT) From: luca.boccassi@gmail.com 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 20.11.9 Date: Thu, 15 Jun 2023 02:32:16 +0100 Message-Id: <20230615013258.1439718-21-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230615013258.1439718-1-luca.boccassi@gmail.com> References: <20230615013258.1439718-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 20.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/17/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/9ffeb66a7461e23e3d6b5a9647287fde77a47117 Thanks. Luca Boccassi --- >From 9ffeb66a7461e23e3d6b5a9647287fde77a47117 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 3ce696b605..77e25fec71 100644 --- a/doc/guides/nics/tap.rst +++ b/doc/guides/nics/tap.rst @@ -34,14 +34,14 @@ 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 ``remote=foo1``, for example:: diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index dcc12f32e7..faa95fab6e 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -2292,8 +2292,8 @@ set_mac_type(const char *key __rte_unused, if (!strncasecmp(ETH_TAP_MAC_FIXED, value, strlen(ETH_TAP_MAC_FIXED))) { 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] = iface_idx++ + '0'; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-06-15 01:56:35.881484865 +0100 +++ 0021-net-tap-set-locally-administered-bit-for-fixed-MAC-a.patch 2023-06-15 01:56:34.551540953 +0100 @@ -1 +1 @@ -From c3006be2acab49c6b77ae9c9ef04b061e5dacbd6 Mon Sep 17 00:00:00 2001 +From 9ffeb66a7461e23e3d6b5a9647287fde77a47117 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 3ce696b605..77e25fec71 100644 @@ -49 +50 @@ -index 089ac202fa..bf98f75559 100644 +index dcc12f32e7..faa95fab6e 100644 @@ -52 +53 @@ -@@ -2303,8 +2303,8 @@ set_mac_type(const char *key __rte_unused, +@@ -2292,8 +2292,8 @@ set_mac_type(const char *key __rte_unused,