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 B44B9A054F; Mon, 15 Feb 2021 17:42:10 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 747021606BA; Mon, 15 Feb 2021 17:42:10 +0100 (CET) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id 2F8AB160684 for ; Mon, 15 Feb 2021 17:42:09 +0100 (CET) Received: from mail-qk1-f199.google.com ([209.85.222.199]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lBgwq-0000yF-Jm for dev@dpdk.org; Mon, 15 Feb 2021 16:42:08 +0000 Received: by mail-qk1-f199.google.com with SMTP id i11so5801432qkn.21 for ; Mon, 15 Feb 2021 08:42:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Pn9yg4U7uVFJFLR13QsFjxiVoAQOvJOxENhf6wwV/ls=; b=pma8wDi5T7o8CN1k2Q9TEyTej37qPR4WQQjfGIuODCDgXEFl1ov2ubkhp5D42x7v18 klZDqZUyDt97TNn/+kiPrYypbLwqYUBblDhpP4pmkuL4bg5ymUZ9ZDp3ga9VcO6UUuSm SsTiUv41aqfqRgKDZWibzjBuXxrkOs+UxuWubVvF3JEl+qCfUnOTHUkT3rZKtm+RnDsU 2OlgGTPP80zzBtWnBlDNwl79i+3RJS3/6+Dom3zJewveXP0J/Wtv3q65wUAcMy9Tj9rE WS67f+a389h7iM+UL3TGo/7RrRhTRU38uwVhw2EfhrioHeIKvbiSWfZJ3/ZngqgD2ZjZ fQnw== X-Gm-Message-State: AOAM530OuKPT97SHiBEszOdPtcF8hnIQfaw4r4gFqDv5IE9ixxFAkYjI E5gpPydqjvq4FBC9Rupjy9GorogsqecBcIQG7ylrCTAuI56TA5YQMEP74vPwC5O2A8uJpyS7fBV jhyRnjf+X7zOehudfhofdJQyCOc6K4RunlaAg X-Received: by 2002:a05:620a:6d2:: with SMTP id 18mr15774498qky.33.1613407327637; Mon, 15 Feb 2021 08:42:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJzt3TFagYg9bTzoO+W9+O14P+J86E+7FWJBraERH95XtOV4htecJff3x118kuBFq1g8nKA2RO/tzoP1+7zL4vk= X-Received: by 2002:a05:620a:6d2:: with SMTP id 18mr15774474qky.33.1613407327374; Mon, 15 Feb 2021 08:42:07 -0800 (PST) MIME-Version: 1.0 References: <20210212151008.16948-1-sodey@rbbn.com> In-Reply-To: From: Christian Ehrhardt Date: Mon, 15 Feb 2021 17:41:41 +0100 Message-ID: To: "Dey, Souvik" Cc: viacheslavo@nvidia.com, shahafs@nvidia.com, matan@nvidia.com, rasland@nvidia.com, dpdk stable , dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH 19.11] net/mlx5: fix storing the synched MAC to internal table X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Feb 15, 2021 at 1:21 PM Christian Ehrhardt wrote: > > On Fri, Feb 12, 2021 at 4:10 PM Dey, Souvik wrote: > > > > From: Souvik Dey > > > > [ upstream commit 493f0bb51c1144eedcff2bba199cab1b64ff9fd0 ] > > Thanks, added > > > > > As the internal MAC table is divided into Unicast and Multicast address > > sections, we should check the type of synched MAC address before storin= g > > it to the internal table. Currently the check is not done, and the > > synched 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 > > --- > > drivers/net/mlx5/mlx5_nl.c | 21 ++++++++++++++++----- > > 1 file changed, 16 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/net/mlx5/mlx5_nl.c b/drivers/net/mlx5/mlx5_nl.c > > index 64580b9..add756d 100644 > > --- a/drivers/net/mlx5/mlx5_nl.c > > +++ b/drivers/net/mlx5/mlx5_nl.c > > @@ -678,11 +678,22 @@ mlx5_nl_mac_addr_sync(struct rte_eth_dev *dev) > > break; > > if (j !=3D MLX5_MAX_MAC_ADDRESSES) > > continue; > > - /* Find the first entry available. */ > > - for (j =3D 0; j !=3D MLX5_MAX_MAC_ADDRESSES; ++j) { > > - if (rte_is_zero_ether_addr(&dev->data->mac_addr= s[j])) { > > - dev->data->mac_addrs[j] =3D macs[i]; When built this fails, thereby for now I've dequeued this from 19.11.7 [ 708s] ../drivers/net/mlx5/mlx5_nl.c: In function =E2=80=98mlx5_nl_mac_ad= dr_sync=E2=80=99: [ 708s] ../drivers/net/mlx5/mlx5_nl.c:685:33: error: =E2=80=98mac_addrs=E2= =80=99 undeclared (first use in this function); did you mean =E2=80=98vec_adds=E2= =80=99? [ 708s] if (rte_is_zero_ether_addr(&mac_addrs[j])) { [ 708s] ^~~~~~~~~ [ 708s] vec_adds [ 708s] ../drivers/net/mlx5/mlx5_nl.c:685:33: note: each undeclared identifier is reported only once for each function it appears in [ 708s] ninja: build stopped: subcommand failed. If you have a chance to refresh your backport with the 19.11 codebase in mind that would be great. Looking for an updated backport and thanks in advance. > > - break; > > + if (rte_is_multicast_ether_addr(&macs[i])) { > > + /* Find the first entry available. */ > > + for (j =3D MLX5_MAX_UC_MAC_ADDRESSES; > > + j !=3D MLX5_MAX_MAC_ADDRESSES; ++j) { > > + if (rte_is_zero_ether_addr(&mac_addrs[j= ])) { > > + mac_addrs[j] =3D macs[i]; > > + break; > > + } > > + } > > + } else { > > + /* Find the first entry available. */ > > + for (j =3D 0; j !=3D MLX5_MAX_UC_MAC_ADDRESSES;= ++j) { > > + if (rte_is_zero_ether_addr(&mac_addrs[j= ])) { > > + mac_addrs[j] =3D macs[i]; > > + break; > > + } > > } > > } > > } > > -- > > 2.9.3.windows.1 > > > > > > Notice: This e-mail together with any attachments may contain informati= on of Ribbon Communications Inc. and its Affiliates that is confidential an= d/or proprietary for the sole use of the intended recipient. Any review, di= sclosure, reliance or distribution by others or forwarding without express = permission is strictly prohibited. If you are not the intended recipient, p= lease notify the sender immediately and then delete all copies, including a= ny attachments. > > > > -- > Christian Ehrhardt > Staff Engineer, Ubuntu Server > Canonical Ltd --=20 Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd