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 D7A3DA054D; Wed, 17 Feb 2021 22:03:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4828A4069D; Wed, 17 Feb 2021 22:03:43 +0100 (CET) Received: from mail1.bemta25.messagelabs.com (mail1.bemta25.messagelabs.com [195.245.230.68]) by mails.dpdk.org (Postfix) with ESMTP id A7D5040691; Wed, 17 Feb 2021 22:03:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rbbn.com; s=rbbnselector03122020; t=1613595821; i=@rbbn.com; bh=qFCpdCHSRP0ms6WbvFyFdO/sH4HcDmjukTRuBBN3sqU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=s9JLezlWtRLPd6BG2x/wSWM+GjMFFRLDzOI+rgNG4+oG2SPL/WSyTxWnqLc9ZeVhF gb5tq874M7H4Wydf+sqI5oaKXgcwubHkdeZLgOHnzlCQANzi2QX7zAFaIJYzsqKENr nvK9hNn7l0YRgI08Xs/KqpdAabRULphr1Ns5SOaLoQWG5DQlvQLwn4dTCgSXvExniV GfoOTqXbE+cOIKDjCab7S4V2EgtectnXT76KFvhL5NaWuP7S2675TUXjHX4AMc/2Wk V+1AxzVuitkC97Sl7fy1jfL/oigyVKiCQhVs2rUOEBY08kIoLRgzNmOyd16+iAxACx W44BPRgewewQg== Received: from [100.112.197.83] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-4.bemta.az-b.eu-west-1.aws.symcld.net id FB/DB-64503-CA48D206; Wed, 17 Feb 2021 21:03:40 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrCJsWRWlGSWpSXmKPExsWSoW+1UXdNi26 CwZRGPou5qzewW7z7tJ3J4s6JFlaLmQdf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Xnd21vp4 y+w7P/Tj23T2OrbFO5C9erG/cCdSyncD+UWbBCkc9DUNvUeCvTSZbzjdWzOCWLKuT+fWsI0eH /pNe7kPPqk7gn59aaWIhemHxLfEOZ33Gt9zeUWIozEg21mIuKEwFL37UgRwQAAA== X-Env-Sender: sodey@rbbn.com X-Msg-Ref: server-33.tower-291.messagelabs.com!1613595819!643384!1 X-Originating-IP: [104.47.58.177] 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 4719 invoked from network); 17 Feb 2021 21:03:40 -0000 Received: from mail-bn8nam11lp2177.outbound.protection.outlook.com (HELO NAM11-BN8-obe.outbound.protection.outlook.com) (104.47.58.177) by server-33.tower-291.messagelabs.com with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 17 Feb 2021 21:03:40 -0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mCk8tXANEAby/wbMPtak4fC2RCpfvYEJ92CP9g1wKQD3oAVSfI+ljcy3VJ/dNAsdagxQzb3mxO4JPfGwRxXaLTzn59FBe/0A1WBUpztCoblXF7sEHvKWz1j5Dx7uc8MCfbkqFaaMu44lAedb8qil49k1+K+XcXusDz8vm/qE1hQ31iyFFd6UVD0iIIx0AYof6Z01M/gAdDrajn3Ad5XSBb0YZ6BR3FgzO5TegSoC4Q5vn50wP1PJWIDlRHnGR7dyH8UBFZSFiab4+/m1MNI2yNPZLb9B0109SUR4Aru9MnZswqETvQPt9OLJLQnSFxYpLSRy0ejd+cJPhkTvc3on/Q== 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=HtDRSIvcdPEaA1j5RNxFPLAyI2rFRrlAFDs1h7w7wFY=; b=KnThh9LEubuBP5qYVgIwMWq9pSISHoip3v1UX5l01JbA85WAXMpOnEtSrtz+WrAEBeweTlwNhjxKj9P/Mde++PrrhSbkhsR3yUcvTJsHZ6raB9rzGHu8lLZAIV3N9EOzZs3UZLOd0n4RzyI/honggO7hlGMlqI9lj5tqZqYnlpyszc98HdXSgdpdNfgeY2wZebnK1900NXIPwF4eOLi71QOrhDZooTMYdNTvV4ZmvEpR9UA5+jBXOEDn6ckGhB6g672ADRZwHCcjXX+zXJSem8aabdnzrCAGTNTTwpdsjh7Lax95SP/WnFe9hCfv6O8A6d6DbJi9wpooZsspGb50Mw== 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=HtDRSIvcdPEaA1j5RNxFPLAyI2rFRrlAFDs1h7w7wFY=; b=j/6r2z3nfyfUCFQz3R9vbs4T749MplfsgjC3wf2W9vPDO30n69ZGv3/CKLP1nfhM0ShO0LiLpXfoSZpWoYahA2KfJXi9YWIsTRq3GtkSpRS/WSFJdb5JrE8hIpIzTAWvdDe0TML1PqxXTjAIVM3AQgwWH/YxBsJ/vNUafQ+9LtA= Received: from DM6PR03MB4777.namprd03.prod.outlook.com (2603:10b6:5:18b::26) by DM6PR03MB4153.namprd03.prod.outlook.com (2603:10b6:5:5c::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.26; Wed, 17 Feb 2021 21:03:35 +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.041; Wed, 17 Feb 2021 21:03:35 +0000 From: "Dey, Souvik" To: christian.ehrhardt@canonical.com, viacheslavo@nvidia.com, shahafs@nvidia.com, matan@nvidia.com, rasland@nvidia.com Cc: stable@dpdk.org, dev@dpdk.org, Souvik Dey Date: Wed, 17 Feb 2021 16:03:20 -0500 Message-Id: <20210217210320.11640-1-sodey@rbbn.com> X-Mailer: git-send-email 2.9.3.windows.1 In-Reply-To: <20210212151008.16948-1-sodey@rbbn.com> References: <20210212151008.16948-1-sodey@rbbn.com> Content-Type: text/plain X-Originating-IP: [72.70.55.110] X-ClientProxiedBy: BL1PR13CA0278.namprd13.prod.outlook.com (2603:10b6:208:2bc::13) 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 BL1PR13CA0278.namprd13.prod.outlook.com (2603:10b6:208:2bc::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3868.11 via Frontend Transport; Wed, 17 Feb 2021 21:03:33 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bcb73da0-ec29-4b5f-9be4-08d8d3877d06 X-MS-TrafficTypeDiagnostic: DM6PR03MB4153: 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: oe5fwGnkMx/0NJ3b4E58EyiqCtLKWdPMggFY3bObw6h/2SM/ii5mBbmLftTz8j2ar+wE/eXnF/fKhm5Qn3+gudBrAIL1CfQE34DTPXIGxoX0ukjl42shd0NegimUDfIpDJ8YzZP6v292qFvcbj9qRK/pbucJZoaf5TGUkZXg5tBmBtqFufRNmPX7HSiqaeV4IAtkGBAuzxEy9+WAruTO0R6uITeSPs79Y3LqBeEUJheB2GFqBMiK/QIxlTg6HPkkw3297g5dC4jtBukk5sxwAWOzpQhl8TnmYxq/ppER1WXf4+MBVcURaoy5R5fBYBLInaweOTJRBBT2SFwXxkeLUSlI+8tjxtpzmiHASY3DuhFQDZy2VY42oZg7uxJLb7L+d3kNZwOfIGLRP5a0If0wyHUNS7XfutmySbUVNo5Iam7JFElt1egtH9166lP3HrnTdAgviZjCPv7PRibV/WMSgA8VPl4jc71paCHZNTwQb9z6u9/3IysapkynRWk8KEJ9eW+x+6rqTqWDJmcArawneA== 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)(346002)(396003)(366004)(136003)(39860400002)(2616005)(956004)(86362001)(26005)(16526019)(186003)(6506007)(6512007)(8676002)(36756003)(5660300002)(6666004)(107886003)(478600001)(4326008)(83380400001)(66946007)(6486002)(2906002)(8936002)(316002)(52116002)(66556008)(66476007)(1076003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?K53nTtbUMxx22DbiJ6jYP1L5AkjKTy+j5cZxiDGTD5LhkiSXngyEom72FEIo?= =?us-ascii?Q?cAmxzrHWJz9aJfKUrlxe0qkVGa5+Ulou4ebU6YIMepxBPyfjoJrBRogXg6O+?= =?us-ascii?Q?H20EkfdbLwTS7c257f2gbH5959qKbVB+kmtLr4Gfx4PqOTjY/g862RwQ299u?= =?us-ascii?Q?va4AQUEh08ZpD7SPVKPPVm102fpwLa250w3K+klBzsSZIbh/1ZP46+l6W/XY?= =?us-ascii?Q?ozBDRaH0XGVXfB07T5EP8R4TqKL88qVngR5Se3eXXWmM9Qe8wUS0O22xECTO?= =?us-ascii?Q?VkNt9xXsJHQmO+kDajNVYwmM6ThO5j5MfDoOmbZAX5X8QFhO2EZr/FPRBEK+?= =?us-ascii?Q?BHz0JPn99axtm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?= =?us-ascii?Q?J3GlmfR7+eBTC4UJJshlBQ9ol8g32vtVl4RJgvKQGY4nhb+cYZGWfeebWLiv?= =?us-ascii?Q?U9M2O1Ja79YSGrH1yeCJhHPH?= X-OriginatorOrg: rbbn.com X-MS-Exchange-CrossTenant-Network-Message-Id: bcb73da0-ec29-4b5f-9be4-08d8d3877d06 X-MS-Exchange-CrossTenant-AuthSource: DM6PR03MB4777.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2021 21:03:34.9922 (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: lej3Hw4ZgkVhdQzDPru2lEdIbc17y6TpZSl4ATd5iZOBngMERLKacZ6QbrwD+cNQ X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR03MB4153 Subject: [dpdk-dev] [PATCH 19.11 v2] 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 --- v2: * Fixing the compilation errors. --- drivers/net/mlx5/mlx5_nl.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/net/mlx5/mlx5_nl.c b/drivers/net/mlx5/mlx5_nl.c index 64580b9..6db372e 100644 --- a/drivers/net/mlx5/mlx5_nl.c +++ b/drivers/net/mlx5/mlx5_nl.c @@ -678,11 +678,24 @@ 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(&dev->data->mac_addrs[j])) { + /* Find the first entry available. */ + for (j = MLX5_MAX_UC_MAC_ADDRESSES; + 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; + } + } + } else { + /* Find the first entry available. */ + for (j = 0; j != MLX5_MAX_UC_MAC_ADDRESSES; ++j) { + if (rte_is_zero_ether_addr( + &dev->data->mac_addrs[j])) { + dev->data->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.