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 99CA5A0C56; Wed, 8 Sep 2021 10:35:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 213284003E; Wed, 8 Sep 2021 10:35:27 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 581714003C; Wed, 8 Sep 2021 10:35:25 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10100"; a="217257981" X-IronPort-AV: E=Sophos;i="5.85,277,1624345200"; d="scan'208";a="217257981" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2021 01:35:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,277,1624345200"; d="scan'208";a="524739974" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga004.fm.intel.com with ESMTP; 08 Sep 2021 01:35:24 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 8 Sep 2021 01:35:23 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 8 Sep 2021 01:35:23 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.173) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 8 Sep 2021 01:35:22 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ImeXurjaZY/Dv6ETYWsl5Ae+ssbhODV2rkkw+h+TbVq2iOs7FIlnckHDbWtsgsmtvgAoEKZ+cLCbVU5pY7NRuRiNrtnY6uEasfYxFo6yuASVP+J54A5cOwoBMQaINHNG8/nQO6Wx1yYEwEZ1YkJ/Ofx17qYVF/5rLNLM6OyP/zAMrXUmnpfjZ2G338XK7NXLNGa9iQZM7AR+MjGRFYiGLt1+IymI4yt2F1f+slonJB3lrGDN+ZlpCl2cfRgh38LeegNoX9ZMSjoo9QGa9fZX1332HSc85IBkwdY3Hi+srjU0v203301hOoe0DJCpC2P3wpO9a/k3Zkof8PN6UItDaw== 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; bh=s+dRsrJv4pnl7kMAHUXvoMEQoK8A4aH9JBQbPTFGnjY=; b=Q0TEM4jqauDYM6yrrgNUKYAW2UDDTcQfDhhresqzO708s3cyUkqTOOoaBBy9b88DzGlRIw3tEBP1T1QFWam2v1EZiV7xuFRHnR/SV/27ZTNn75VTMlrXPV1w69j8RMlxaTdVLVAIroZakFNE08nTxI9CaBxDSjoXe9Z2sszRCNKg4Xu90/4b0wRY3Zcij0HgR/th3jgJGTL0g4n8tpp18lsG7uKCNjcWRFgpQvZSvLu6CGITPgznvmPxIyL3l0Vud0biA8jSyhksWNe+e3LElYdE9jRoEpjc2aNu3lghN2Qut2MgAiD9ctYLWZcriBvkT65lBIhwomXORhp6R/Z03g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s+dRsrJv4pnl7kMAHUXvoMEQoK8A4aH9JBQbPTFGnjY=; b=bdWHsmbcHKst94mPF5pJa/AwmqCHkmQXJr0z9vDVxnzd+tcca+6GD6kPnYgvC0U158ue/rHeXN9C1cHYf7kYMe9SLo5HBcOWEHIrAUP7/gO7ZfiGpGlgTMiqGSq3rY1CxeTzSCUyawfFOaiSe/j9WgVhKkHaroVzxXUGbx9pXdw= Received: from BYAPR11MB3800.namprd11.prod.outlook.com (2603:10b6:a03:f5::21) by BYAPR11MB2887.namprd11.prod.outlook.com (2603:10b6:a03:89::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.25; Wed, 8 Sep 2021 08:35:16 +0000 Received: from BYAPR11MB3800.namprd11.prod.outlook.com ([fe80::a451:601e:78:1543]) by BYAPR11MB3800.namprd11.prod.outlook.com ([fe80::a451:601e:78:1543%2]) with mapi id 15.20.4478.025; Wed, 8 Sep 2021 08:35:16 +0000 From: "Wang, Haiyue" To: Qiming Chen , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [PATCH v2] net/ixgbe: fix vf mac remains Thread-Index: AQHXosf3B8UQbFkkNke7ZXa0TBbmjauZ0u9A Date: Wed, 8 Sep 2021 08:35:15 +0000 Message-ID: References: <20210831141713.9225-1-chenqiming_huawei@163.com> <20210906023513.9608-1-chenqiming_huawei@163.com> In-Reply-To: <20210906023513.9608-1-chenqiming_huawei@163.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.0.76 authentication-results: 163.com; dkim=none (message not signed) header.d=none;163.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2e634af6-efb7-4641-1e92-08d972a39562 x-ms-traffictypediagnostic: BYAPR11MB2887: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:203; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: g+oskreiR4reZK8a9r5SFLPwUrYkpP2yS6mUFTN0cdK3uVA8ezv9GSfnb0UdGBbxsuNiTy7Qioe5fvAELNKBEWNLlMJDU5punhrYepJJAKzmvo2X2VAQqNpie5X4B/eD/EVcrjoy50eFT4SHcfRAJ13cdDJ7oXsLjgj1qqrZyMX5Pn7s7fSRRNrzDSkGEK7NWBd37Ze7xf3hTTV0s6eNZq1yBYz3f0oKR9pFMXnnfmWlr8aafXXWNg2VvaOsjlQCH7BQUggqI0F7Tub36MmEl++4QKGiCc9Jh9uRDsruCCcoziH1zf1pU7m14hNN4tfmdS3lwsjmT8+FuOMKbGkCmgd7gdPsqVYCVPtZvlgToMC3DnovoGN1PBCjtjFLTCXwhA/6v1ZWNLOCrznrTZNOHcdvpnJ8HQEOfzrR5F94kbgT0dKsO4/0PPZ128wavHNsjQPezYyxNzMXTvKRe6uxnVHk1dAC7Izh6VaJaWsBvc8GUEgHgaZ82iOYkU8cgipC2ev+YOozwTTlKGTELaS78P3QbPjp4Hu2Lkq++fX2SnvEqm+EmAcYWdKUIPlecEI4l2qH4VMCKGnsDU3eC5vt+7cFfuc5l8K4HHfAFJOEByJJ3PXwDBuJBIPk5yEUN+2EspyebejvRkSNl6TbDQv8oMubN0nqxgOO/xlhiz2+HVEagJlxgcJjV0ogwkYgD9nA862ZwQfqIZ4zmU8kQxaovg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3800.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(39860400002)(376002)(396003)(366004)(83380400001)(38070700005)(26005)(478600001)(8936002)(2906002)(5660300002)(52536014)(4326008)(316002)(66946007)(66446008)(53546011)(6506007)(66476007)(64756008)(110136005)(7696005)(66556008)(76116006)(38100700002)(9686003)(122000001)(71200400001)(55016002)(8676002)(33656002)(186003)(86362001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?IfDmz1NjrhnZGotx144D3a4nN3HyRcWhHol4XLcuVEaKfOmQDaVDtF7KXg5L?= =?us-ascii?Q?w6MjiqOsHDit1DQkuXNAGqdajXpQwQMmxh1vNQb8/kPBTmyvpMKxVU2LJJ2/?= =?us-ascii?Q?wJdCnAKxB+2q8P8Gyg0nST01fk+ofCtxrjXie5ZQxi0eFKyKQhc5JcCI6GcP?= =?us-ascii?Q?7RW3SFaNWj1JkLj11WFpzMwHZ40ruDrODqbXlZzRI2hpBYRy4sUnGW3ROXnv?= =?us-ascii?Q?cNPp7U2GPx0YwchRSuypZX25dLYq/WgaQN8ZGTtMe9T/Pnf7m571ZcUixoAY?= =?us-ascii?Q?jz58RRcy1MKP4DmnMZHGIR0jTFSRNN0vGEQOVdpZ01KIKfq6k6urFX2loGKr?= =?us-ascii?Q?e598B181ePNsXMzu2SMad9I/5azOjhkjkzzijFHzjj48W+whvqdGTVca5ns9?= =?us-ascii?Q?XCmit9N41MEG/BS0bp1aDj0XC6wxL+R0yKPX8WtuKV4vHb6S/OfYa65U97e+?= =?us-ascii?Q?tn00vY7Iqt/IySQY+A66ZEp/yZVM2J7uEWR/qirGUS2UXu5y7/Su6/Acj+qb?= =?us-ascii?Q?QUHf2nNl9z0Zi7LytL1pexV3vCQfowAA9OErWRc5ZfS1+RlCYZ0+r74lenbm?= =?us-ascii?Q?MuQta/AYVv7W9eI2msCHl/h+eFPNd1lSd3+NCmRSE5NDeoUNDJRKsucvzlq2?= =?us-ascii?Q?s8TjEAyWLgrZFJn/c2OsUMaBYfCFIVxF5j208s6T10DAzRWX4tV5hsjOXwHS?= =?us-ascii?Q?KWpxvCnsjyx59mIuQskJ4FsBmYQ81fuWds0WMuPUyqmpHPFuSO1ZMegyn0eb?= =?us-ascii?Q?nnoipdOMtrSuXaQn1qGXk0V0rgA6t4/J5GQpF281/MIJa1c0Xcq+SVRwssAC?= =?us-ascii?Q?/vzK4y729eLK+jxRHCdjUtkbWWqOAcPiNL2diVkpeZNlsKYXCfYMSMjIKSpU?= =?us-ascii?Q?qZgpqFrKD7Cj5ueQZKULe/KKqo7v3qI9M3idTgLBuwQYRw8NTy2LRZ7zafy8?= =?us-ascii?Q?OTQhrDMIzI89xmBPzU7rK0Zp4ah4IPWusrOsLKCHON5pmr9di8FtplQ1ypA6?= =?us-ascii?Q?A+UJtcNs+J0583i+kVggcYvangmQrv+WR6czdMsWg9CAVs98kySNGikXGhJ3?= =?us-ascii?Q?mzeLBuLn+6/GAqMVT2dLNLg5cxEq3HgF4b+qiZpaYNnxapQl0ezR3ss+0nny?= =?us-ascii?Q?yOIhpiAV/p32IvIQI2tlKfstZT5/ELGHIBLgJJa6KnjcG55VrIHp04WaSdRn?= =?us-ascii?Q?2lBgh+Cs0lbopjvTlI+/TxW5q7+G9zJhAQxsDfbkrwnR4+d8Dbp7H+vexRYe?= =?us-ascii?Q?rJMhTx5MC9MbJi9XxywIOwsLR58ELW/8+KkgyWLIr8Zscu8oJjkEVoDiFEQb?= =?us-ascii?Q?UwY=3D?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3800.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2e634af6-efb7-4641-1e92-08d972a39562 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Sep 2021 08:35:15.9757 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: XV+8GdZcOKiTvE1JQKCpIJSxeanVz9E9aClkqVapk0OnW8yrdrdxhPouyS44FW+vDuC794L3xWtlgNPzHpw/pQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2887 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix vf mac remains 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" > -----Original Message----- > From: Qiming Chen > Sent: Monday, September 6, 2021 10:35 > To: dev@dpdk.org > Cc: Wang, Haiyue ; Qiming Chen ; stable@dpdk.org > Subject: [PATCH v2] net/ixgbe: fix vf mac remains >=20 > In the following two scenarios, the mac address residual problem > will occur: > 1) In the VF hard pass-through environment, after adding the mac > address, the process restarts, and the previously added mac is > still valid; > 2) In the vf hard pass-through environment, after the mac address > is issued, the port will start/stop, and the previously added mac > is still valid; How did you test it ? >From the ixgbe PF, it will clean the MACs: ixgbe_del_mac_filter(adapter, adapter->vfinfo[vf].vf_mac_addresses, vf); ixgbe_set_vf_macvlan(adapter, vf, 0, NULL); >=20 > The patch clears the mac address at the start and stop of the vf > port. After the start is cleared, the rte framework will restore > the mac addition to solve the problem of residual mac addresses. >=20 > Fixes: af75078fece3 ("first public release") > Cc: stable@dpdk.org >=20 > Signed-off-by: Qiming Chen > --- > v2: > Modify fixes commit > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_e= thdev.c > index 6a91f104e1..e40350d86e 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -5410,6 +5410,9 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) > */ > ixgbevf_dev_link_update(dev, 0); >=20 > + /* Clear the mac address, the rte frame will be restored */ > + ixgbevf_set_uc_addr_vf(hw, 0, NULL); > + > hw->adapter_stopped =3D false; >=20 > return 0; > @@ -5454,6 +5457,9 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev) > intr_handle->intr_vec =3D NULL; > } >=20 > + /* Clear the mac address */ > + ixgbevf_set_uc_addr_vf(hw, 0, NULL); > + > adapter->rss_reta_updated =3D 0; >=20 > return 0; > -- > 2.30.1.windows.1