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 2B82042647; Wed, 27 Sep 2023 01:41:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A7AF74026C; Wed, 27 Sep 2023 01:41:41 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 71A8040266 for ; Wed, 27 Sep 2023 01:41:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695771699; x=1727307699; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=y84cXtBCrMVU41l9wGCT13Yd54kRGnKUoTd08hqQ6bk=; b=QWLW2rJWtnSuz3rIrysJpcjnBx7ODPloZGkabZ3oh+AYB9gJzuYAVmZr 0cl9mCPvNri8aYOCIVegpnx5gJRgwmUtXyF7pNAnnn5XvVX5XjUF0JQbp W58e7sHQFkQLEJ/moAKtOsAtGzx9jEq/md4RKekMjg41OzJxQXteW6bxB m4zv1uKH+D7HnZ4qLaebW93S0SWAfQdSxZByD+rXi8Kp58Iy/3G5GL4dn R8NODKVx+kYmmuz8JhrvjAuAyYO944HtnZOKNkKpYK9RIRW50ATcvdAdn /goAvpRTLOtn6aaBGC5DCGHWAk3h77Oz2B/YxQ8JVvq1ptacbnvwfgbjq A==; X-IronPort-AV: E=McAfee;i="6600,9927,10845"; a="381589406" X-IronPort-AV: E=Sophos;i="6.03,179,1694761200"; d="scan'208";a="381589406" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2023 16:41:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,179,1694761200"; d="scan'208";a="330898" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 26 Sep 2023 16:41:07 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 26 Sep 2023 16:41:37 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 26 Sep 2023 16:41:36 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Tue, 26 Sep 2023 16:41:36 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Tue, 26 Sep 2023 16:41:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P7PFV6FGK4/rUkac0y88wEsMtpnxxHBhRS4xv0q6AE0FAPkuavHt9r38tKvz6p5QGREujvsV5njktycLsJPi66n/3mge/1DXGNQA4eiXdKsaBCJ8P/w851x6P69iQi9QFRW/XIJmSs6n/rpauiA9MIlZuNYb+4Caccir8bCYUds+yyX+bFpwHL6bHcSzmgDlfuUyNpeKi275FnnGUR/+sKj6+AaBfPAiriU6e/Q4GlR3e70RM7qDieEtX3UPdYsAm+TZiZmdy6GDQq9N+u5tCjpGRDvv5qxQrFU4qnYzd2xqVk8cv9OJ3k5CEYP83biX5M2UUGglx/7esg7o1eYYjQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GV0CLdUrfqUMRa9KbmvGX7XrY4LMxxI+GkcUgcEyagk=; b=EtqIlq784y5f+B94Ivfo+6p+kHqKB6EcfSKhoL2ryM9le9svMTBjqUmiwxLIOvvGzMKu7VraNgIM/Rs7yqZXZ7JHs8XOh3ARC+mhMASApqW78zRDJs+jZkl1nile5BWWkS8x8f/HZzwUeuJrttz6bCEHxKffve39ayIZjAxiDmZv/6RqyaUOplCuAAp+iLSCwXKuLsM6JSNF0kP39hRO0O2YaL+NC65RUsiY1f/OZNZAoPGViay81DQbXUkXiDW16il+bfQesOB4g5UXjISP4mVz0indM+8PO7yRgFPow/XSIoKafHW3iRUoPGtXJcURjfA/Aac9rX3XOe2QpDl9sA== 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 Received: from DM4PR11MB5994.namprd11.prod.outlook.com (2603:10b6:8:5d::20) by SA3PR11MB7628.namprd11.prod.outlook.com (2603:10b6:806:312::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.20; Tue, 26 Sep 2023 23:41:34 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::27ea:67e:2966:23e3]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::27ea:67e:2966:23e3%3]) with mapi id 15.20.6813.017; Tue, 26 Sep 2023 23:41:34 +0000 From: "Zhang, Qi Z" To: "Richardson, Bruce" CC: "He, ShiyangX" , "dev@dpdk.org" , "Zhou, YidingX" , "Wang, Liang-min" , "Su, Simei" , "Wu, Wenjun1" , "Zhang, Yuying" , "Xing, Beilei" , "Yang, Qiming" , "Wu, Jingjing" Subject: RE: [PATCH v3] net/iavf: add devargs to enable vf auto-reset Thread-Topic: [PATCH v3] net/iavf: add devargs to enable vf auto-reset Thread-Index: AQHZ55bW+vavW+whQEubL3ayfSCbYLAszIgAgABAdpCAACjsgIAAn3jw Date: Tue, 26 Sep 2023 23:41:34 +0000 Message-ID: References: <20230811094043.200995-1-shiyangx.he@intel.com> <20230915130249.425790-1-shiyangx.he@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR11MB5994:EE_|SA3PR11MB7628:EE_ x-ms-office365-filtering-correlation-id: 2a1b3fa2-3abb-4fed-232a-08dbbeea1e7c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: TlWowYuvc7OQI5Ss/AkxVw8ywsQGupHpM8WIrIRMqLqEtOWjTZcAsgAEOUBqfWxSW8fDZ/ZRdYSQq+GasItUe8TKf69Mnc9qAV3XyJoI0pwbmKaV7b6ZzniVjqsL2qZXJCAlgcmB2DC1fnun74cRzfI6DFwwULVTOYiMfqkGDxtJkAyNCUH59JVNQyBGjM3MysOOA3DC58m36dv7WRQfaD2KHIOkTX6UuWvZEuTtQSelWURd4QLor5+u9bsCH6mKJkXa1ZSGGkIF8tOizLPu5PpjWzf5dl/qZr0qGROQ57dOhIprcqRME5W3t/Won66+O0O05CRuG173Q9GcL3hzK4glt/FTISfjBNdRCqXFdYez9T+jX26lV9EfImAt6rKFJcG4zgDr5JScCn9+xq+tE3VKK8ocl5mI8uvEQqhJcMD0BoMDoRtvdA8wPTQ4mFT9l5Th9Sz3e45S9r9kx9b2Vamv3t+VM6BBQ/fNapDkO3L/kgLceo3+x0tIFOQKIdX2qRR1NZKcyM5zfZjDyyiI9AvgHWNAl2+f523nvXiViECKKekjZeob4BI3mWrT6YlOVN+HVNtiaF2WKhS/kYMBR2A2vA4XqHTje3hsy1vrdohRw34K9v97TBrM3LTwXAjE x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5994.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(396003)(39860400002)(346002)(366004)(136003)(230922051799003)(451199024)(186009)(1800799009)(83380400001)(66899024)(82960400001)(7696005)(6506007)(53546011)(9686003)(2906002)(5660300002)(4326008)(316002)(6862004)(8676002)(54906003)(52536014)(64756008)(8936002)(6636002)(41300700001)(33656002)(478600001)(71200400001)(38070700005)(55016003)(76116006)(66446008)(66946007)(38100700002)(122000001)(86362001)(26005)(66556008)(107886003)(66476007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?rHDeUIJ1bO9jhRwmxjUE6T8PKM2FgDzZgcBVkf5wi2TT40HwHrQTEN/VkQGm?= =?us-ascii?Q?nCKWR4zVzVyDe3Ph3moaqfP5wQpuMlT0HfNwUruNr9SzV+Zn1lPwCr1Q8GDR?= =?us-ascii?Q?AsckGXIS5nN5pdF8Z3rGUGd4RivcP9WL1f+y2vPaVtW1p7VOM1SgfOh9WRXp?= =?us-ascii?Q?SlOHKSZFxjwLdCdK2mIxzjI8k+fGKdtp4a+Xf/cl3wrRMV0wrsUUWZlKV5kI?= =?us-ascii?Q?BjOpC12JNER5cQuZL8hEYRQW2tUXQ8AFC5nxaHiMREbh+N1kz1UINdLbcZt7?= =?us-ascii?Q?930wUISYPBNr83PoROziX8GnaN24MljKZjfGwT0SuaPZ6Y/FTza8D/Y5MX5l?= =?us-ascii?Q?xW84Kbuis5Bdanv0tk3Uw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ii?Q?7zIzB7fZ6lWCk9/NmvVGAzMKd0vTkMbZxVpm3O6/BvCumIFmvBFY9vpH+OnQ?= =?us-ascii?Q?oQCpPfw0UCo9h80YpPZ3eMsOiOynbBKEB7sN8QYf1viXnMs2lHAqct76ZIsD?= =?us-ascii?Q?e3OCU1hQneKxjP8nZmwU48rYNg426GA8gXZuZ0pRFGdlQcbU+uCTA9zCcuQp?= =?us-ascii?Q?d0yH4zGlyEU0zeBIMimFcOoAKpak4h6N37pXS1W3tPppx4aVM09ATAkfRA4D?= =?us-ascii?Q?xpOF4kbIuQ/cUpiezW43uVgATjZwvxVZr/MV4t9W7LNrNgBi3y5kS6mmt0Zk?= =?us-ascii?Q?K/faPsuiBPQV61scxjIEc95y99fU3eGDmVJAJtFq?= 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: DM4PR11MB5994.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2a1b3fa2-3abb-4fed-232a-08dbbeea1e7c X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Sep 2023 23:41:34.6004 (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: Et0QxMgYTo0zMsR7trifPtTrl+eLuKCFYc/zx2iT7m72iHvNHxFkfFczGzkGhK9xtYB5ulcwzG2GgqZA8Lygiw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR11MB7628 X-OriginatorOrg: intel.com 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 > -----Original Message----- > From: Richardson, Bruce > Sent: Tuesday, September 26, 2023 10:06 PM > To: Zhang, Qi Z > Cc: He, ShiyangX ; dev@dpdk.org; Zhou, YidingX > ; Wang, Liang-min ; > Su, Simei ; Wu, Wenjun1 ; > Zhang, Yuying ; Xing, Beilei > ; Yang, Qiming ; Wu, > Jingjing > Subject: Re: [PATCH v3] net/iavf: add devargs to enable vf auto-reset >=20 > On Tue, Sep 26, 2023 at 01:15:28PM +0100, Zhang, Qi Z wrote: > > > > > > > -----Original Message----- > > > From: Bruce Richardson > > > Sent: Tuesday, September 26, 2023 3:49 PM > > > To: He, ShiyangX > > > Cc: dev@dpdk.org; Zhou, YidingX ; Wang, > > > Liang- min ; Su, Simei > > > ; Wu, > > > Wenjun1 ; Zhang, Yuying > > > ; Xing, Beilei ; > > > Yang, Qiming ; Wu, Jingjing > > > > > > Subject: Re: [PATCH v3] net/iavf: add devargs to enable vf > > > auto-reset > > > > > > On Fri, Sep 15, 2023 at 01:02:49PM +0000, Shiyang He wrote: > > > > Originally, the iavf PMD does not perform special actions when it > > > > receives a PF-to-VF reset event, resulting in vf being offline and > > > > unavailable. > > > > > > > > This patch enables vf auto-reset by setting 'watchdog_period' > > > > devargs to true. The iavf PMD will perform an automatic reset to > > > > bring the vf back online when it receives a PF-to-VF event. > > > > > > > > v2: handling reset by event handler > > > > v3: change reset process > > > > > > > > Signed-off-by: Shiyang He > > > > Signed-off-by: Liang-Min Larry Wang > > > > --- > > > > doc/guides/nics/intel_vf.rst | 3 + > > > > doc/guides/rel_notes/release_23_11.rst | 3 + > > > > drivers/net/iavf/iavf.h | 7 +++ > > > > drivers/net/iavf/iavf_ethdev.c | 86 ++++++++++++++++++++++= +--- > > > > drivers/net/iavf/iavf_rxtx.c | 52 ++++++++++------ > > > > drivers/net/iavf/iavf_vchnl.c | 11 +++- > > > > 6 files changed, 135 insertions(+), 27 deletions(-) > > > > > > > > diff --git a/doc/guides/nics/intel_vf.rst > > > > b/doc/guides/nics/intel_vf.rst index d365dbc185..c0acd2a7f5 100644 > > > > --- a/doc/guides/nics/intel_vf.rst > > > > +++ b/doc/guides/nics/intel_vf.rst > > > > @@ -101,6 +101,9 @@ For more detail on SR-IOV, please refer to the > > > following documents: > > > > Set ``devargs`` parameter ``watchdog_period`` to adjust the > > > > watchdog > > > period in microseconds, or set it to 0 to disable the watchdog, > > > > for example, ``-a 18:01.0,watchdog_period=3D5000`` or ``-a > > > 18:01.0,watchdog_period=3D0``. > > > > > > > > + Enable vf auto-reset by setting the ``devargs`` parameter > > > > + like ``-a > > > 18:01.0,enable_auto_reset=3D1`` when IAVF is backed > > > > + by an Intel(r) E810 device or an Intel(r) 700 Series Ethernet = device. > > > > + > > > > > > Why do we need a devargs for this? If the VF is unavailable - as you > > > mention in the commit log above - should this behaviour not always > > > be the case without the user having to ask? > > > > Ideally it does not need, but with below considerations: > > > > 1. Not break existing scenario, which still assume some application wil= l call > dev_reset /dev_configure/ queue_setup / ... after receive > RTE_ETH_EVENT_INTR_RESET event to recover the VF manually, the devargs > make sure application be aware of this new feature and will not call > rte_eth_dev_reset which will fail now. > > > > 2. intent to ensure a smoother transition, in case some corner case iss= ues > evaded our validation, keeping this devargs provides us with the flexibil= ity to > remove it once we determine that the implementation is stable enough. > > > Thanks for the clear explanation. >=20 > One small suggestion: in the commit log, at the end of the first paragrap= h > change "resulting in the VF being offline and unavailable" to "... offlin= e and > unavailable until the application resets the device on receipt of the > RTE_ETH_EVENT_INTR_RESET event". Similarly at the end of the second > paragraph you could add "This change removes the need for the application > to handle the reset event, as it is transparently handled inside the driv= er". Thank you for the suggestion. The commit log has been refined in the dpdk-n= ext-net-intel repo. Qi >=20 > Regards, > /Bruce