From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 3F3F03250 for ; Mon, 10 Jul 2017 12:19:37 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jul 2017 03:19:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,339,1496127600"; d="scan'208";a="106576387" Received: from kmsmsx155.gar.corp.intel.com ([172.21.73.106]) by orsmga004.jf.intel.com with ESMTP; 10 Jul 2017 03:19:36 -0700 Received: from pgsmsx106.gar.corp.intel.com ([169.254.9.158]) by KMSMSX155.gar.corp.intel.com ([169.254.15.19]) with mapi id 14.03.0319.002; Mon, 10 Jul 2017 18:19:35 +0800 From: "Dai, Wei" To: Thomas Monjalon , "Yigit, Ferruh" CC: "dev@dpdk.org" , "Lu, Wenzhuo" , "Ananyev, Konstantin" , "Wu, Jingjing" , "Zhang, Helin" , "Peng, Yuan" Thread-Topic: [dpdk-dev] [PATCH v5 2/4] net/ixgbe: add support of reset Thread-Index: AQHS8YrbIXAWvun2wkiEKKmTgxka3qJHjAuAgAAC9oCABVmpAA== Date: Mon, 10 Jul 2017 10:19:34 +0000 Message-ID: <49759EB36A64CF4892C1AFEC9231E8D650B60A41@PGSMSX106.gar.corp.intel.com> References: <1498748282-69914-1-git-send-email-wei.dai@intel.com> <1498817556-64379-3-git-send-email-wei.dai@intel.com> <9394960.Tm5hhKpHD9@xps> <1715954.GxuFMxG21X@xps> In-Reply-To: <1715954.GxuFMxG21X@xps> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [172.30.20.206] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v5 2/4] net/ixgbe: add support of reset 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: , X-List-Received-Date: Mon, 10 Jul 2017 10:19:38 -0000 Thanks, Thomas I have just sent out my v6 patch set which includes more details to explain= why/what/when. -----Original Message----- From: Thomas Monjalon [mailto:thomas@monjalon.net]=20 Sent: Friday, July 7, 2017 4:36 PM To: Dai, Wei ; Yigit, Ferruh Cc: dev@dpdk.org; Lu, Wenzhuo ; Ananyev, Konstantin <= konstantin.ananyev@intel.com>; Wu, Jingjing ; Zhang,= Helin ; Peng, Yuan Subject: Re: [dpdk-dev] [PATCH v5 2/4] net/ixgbe: add support of reset 07/07/2017 10:25, Thomas Monjalon: > Hi, >=20 > 30/06/2017 12:12, Wei Dai: > > +/* > > + * Reest PF device. > > + */ > > +static int > > +ixgbe_dev_reset(struct rte_eth_dev *dev) { > > + int ret; > > + > > + /* To avoid unexpected behavior in VF, disable PF reset */ > > + if (dev->data->sriov.active) > > + return -ENOTSUP; > > + > > + ret =3D eth_ixgbe_dev_uninit(dev); > > + if (ret) > > + return ret; > > + > > + ret =3D eth_ixgbe_dev_init(dev); > > + > > + return ret; > > +} >=20 > rte_eth_dev_reset() just do > + rte_eth_dev_stop(port_id); > + ret =3D dev->dev_ops->dev_reset(dev); >=20 > and dev_reset() just do > + ret =3D eth_ixgbe_dev_uninit(dev); > + ret =3D eth_ixgbe_dev_init(dev); >=20 > It is doing one more thing, the check of SR-IOV. > Unfortunately, this restriction is not documented. >=20 > This is the documentation of the new API: >=20 > /** > + * Reset a Ethernet device. > + * > + * @param port_id > + * The port identifier of the Ethernet device. > + */ > +int rte_eth_dev_reset(uint8_t port_id); >=20 > It is really really too short. > From the beginning of this proposal we are asking you to better=20 > explain why this API is needed. It still does not appear in the doc. > Are you adding it to offer a new service to DPDK application developpers? > Or is it just a secret sauce that you will explain only to your customers= ? >=20 > This is what is expected to be documented: > - why/when this API must be used > - what the API will do > - what is needed to do after I would like to add that the description of the API must also help other PM= D maintainers to implement it. Adding a new op means more work for PMD maintainers, that's why they should= understand the benefit and acknowledge it. Ferruh, as the maintainer of next-net, please could you ask for feedbacks f= rom other PMD maintainers?