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 10E77A04D7; Thu, 3 Sep 2020 04:24:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4E6FB1C0AF; Thu, 3 Sep 2020 04:24:10 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id BD0D31C0AE for ; Thu, 3 Sep 2020 04:24:08 +0200 (CEST) IronPort-SDR: O4IFZZWMFJS30tGnVvR7BFC0yhT88nXbFgjzbBq7fpkQ5JD9ksCZ45KT9f22BF3JK47/KQpyMd 5UeeKue5/3Qw== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="137560716" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="137560716" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 19:24:07 -0700 IronPort-SDR: 4/0EEGKCYTNg7F7p5ZtswmrONwfO+VafGhP/88Vm7T7et/tux7cxa7bK7I6O1H3CW06rfVhU42 jULL5EQtFpwQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="502351984" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga006.fm.intel.com with ESMTP; 02 Sep 2020 19:24:07 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 2 Sep 2020 19:24:05 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 2 Sep 2020 19:24:05 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.105) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Wed, 2 Sep 2020 19:24:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HUR/a7M4CjcWbXOxdrBNu8XZtivI51gG/rSvx71Oz8CEbKiGvhC0Nd2ZnV3NM5Zsd2ci4qmMt0WRM8US4l3PLh+gpqjBlukHzUNriFRUkz0raKP0hZ9UeoYHqEqtKPREv16rTpsTykem2tJRZDNFdGGe/oIbvFOkUZIm6LoE8wbXsrECxoy0qr5suvrKOrihmFMjYgseuNW2cl4bzCPI70yE0fC1sgZiezyBc/dGbIcn/zt+eHzrcibMmKYXjytBAcps6a9qTb09EVE9Xoh4zAyi5jaNgFptj59omZmA9gEP+6KqbcLV2Qf+syBtNM7xLsSJaeI76s4t7U0jr5ZqoQ== 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=fuhR48edTMUrjkzwFuiST41wGaQlQfp3KgIRxcTf18o=; b=WTZddp96PxJF4JtJQJxB7GXWPNnFUsETk4GA2XWOHl/Ub6G1JnqY9kx+AhZw9Di67CqQgiNlnF0yPbZfVTLR5N3lGWZmh4nr3In0O9XMj6dxliJ7BPLAFkwClP7P8rHDIu6ffM327dutO+fdbOYjriOoOwd61ji6hQYoI6C+FuaEY5JOw6/7p2x0pVFX+6vkrVQC7ucN+P85grTJvI1QYNHDtYUvOsqxlZzaP8IhSz5MLLtjL/UZ5QmfmAIAZG1ZAFiZLUM2dwGwkF3rzpJ5IVJopCITZud8865G5rQWS/EdZ7m5iIXu/XXiy8B85AJDVLOFMiK+HaJKnUu/lWk5XA== 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=fuhR48edTMUrjkzwFuiST41wGaQlQfp3KgIRxcTf18o=; b=ca8Hrv/3rjF4SywyIFSJyiyN6SWAP8CQyjDeJOxQXN8WKMExEpciB6HmLFU5oAsjkyV9P4qcgR/EDSSq4QzdCKxfwf+6E4LwWVJL2jquNVBcrQIkbwq1Yld/9Fd3IKE9RPlSATbTd7Os1D8I99QNpTD3j8CilNyJEIQFmci7ITU= Received: from BN6PR11MB0017.namprd11.prod.outlook.com (2603:10b6:405:6c::34) by BN6PR11MB1315.namprd11.prod.outlook.com (2603:10b6:404:49::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.19; Thu, 3 Sep 2020 02:24:03 +0000 Received: from BN6PR11MB0017.namprd11.prod.outlook.com ([fe80::e41f:999f:5492:5175]) by BN6PR11MB0017.namprd11.prod.outlook.com ([fe80::e41f:999f:5492:5175%6]) with mapi id 15.20.3305.026; Thu, 3 Sep 2020 02:24:03 +0000 From: "Yang, Qiming" To: "Yang, SteveX" , "dev@dpdk.org" CC: "Zhao1, Wei" , "Guo, Jia" Thread-Topic: [PATCH] net/ixgbe: fix vf reset hw error handling Thread-Index: AQHWgMQGHVaSlIzSLECzZ3B0MjNxy6lWMCuQ Date: Thu, 3 Sep 2020 02:24:03 +0000 Message-ID: References: <20200902004425.33423-1-stevex.yang@intel.com> In-Reply-To: <20200902004425.33423-1-stevex.yang@intel.com> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTgwNDhiNDYtZGExNy00YzkwLWIyYzMtOTJkOWZiMmQzNTBmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibDFOVkgxWTdQaVY4bVhUNjlVWGwyWHZuczB6VzVLWEpoNEI1ZVo4WXB4NzhEQkZmb0hEM2hnWkU0dmRXUkRHSiJ9 dlp-reaction: no-action authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.218] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1cc26438-a718-4bce-ce9d-08d84fb06ce9 x-ms-traffictypediagnostic: BN6PR11MB1315: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Mkg5mrDbpISdRZtZNZsWHo5Fexe9r/dTWbhro5fLv7320VCQU97zxC2LW1C2gfnFRDuScfqGueOG8CfRv6NxPQ9OrVF7tr8+N0H+OWNnAxKhRCnsHppes2bdRKVDu04OcJP8P+hOGSSl0wNybdBEI6j//ezdD7pn9h9i2DQpxpibifHKXt2yUp4MOuQ3iG7DkMSUXk4Ee2unQTi4Dsx8/lmmmvivfvslkoXenl4JM07aUzNt4KzeGk9+V9YXjS9bhKRjiacyteFBMBwTUgXgY4PCQdwGo9rFqyvMg0wBf+U92phMPSbNWiwc3r2aZd6a x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB0017.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(396003)(376002)(136003)(366004)(346002)(2906002)(316002)(107886003)(33656002)(66556008)(8936002)(66476007)(5660300002)(66446008)(8676002)(86362001)(76116006)(64756008)(7696005)(66946007)(83380400001)(55016002)(53546011)(6506007)(186003)(52536014)(9686003)(54906003)(478600001)(110136005)(4326008)(26005)(71200400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: K9NzXUKhUySI5mxJZ4RD2VM31znnkZVUh1yQKh4w+8Tncv0knIXfO9af6jxpZGweRClGKY1PQlUGE1t6340B5/K9s4WbLfeA8udsHCjyz66iXQGfS+IOBbF84Nd/lzRsh+LUHKGBHu8cIcPDE3gg8369t3jWiYnyOBUaALcMyO8hJpUSZ0+raY2HQ7mhR8TkzCvuUX2gepQpAk9f0L/0UP7GRkHDfOLFUHod7qQDnoLM384nHSat5dZJ/25dt1R7Pgqs3u9T3IsuMkmxhGtMMYkp948hHQu5Sayloa75zOOouBgbCn329EJybpItNg1l2JGQM/15txRcAmqsV7p7Fnp05zrHWBvgQtME3RfxXOmXWY1Wys+NlicH4EgHlZR6LrTD178TJQZ7hPwC8vI/L7XfNSmp9iMTqGvEPkNyf4pW+u/7x9ybEReF4ur2dgy/OJN21p51+luOzgi/lnLX3LyyWJFbHwN5AFMW5ArMdhu0ymJ8jmkmh04MnNKyqDBSAxGXrnEvW4SCdXzsM09ulkbvbyqwUTs7V7/A8bGX1KRG6Zili9jFHaM1YxGGS48EfEvlIs7bp4sIx2ljQrnwQ0S5vO0N5/OZQqSTkA4RTBBWr1fQ0JI+lAXjBSj60ddaemaxA5h+Ato582e+hJPrTw== Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN6PR11MB0017.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1cc26438-a718-4bce-ce9d-08d84fb06ce9 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Sep 2020 02:24:03.0457 (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: OTk6r2eA0qRZkcIgImM+LjFzC3AaVN/0w0vDJK2961hXlVvTnskjLmvhN6MEsmJ1XDFoM4YiCnP9oyYqnzHUEQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1315 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: fix vf reset hw error handling X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Hi, > -----Original Message----- > From: Yang, SteveX > Sent: 2020=1B$BG/=1B(B9=1B$B7n=1B(B2=1B$BF|=1B(B 8:44 > To: dev@dpdk.org > Cc: Zhao1, Wei ; Guo, Jia ; Yang, > Qiming ; Yang, SteveX > Subject: [PATCH] net/ixgbe: fix vf reset hw error handling >=20 > The PF control message will interrupt the assigning MAC address for VF wh= en > PF physical link down, and the VF reset operation returns the > IXGBE_ERR_INVALID_MAC_ADDR. In this case, reuses the MAC address from > eth_ixgbevf_dev_init() directly, no need care of PF assignment. Better do not use function name. Reuse the MAC address when device initialization instead of waiting PF reas= sign. >=20 > Fixes: f69166c9a3c9 ("net/ixgbe: fix reset error handling") >=20 > Signed-off-by: SteveX Yang > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > b/drivers/net/ixgbe/ixgbe_ethdev.c > index fd0cb9b0e..c2fa59c73 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -5326,10 +5326,17 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) > ixgbe_dev_wait_setup_link_complete(dev, 0); >=20 > err =3D hw->mac.ops.reset_hw(hw); > - if (err) { > + > + /* > + * The VF reset operation returns the > IXGBE_ERR_INVALID_MAC_ADDR when > + * the underlying PF driver has not assigned a MAC address to the VF. > + * In this case, reuses the MAC address from eth_ixgbevf_dev_init(). > + */ > + if (err !=3D IXGBE_SUCCESS && err !=3D IXGBE_ERR_INVALID_MAC_ADDR) Is there any other cases will also caused IXGBE_ERR_INVALID_MAC_ADDR? > { > PMD_INIT_LOG(ERR, "Unable to reset vf hardware (%d)", err); > return err; > } > + > hw->mac.get_link_status =3D true; >=20 > /* negotiate mailbox API version to use with the PF. */ > -- > 2.17.1