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 CD964431A0 for ; Thu, 19 Oct 2023 02:00:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C7D204064C; Thu, 19 Oct 2023 02:00:29 +0200 (CEST) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mails.dpdk.org (Postfix) with ESMTP id AFA7240A6F for ; Thu, 19 Oct 2023 02:00:27 +0200 (CEST) Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-40806e4106dso1147715e9.1 for ; Wed, 18 Oct 2023 17:00:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697673627; x=1698278427; darn=dpdk.org; 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=KGd+Cfu1k/NKR2QUqvACdL3WdYthxonPVpGH2Kc0glQ=; b=Ibq+HJZb27uiBbQV+0L74SxDwUPlJoSiGxPkveZjWqtHG1MS7bojVUVmgLst+aEdiE putTDnnWbRAj+9w62X/3FCqYAYXMlZ2818E6XOx4WzS3FCzsxoUZiY/NH/BICOKqPlgx zTdaVdLrdT8pJ+apEx0z5E0Zu71zw8qthu9qZZAFyyQ2gfsVmt4s/RxZEEL1pe/z+jdB s1x0IDbp3mdHtDpxFPZ6Yucs2FJAT97uFPf3RFEWbu+M0tXp4wXwxuixKMr65I1am/zZ 0G0m/ajn6l+aGS6YvxWFSju13izPr1Mrq1SfYEHjtwdr9UTc7C9+m7dt3gOLVgKJJI/Z vkhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697673627; x=1698278427; 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=KGd+Cfu1k/NKR2QUqvACdL3WdYthxonPVpGH2Kc0glQ=; b=XCPc57yzwFlgBeBej4jFm10AKA4GoNeDMmGthGFxPdni4H8t+dfchLaQhy9GpZh/tl s2/VyDRGMJcqWCaqDlbPww9p9zDk/+YeGptBWWQ7pMQjFvorX6fIs0rT/7pnZGa2qQyE qoNzKCp1GUqwLDGxB7/bMUSyorcCUkb55AhZw0uZvXpsjSnYWwwNnzCCASwwskZBQj+V CqvSuhVWwKpJvE1wq0+g7aedr8ZTgz/JBgsnbCnSFS1a2oh9xmvCi1kgpMJkFA5a6kbx NZ9fvCLPPX1DI6e2LpapVzAWvVZFnkGatyttwWKNhM8tLJ0C0wTuwelzA9r/SEbZ4DbQ QwwA== X-Gm-Message-State: AOJu0YwDVQYNl0Jd9mpQCnfztxPRxBmX/j5/SLmuhkbqs8DJ4HuF1z1E NlnsS1kkP3Q1SW7Me7a38LBrMtSa2/cjrw== X-Google-Smtp-Source: AGHT+IG3UpSEHM2CCiDwtDMjQCuGBykRrOs4irmMcAJvJ8NJzKWeQN0LXReFb2mz/AoDXbSLHnbx4Q== X-Received: by 2002:a05:600c:1d16:b0:407:da06:2016 with SMTP id l22-20020a05600c1d1600b00407da062016mr252711wms.12.1697673627308; Wed, 18 Oct 2023 17:00:27 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id c16-20020a05600c0ad000b003fee567235bsm2903568wmr.1.2023.10.18.17.00.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 17:00:26 -0700 (PDT) From: luca.boccassi@gmail.com To: David Christensen Cc: Stephen Hemminger , Ferruh Yigit , dpdk stable Subject: patch 'net/tap: use MAC address parse API instead of local parser' has been queued to stable release 20.11.10 Date: Thu, 19 Oct 2023 00:59:06 +0100 Message-Id: <20231018235930.3144-17-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231018235930.3144-1-luca.boccassi@gmail.com> References: <20231018235930.3144-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.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/21/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/818515a917313547372a2bfe0be606bfbc9758fd Thanks. Luca Boccassi --- >From 818515a917313547372a2bfe0be606bfbc9758fd Mon Sep 17 00:00:00 2001 From: David Christensen Date: Tue, 3 Oct 2023 13:29:09 -0700 Subject: [PATCH] net/tap: use MAC address parse API instead of local parser [ upstream commit b79d825f32cb0012164b26428272b1ea268f839d ] Building DPDK with gcc 12 on a ppc64le system generates a stringop-overflow warning. Replace the local MAC address validation function parse_user_mac() with a call to rte_ether_unformat_addr() instead. Bugzilla ID: 1197 Signed-off-by: David Christensen Signed-off-by: Stephen Hemminger Acked-by: Ferruh Yigit --- drivers/net/tap/rte_eth_tap.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index faa95fab6e..e6dc870594 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -2256,29 +2256,6 @@ set_remote_iface(const char *key __rte_unused, return 0; } -static int parse_user_mac(struct rte_ether_addr *user_mac, - const char *value) -{ - unsigned int index = 0; - char mac_temp[strlen(ETH_TAP_USR_MAC_FMT) + 1], *mac_byte = NULL; - - if (user_mac == NULL || value == NULL) - return 0; - - strlcpy(mac_temp, value, sizeof(mac_temp)); - mac_byte = strtok(mac_temp, ":"); - - while ((mac_byte != NULL) && - (strlen(mac_byte) <= 2) && - (strlen(mac_byte) == strspn(mac_byte, - ETH_TAP_CMP_MAC_FMT))) { - user_mac->addr_bytes[index++] = strtoul(mac_byte, NULL, 16); - mac_byte = strtok(NULL, ":"); - } - - return index; -} - static int set_mac_type(const char *key __rte_unused, const char *value, @@ -2300,7 +2277,7 @@ set_mac_type(const char *key __rte_unused, goto success; } - if (parse_user_mac(user_mac, value) != 6) + if (rte_ether_unformat_addr(value, user_mac) < 0) goto error; success: TAP_LOG(DEBUG, "TAP user MAC param (%s)", value); -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-10-19 00:28:57.092133478 +0100 +++ 0017-net-tap-use-MAC-address-parse-API-instead-of-local-p.patch 2023-10-19 00:28:56.225804732 +0100 @@ -1 +1 @@ -From b79d825f32cb0012164b26428272b1ea268f839d Mon Sep 17 00:00:00 2001 +From 818515a917313547372a2bfe0be606bfbc9758fd Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b79d825f32cb0012164b26428272b1ea268f839d ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index bf98f75559..b25a52655f 100644 +index faa95fab6e..e6dc870594 100644 @@ -25 +26 @@ -@@ -2267,29 +2267,6 @@ set_remote_iface(const char *key __rte_unused, +@@ -2256,29 +2256,6 @@ set_remote_iface(const char *key __rte_unused, @@ -55 +56 @@ -@@ -2311,7 +2288,7 @@ set_mac_type(const char *key __rte_unused, +@@ -2300,7 +2277,7 @@ set_mac_type(const char *key __rte_unused,