From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v8 01/19] ethdev: add function to release port in local process Date: Tue, 03 Jul 2018 11:21:27 +0200 Message-ID: <1911216.OZSudRO5zr@xps> References: <20180607123849.14439-1-qi.z.zhang@intel.com> <20180702054450.29269-1-qi.z.zhang@intel.com> <20180702054450.29269-2-qi.z.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, anatoly.burakov@intel.com, konstantin.ananyev@intel.com, bruce.richardson@intel.com, ferruh.yigit@intel.com, benjamin.h.shelton@intel.com, narender.vangati@intel.com To: Qi Zhang Return-path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 162A41BE44 for ; Tue, 3 Jul 2018 11:21:31 +0200 (CEST) In-Reply-To: <20180702054450.29269-2-qi.z.zhang@intel.com> 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, 02/07/2018 07:44, Qi Zhang: > --- a/lib/librte_ethdev/rte_ethdev_driver.h > +++ b/lib/librte_ethdev/rte_ethdev_driver.h > @@ -70,6 +70,19 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev); > > /** > * @internal > + * Release the specified ethdev port in local process, only set to ethdev > + * state to unused, but not reset share data since it assume other process > + * is still using it, typically it is called by secondary process. Please check grammar in doxygen comments, and do not make long sentences. "only set to ethdev state to unused" -> "only set ethdev state to unused" "share" -> "shared" "it assume" -> "it assumes" Please split sentences with a dot and an uppercase. I expect all patches of the series must be reviewed for english wording. > + * > + * @param eth_dev > + * The *eth_dev* pointer is the address of the *rte_eth_dev* structure. This comment is useless. You can just say "Device to be detached". > + * @return > + * - 0 on success, negative on error > + */ > +int rte_eth_dev_release_port_private(struct rte_eth_dev *eth_dev); [...] > --- a/lib/librte_ethdev/rte_ethdev_pci.h > +++ b/lib/librte_ethdev/rte_ethdev_pci.h > @@ -197,6 +197,9 @@ rte_eth_dev_pci_generic_remove(struct rte_pci_device *pci_dev, > + if (rte_eal_process_type() != RTE_PROC_PRIMARY) > + return rte_eth_dev_release_port_private(eth_dev); This is a behaviour change. It means a PCI device cannot be globally detached directly by a secondary. It must be justified by a comment in the code. Please explain.