From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 990F0A0527 for ; Wed, 22 Jul 2020 11:08:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 717931BFFA; Wed, 22 Jul 2020 11:08:14 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2074.outbound.protection.outlook.com [40.107.21.74]) by dpdk.org (Postfix) with ESMTP id 3DB35199BC; Wed, 22 Jul 2020 11:08:11 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FQIoYzcLBhFVtgjpRHQl0WbeDKoBpKtztCKXYx7JaRA+bz8CtuemjYmgSGsRLFjVuAgpsFMtP8zqsoCtRsBs4H1Rkyc0NpKVk8k4Pnj/UsmF9CA1+ErSWy3g8Li9eMnE9GVEtY8I8Nf/nmGodgrmu6dCHpEHmDyftMbIv18WeaUMFsMEJC3HqgHviZF/vTgIYQO1tlOAuOHtnEv8+LCFlxUgrp3MFWqTGh2hD0e33JnkCVxZ3RnpOq58ocz/HEFw9Hxk+2PYoatF+ePxugdQTcTcx9JgyyC9xgDWn8vf31x3x5frSx2asbewXznMAMSF4w3FDeWTYATROUt0YfGkiQ== 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=dHD+IqV5GQZFCrdY+affUuum5Pwtp7ckSrAlLsHocVM=; b=ABSGhCKV83rC5UCN/lcsJWGv+ohYTcaJA2NdASs/+ErSZa7QsmJTOvStF/jyoEd5cb99o9yGGBQciu2sYr1inSyZhmbF8uKj52Rk52LJcCgazuKJAlK/ocn0VZ6d5du1ANdhdY8WC5O+12p6pmSOfi40YY/c07GrHsMz6SntgZt+/R9k70yJARQzGUasIaH/WFuPK/74Ol4oipgn0nvZLQwaIRGXdEQATtnEEDJmTA0mZL/Q+EqsXnKSIS8IW/achJ7+L6CBGLxTlW7/cpv5ioHFD39bfbSlbeETzjgMUYvIyikDPJfb2O5eZEbYK2G8nT5KTDzHCzcX94oVjt/UBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dHD+IqV5GQZFCrdY+affUuum5Pwtp7ckSrAlLsHocVM=; b=tCAc4vfQIGBPJwRMsCRinbX+Fl3TSxgFQP1CyRzVJo6b0VpT1VV70LhO37o/ewkigegY36paKNrsPaQ0dj8E7Sm5UrciEGmxq+QQsXcVPexSEFV/WaIqePJdeou1KEe4VaVs+G0J0LE/mXEngHt3nomiN/R8tALCAsmAUGm2wkg= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=mellanox.com; Received: from AM0PR05MB6707.eurprd05.prod.outlook.com (2603:10a6:20b:15b::17) by AM0PR05MB5186.eurprd05.prod.outlook.com (2603:10a6:208:f3::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.25; Wed, 22 Jul 2020 09:08:10 +0000 Received: from AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::ecd3:6008:3784:4012]) by AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::ecd3:6008:3784:4012%5]) with mapi id 15.20.3195.028; Wed, 22 Jul 2020 09:08:10 +0000 From: Raslan Darawsheh To: dev@dpdk.org Cc: stable@dpdk.org, Viacheslav Ovsiienko Date: Wed, 22 Jul 2020 12:07:55 +0300 Message-Id: <20200722090755.26103-1-rasland@mellanox.com> X-Mailer: git-send-email 2.27.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AM0PR04CA0128.eurprd04.prod.outlook.com (2603:10a6:208:55::33) To AM0PR05MB6707.eurprd05.prod.outlook.com (2603:10a6:20b:15b::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mellanox.com (84.242.49.134) by AM0PR04CA0128.eurprd04.prod.outlook.com (2603:10a6:208:55::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3216.23 via Frontend Transport; Wed, 22 Jul 2020 09:08:09 +0000 X-Mailer: git-send-email 2.27.0 X-Originating-IP: [84.242.49.134] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 303929dd-ef41-4930-3259-08d82e1ec157 X-MS-TrafficTypeDiagnostic: AM0PR05MB5186: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1923; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Y0r1GtInAUItUI4ewI+S4lLN20PVDk+RBdVx4ZauEiO9cOPYyaOgEVtCYcxKEim19IPe3G/njeytvK+0zK5brFnh2r/eiS/4nRAnFMQMFgDmMckFopGOCwq8fLMP+n9KBCkZScFyR16jo7mztHuyVnUe9iL6QK9BEUAVjdn2NvoWuMnAF1BivSYegYap1tS7SmFajKsfasjU7s7Ce6bKP91dpKdTfaVj0JQ1srxxxMr0apn4yPdMkwnTZgHPJ1rTuQIGEoGFMEy5KKmDavDrgdcvfD1kNZpkLOkkoIqN36t2MYz+0PuSJvHyN3O2YgYYXD38lp6FvNdtkYjmERTHsA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB6707.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(376002)(39860400002)(366004)(136003)(396003)(2906002)(6916009)(86362001)(107886003)(8886007)(478600001)(2616005)(1076003)(956004)(5660300002)(450100002)(36756003)(6666004)(16526019)(186003)(26005)(52116002)(7696005)(4326008)(316002)(66476007)(66556008)(66946007)(83380400001)(55016002)(8936002)(8676002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: kvIFobRb/7erakzfI1mg1IiY8GuZyxd5iD39BNFi+/xIiA3pT/boq1GAqaFTI4dqfs2ooCDWWOWxYXyJnQymaucMTxfQSaqPUq7DXjdgAHsRv663nJoVRkyOrMqRI23FIHBcF9RQELjRgHbdIsttYhFLOMXnH1fl+WkbuDY9cTmn4EoR5yMchVBChF0rW/+f6z9w6bek9PQTK5Bu+o3giZFmR6uBJLo8ERp4Ey56OREW3QJyadbtnwMt+y4l3xXLcZSqMsP+4s1XP3y228q/JS3HPssskHfPTHQQyVADjp4MICw6mT8f9Yp/k/8oS9BtVUPVZhwdRGH6Yd21hHWn806SyD5l3bFwRBEr1DtGZgIxbCITseXjbiyNvqXLc0Ec+2qiXN3IcfwB7cXZcwK3+tfQbH6ClJHxCK+S6iCC6Z4GHFrRQLTCqSG0aUUTPsM3e9kVTJMgt19vKVU6oSDilZzI4aLrFtjxWQDtmCwvOcD2hdFFCP33Idn0eFwo0emh X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 303929dd-ef41-4930-3259-08d82e1ec157 X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB6707.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2020 09:08:10.2430 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WNiiwTDMd+W57Taapc8McpqycnZXEEnrcr4GSrfMo4Lm20OOnjB8TI/VFSk7F0qSixLzF+49SJt08Tba/eJD2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB5186 Subject: [dpdk-stable] [PATCH] net/mlx5: fix VF MAC address set over Bluefield X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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" When trying to set MAC address of an ethethet device and if it was a representor, PMD sets the MAC over the corresponding VF instead. For the case of HPF (Host PF representor on BluueField), PMD shouldn't attempt to set it, since it doesn't have any corresponding VF and fails. This will fix the issue by setting the MAC on the dev directly. Fixes: 0d1d73170820 ("net/mlx5: set VF MAC address from host") Cc: stable@dpdk.org Signed-off-by: Raslan Darawsheh Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_mac.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_mac.c b/drivers/net/mlx5/mlx5_mac.c index 2d808d629..c75b1a169 100644 --- a/drivers/net/mlx5/mlx5_mac.c +++ b/drivers/net/mlx5/mlx5_mac.c @@ -157,8 +157,11 @@ mlx5_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr) uint16_t port_id; struct mlx5_priv *priv = dev->data->dev_private; - /* Configuring the VF instead of its representor. */ - if (priv->representor) { + /* + * Configuring the VF instead of its representor, + * need to skip the special case of HPF on Bluefield. + */ + if (priv->representor && priv->representor >= 0) { DRV_LOG(DEBUG, "VF represented by port %u setting primary MAC address", dev->data->port_id); RTE_ETH_FOREACH_DEV_SIBLING(port_id, dev->data->port_id) { -- 2.27.0