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 8344AA0547; Fri, 12 Feb 2021 16:10:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E10122A2A1; Fri, 12 Feb 2021 16:10:32 +0100 (CET) Received: from mail1.bemta25.messagelabs.com (mail1.bemta25.messagelabs.com [195.245.230.67]) by mails.dpdk.org (Postfix) with ESMTP id 2461222A29E; Fri, 12 Feb 2021 16:10:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rbbn.com; s=rbbnselector03122020; t=1613142629; i=@rbbn.com; bh=Xob1Dd3y1pPvLyIjuHEDTSKC1jVEjjcORY57xMEsCJo=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=YiWte5v9PP+kd/Uomdv4POFgg56sVFWoALkjU/GsdJWMpd87el/2lQFL3pLYM0nm5 Zw3Dt4rsgvCyTrvoggF7NJkO9HZqVIfOEhEYq/q9mNuAf93tDCUb0j4pqQkUNmZhRF FU8Q8SJe8WT++oOgbRIuz0vA4gLdfHeLzWM8LkyibUaNWQhodiKqipMNYXyD8J8uDs eJplpClKmjyJdaOMv9UYjksgd+hxhRHshYJ4+pshex+f4B0EfGV1Day6xb+pRwwbS8 MK08gSlPgMglbZRhcVmvJxXCn5kBUjI77gzfblk37ZqZDVBTplnkO4opVx98jud3ES ccQQhqX1lZj8A== Received: from [100.112.196.73] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-3.bemta.az-b.eu-west-1.aws.symcld.net id C3/AD-42200-56A96206; Fri, 12 Feb 2021 15:10:29 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrCJsWRWlGSWpSXmKPExsWSoW+5Vjd1llq CwbJ37BZzV29gt3j3aTuTxZ0TLawWMw++YLeYf3Upu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jbV2GSFkca7m/6duZNv25q7ZxXYevuhr88fXHm2YyVx42v/psVl8j8try t/vzR/1wshxqfbq1QynVacnEhm0zXZhb5hFPsjkosxRmJhlrMRcWJAL4cvAJHBAAA X-Env-Sender: sodey@rbbn.com X-Msg-Ref: server-28.tower-291.messagelabs.com!1613142627!249949!1 X-Originating-IP: [104.47.57.173] X-SYMC-ESS-Client-Auth: mailfrom-relay-check=pass X-StarScan-Received: X-StarScan-Version: 9.60.3; banners=rbbn.com,-,- X-VirusChecked: Checked Received: (qmail 31929 invoked from network); 12 Feb 2021 15:10:28 -0000 Received: from mail-dm6nam11lp2173.outbound.protection.outlook.com (HELO NAM11-DM6-obe.outbound.protection.outlook.com) (104.47.57.173) by server-28.tower-291.messagelabs.com with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 12 Feb 2021 15:10:28 -0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TCw6mYM4BOXxC45ocXEyCs4/B2xRfg+/03QR3OMsYQUp1qoX1teGgKwGUtJSCgpkBPp1ST6RZGo/T6v27+10F4XsmWPZWd125U58b1EEzH/yNe8VORqQcRtD6Qd6D6iMAEHtlMod6gVOfA1Egk7q73sE1fAhOOgnUufUQPAain58M06CQ9+/2GHNPgBNbTuo5n2ZT2PwUH1PT6MYaaliQhLaQ1+8sSxVl2/GnOzp1ziTmM9F8yuWVi/LE/9OdrSaXRPGnvAoIkp75euRZk2pU+TQq43AMquLZR3kwjlyUYiuQabuncPzEPVxU5/M96JU7gpQ3IDsjFJzqzbC1ACQpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tUfgP4O+ujw+vjNAhqWjaRozBF+4k+SJFGdhUybal9w=; b=e8F3zZXm1NGBpPrrXMWqTv6qTwbvazYuVPUW9C0+2yZI7/QHO94l/SWTrn9MHCjHtsk0MFQrXVpx8m+pgfurpI9DjF9y3Tzff5buP9gnAu14VBrJdwOuud515FhrVQbuu3sIG2DYD1r4eGS3dL0bb5BPTxDBxBk+17GDqyq/zHbgutGopsU1+YK/+zJObXzkQcgXR81+R/LS+oc3Hf5/uNhvtVY+DncdVq1ycDc9iJ9nUK9vBaNb7CNOAglvI+AomI7jmBX1L3CgoyhBUDrnK4oRHnFup8ykIjaAGL+PuvqdrrNnQxEVzJC9qJS+2kvQM2Xf9l7X8yKY4UDGvgLPXA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=rbbn.com; dmarc=pass action=none header.from=rbbn.com; dkim=pass header.d=rbbn.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=SonusNetworks.onmicrosoft.com; s=selector2-SonusNetworks-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tUfgP4O+ujw+vjNAhqWjaRozBF+4k+SJFGdhUybal9w=; b=IPPKXXzBeVOEofI4uhEmzlUQ95mKdKPEY5jY96iXT2q0T1dIv+hgvxhvPvxcPwVmxp2MPvx8fuMZdM0+0qaN9e9yyvYYQ7nhD+LIFTI1K4B9aHdkFIjJZnCGxHKW4HVUg2001K0TsugsnDzYU4CuxUBAuhsqbZv6WMWcjDXlXrY= Received: from DM6PR03MB4777.namprd03.prod.outlook.com (2603:10b6:5:18b::26) by DM6PR03MB3417.namprd03.prod.outlook.com (2603:10b6:5:b0::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.27; Fri, 12 Feb 2021 15:10:26 +0000 Received: from DM6PR03MB4777.namprd03.prod.outlook.com ([fe80::3958:bb2f:f23e:f89e]) by DM6PR03MB4777.namprd03.prod.outlook.com ([fe80::3958:bb2f:f23e:f89e%7]) with mapi id 15.20.3846.031; Fri, 12 Feb 2021 15:10:26 +0000 From: "Dey, Souvik" To: viacheslavo@nvidia.com, shahafs@nvidia.com, matan@nvidia.com, rasland@nvidia.com, stable@dpdk.org Cc: christian.ehrhardt@canonical.com, dev@dpdk.org, Souvik Dey Date: Fri, 12 Feb 2021 10:10:08 -0500 Message-Id: <20210212151008.16948-1-sodey@rbbn.com> X-Mailer: git-send-email 2.9.3.windows.1 Content-Type: text/plain X-Originating-IP: [72.70.55.110] X-ClientProxiedBy: MN2PR14CA0007.namprd14.prod.outlook.com (2603:10b6:208:23e::12) To DM6PR03MB4777.namprd03.prod.outlook.com (2603:10b6:5:18b::26) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from SODEY-LMA.sonusnet.com (72.70.55.110) by MN2PR14CA0007.namprd14.prod.outlook.com (2603:10b6:208:23e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3846.26 via Frontend Transport; Fri, 12 Feb 2021 15:10:25 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d091785b-0324-4111-1915-08d8cf6853a0 X-MS-TrafficTypeDiagnostic: DM6PR03MB3417: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:873; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rqLn/laWAIERN+zozcFuHwE8NEo8acW6qWSu5MehvscrUCx02GnYuq8gG6qkSEgk5P/HWK4IF4Oua1dEc4Kq07woFEvbj3YtEAOcWBdtAQPOlrnPQjOCJFU8mBbjp/nPBN5AYEutT/4uRpHcTdQiL2QQpv/cmM8rhOET5z4c1U+Q+lClVaNX/Lk1FOh2juQkO6a/go0Cd2CS7EQVg68elnqfuWm6u0n82IWnn+Uo2LVXAMGPbwa3vTx9PaDm252CJtYcTWqQ34Ink84NeLRmXRhWeDsOgvlZ+0Jjmk/qdi5BSJl9dgU+etmWMZvu+5VV4SNin+0uAt7PcX2eouKOKI0PLvddDaUZKgC9TO9AFGe5AKdA0g1ywiIIsUqmNfhc9v/6QAtkQ+pC13MJvOchu4gimBNoJYsCYF+z27fCshdzZeLVead1F7jcERkiivOTSx1sFYOQ1ehqxWKJC/A7NH/NA/Tdc7/Y0oAZqqSU+Uh8+eOvxQPWLF1vJwFtSGVNc15AKJMK+yjKru98psLajg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR03MB4777.namprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(366004)(136003)(396003)(346002)(39860400002)(83380400001)(107886003)(36756003)(6486002)(6512007)(8676002)(52116002)(6666004)(26005)(478600001)(316002)(2906002)(86362001)(186003)(16526019)(1076003)(6506007)(8936002)(956004)(2616005)(66556008)(5660300002)(4326008)(66946007)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?TZUhZBi8QKx/NTyGuKS2NKmdYSLVIUqpC79f5vAJ1XfEUG2n7+EHQHAkxQSD?= =?us-ascii?Q?7/T5/zlvBEA1jQlNwSl6vUFkILeR3T0VzcwK+j+etxc+Gshd2fZVgnagEhEj?= =?us-ascii?Q?riJJ9acdKWkyle/s/Ef15GelWC8faRJtL65fs5HlnqZ/4YgkxS+iNqQjRDT8?= =?us-ascii?Q?u0mIeQ+AkGyQsHOmDHVa4v6v5jOV5fztxxgRSLlTu+2V/Y3ak69840IuivqO?= =?us-ascii?Q?ot30cFTDiyML3dyU4ZXXuFfLSGJ0dJIdErSkgzWJpLJxeR3DkcliyBb7KMQ4?= =?us-ascii?Q?NfZBdGr7RQ2Kcer0gUA+9STPcAX/AcBKzM46foyITHeI5xiWmAaBKlWRYW6h?= =?us-ascii?Q?f/PWvRrNJtTB00E2k2XBYnDpoSFSS6E6X+0QQNE4zY1P4ZrMojt+4PxuiO4w?= =?us-ascii?Q?t/Oz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M9RQLTOJDcov?= =?us-ascii?Q?QPcJMdj6GVwcY5cXaJ85hyXu?= X-OriginatorOrg: rbbn.com X-MS-Exchange-CrossTenant-Network-Message-Id: d091785b-0324-4111-1915-08d8cf6853a0 X-MS-Exchange-CrossTenant-AuthSource: DM6PR03MB4777.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2021 15:10:26.1093 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 29a671dc-ed7e-4a54-b1e5-8da1eb495dc3 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vCKKnNI+B9aep6fQyb6ZRwqQUgxiUCws8pQ6YoeOdPCGSM7pmxMBfwCwwCZJkxif X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR03MB3417 Subject: [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" From: Souvik Dey [ upstream commit 493f0bb51c1144eedcff2bba199cab1b64ff9fd0 ] As the internal MAC table is divided into Unicast and Multicast address sections, we should check the type of synched MAC address before storing 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 != MLX5_MAX_MAC_ADDRESSES) continue; - /* Find the first entry available. */ - for (j = 0; j != MLX5_MAX_MAC_ADDRESSES; ++j) { - if (rte_is_zero_ether_addr(&dev->data->mac_addrs[j])) { - dev->data->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 != MLX5_MAX_MAC_ADDRESSES; ++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.9.3.windows.1 Notice: This e-mail together with any attachments may contain information of Ribbon Communications Inc. and its Affiliates that is confidential and/or proprietary for the sole use of the intended recipient. Any review, disclosure, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and then delete all copies, including any attachments.