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 05DF6A0547 for ; Tue, 9 Feb 2021 11:36:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F24EE16070C; Tue, 9 Feb 2021 11:36:13 +0100 (CET) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mails.dpdk.org (Postfix) with ESMTP id 942CA40147 for ; Tue, 9 Feb 2021 11:36:11 +0100 (CET) Received: by mail-wm1-f46.google.com with SMTP id u14so2947099wmq.4 for ; Tue, 09 Feb 2021 02:36:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EyACCGa2oqlfd1GafufNonbclhnIPGWj3JikhARxKuI=; b=tc7FG23fLNDxo+Hg+rrHnv1PoB5ZMzLyL1TIQqb4iBYaf6KIO82M6YhfN/1vQkfpzw AtEv/evkN8JTGLB+Bbx8eifdWjRplValpnXYJWJMdk4LP6NuySdA6QBICkyfqlkO7OfW T7mcQ2JrAge1ePoU41li3tzxHr026RzNTiGYrV7RxX4w891dqfldGIGW0nRbxrLvd4WZ 4OVFELYkCUrtgUCZ05He0H4t8ewemrOGoesl7bdLP0uJ9MLSdkyT2H6W79UIlCFvQJ3h 0mc2vuyLAOEyRjlspzcaWvbEjG741QoHdudNFMTfS1bFimqPRW+cKeWiKu5/dwsCCrKG IsKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EyACCGa2oqlfd1GafufNonbclhnIPGWj3JikhARxKuI=; b=We9XVeXUadSMuSg9VAE3TvwBb+AH6GP0PFWCYUaLzZLTxfit7ijKpb9BzfhyoRgsCm d8v56zua5r7hXInZC820ENezLx46cVogQVv2k2we0S4UW/pn3v/smMplEkWIq9vWEsGf 27ARhm3kXk8T380TL33IaXrd3ct8u0+9j1VnzvRK2Bir0NQvT0Yn1thLdQeCG9ahcbd2 WuArtCNR+BwWQyNN/l7NAn3vuz48wEmypFMeYVzjbwXRk8KOvvUxUAEw86XArh725SxZ Diw252YdVS35z0k+5axbS4tZj5XO0bLAHXQwK4MzaMmIrKkgA7vjKaYwoxXzoMumuP/4 AnMA== X-Gm-Message-State: AOAM530w8lhFEH88EwbjBsQkL0svrkAcccGf8AZH392kTK3Xjddgmgk5 PRbegqHc2XsjC5nt/phSKbs= X-Google-Smtp-Source: ABdhPJzV4+VMxSHcLUyAM/IuAmkGKcOzCv9ghxJEdQtS3834XkTZcld+qGbHcIgS08YIvL1L/oZC3A== X-Received: by 2002:a1c:7913:: with SMTP id l19mr2763362wme.161.1612866971398; Tue, 09 Feb 2021 02:36:11 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id n5sm3577715wmq.7.2021.02.09.02.36.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 02:36:10 -0800 (PST) From: luca.boccassi@gmail.com To: Souvik Dey Cc: Viacheslav Ovsiienko , dpdk stable Date: Tue, 9 Feb 2021 10:35:12 +0000 Message-Id: <20210209103529.466775-14-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210209103529.466775-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> <20210209103529.466775-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'common/mlx5: fix storing synced MAC to internal table' has been queued to stable release 20.11.1 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/11/21. 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/c278f2836b54fcb218694754922f79194c920546 Thanks. Luca Boccassi --- >From c278f2836b54fcb218694754922f79194c920546 Mon Sep 17 00:00:00 2001 From: Souvik Dey Date: Tue, 2 Feb 2021 12:48:40 -0500 Subject: [PATCH] common/mlx5: fix storing synced MAC to internal table [ upstream commit 493f0bb51c1144eedcff2bba199cab1b64ff9fd0 ] As the internal MAC table is divided into Unicast and Multicast address sections, we should check the type of synced MAC address before storing it to the internal table. Currently the check is not done, and the synced MAC of 33:33:00:00:00:01 gets stored in the unicast section (mostly index 1) causing all subsequent mlx5_set_mc_addr_list() to fail with error -EADDRINUSE, as the mac_list contains the MAC 33:33:00:00:00:01. This denies adding of any new multicast address to the internal list and also fails to add the MAC address to the device in case of SR-IOV VF. Fixes: f22442cb5d42 ("net/mlx5: reduce Netlink commands dependencies") Fixes: ccdcba53a3f4 ("net/mlx5: use Netlink to add/remove MAC addresses") Signed-off-by: Souvik Dey Acked-by: Viacheslav Ovsiienko --- drivers/common/mlx5/linux/mlx5_nl.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/common/mlx5/linux/mlx5_nl.c b/drivers/common/mlx5/linux/mlx5_nl.c index 40d8620300..ef7a521379 100644 --- a/drivers/common/mlx5/linux/mlx5_nl.c +++ b/drivers/common/mlx5/linux/mlx5_nl.c @@ -758,11 +758,21 @@ mlx5_nl_mac_addr_sync(int nlsk_fd, unsigned int iface_idx, break; if (j != n) continue; - /* Find the first entry available. */ - for (j = 0; j != n; ++j) { - if (rte_is_zero_ether_addr(&mac_addrs[j])) { - mac_addrs[j] = macs[i]; - break; + if (rte_is_multicast_ether_addr(&macs[i])) { + /* Find the first entry available. */ + for (j = MLX5_MAX_UC_MAC_ADDRESSES; j != n; ++j) { + if (rte_is_zero_ether_addr(&mac_addrs[j])) { + mac_addrs[j] = macs[i]; + break; + } + } + } else { + /* Find the first entry available. */ + for (j = 0; j != MLX5_MAX_UC_MAC_ADDRESSES; ++j) { + if (rte_is_zero_ether_addr(&mac_addrs[j])) { + mac_addrs[j] = macs[i]; + break; + } } } } -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-09 10:34:58.483867458 +0000 +++ 0014-common-mlx5-fix-storing-synced-MAC-to-internal-table.patch 2021-02-09 10:34:57.886583539 +0000 @@ -1 +1 @@ -From 493f0bb51c1144eedcff2bba199cab1b64ff9fd0 Mon Sep 17 00:00:00 2001 +From c278f2836b54fcb218694754922f79194c920546 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 493f0bb51c1144eedcff2bba199cab1b64ff9fd0 ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org