From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shreyansh Jain Subject: Re: [PATCH v2 2/7] pci: Separate detaching ethernet ports from PCI devices Date: Fri, 25 Nov 2016 14:55:44 +0530 Message-ID: References: <1479929804-19614-1-git-send-email-benjamin.walker@intel.com> <1479931644-78960-1-git-send-email-benjamin.walker@intel.com> <1479931644-78960-2-git-send-email-benjamin.walker@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Cc: To: Ben Walker Return-path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0089.outbound.protection.outlook.com [104.47.37.89]) by dpdk.org (Postfix) with ESMTP id 25BA4F72 for ; Fri, 25 Nov 2016 10:22:56 +0100 (CET) In-Reply-To: <1479931644-78960-2-git-send-email-benjamin.walker@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thursday 24 November 2016 01:37 AM, Ben Walker wrote: > Attaching and detaching ethernet ports from an application > is not the same thing as physically removing a PCI device, > so clarify the flags indicating support. All PCI devices > are assumed to be physically removable, so no flag is > necessary in the PCI layer. > > Signed-off-by: Ben Walker > --- > doc/guides/prog_guide/port_hotplug_framework.rst | 2 +- > drivers/net/bnxt/bnxt_ethdev.c | 3 ++- > drivers/net/e1000/em_ethdev.c | 4 ++-- > drivers/net/e1000/igb_ethdev.c | 7 ++++--- > drivers/net/fm10k/fm10k_ethdev.c | 4 ++-- > drivers/net/i40e/i40e_ethdev.c | 4 ++-- > drivers/net/i40e/i40e_ethdev_vf.c | 3 ++- > drivers/net/ixgbe/ixgbe_ethdev.c | 7 ++++--- > drivers/net/nfp/nfp_net.c | 4 ++-- > drivers/net/virtio/virtio_ethdev.c | 3 ++- > drivers/net/vmxnet3/vmxnet3_ethdev.c | 3 ++- > drivers/net/xenvirt/rte_eth_xenvirt.c | 2 +- > lib/librte_eal/common/include/rte_pci.h | 2 -- > lib/librte_ether/rte_ethdev.c | 2 -- > 14 files changed, 26 insertions(+), 24 deletions(-) > > diff --git a/doc/guides/prog_guide/port_hotplug_framework.rst b/doc/guides/prog_guide/port_hotplug_framework.rst > index 6e4436e..d68d08e 100644 > --- a/doc/guides/prog_guide/port_hotplug_framework.rst > +++ b/doc/guides/prog_guide/port_hotplug_framework.rst > @@ -106,5 +106,5 @@ Limitations > > * Not all PMDs support detaching feature. > To know whether a PMD can support detaching, search for the > - "RTE_PCI_DRV_DETACHABLE" flag in PMD implementation. If the flag is > + "RTE_ETH_DEV_DETAHABLE" flag in rte_eth_dev::data::dev_flags. If the flag is Incorrect spelling. Should be 'RTE_ETH_DEV_DETACHABLE'. > defined in the PMD, detaching is supported. > diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c > index 035fe07..a2100f6 100644 > --- a/drivers/net/bnxt/bnxt_ethdev.c > +++ b/drivers/net/bnxt/bnxt_ethdev.c > @@ -1051,6 +1051,7 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev) > RTE_LOG(INFO, PMD, "%s", bnxt_version); > > rte_eth_copy_pci_info(eth_dev, eth_dev->pci_dev); > + eth_dev->data->dev_flags = RTE_ETH_DEV_DETACHABLE; > bp = eth_dev->data->dev_private; > > if (bnxt_vf_pciid(eth_dev->pci_dev->id.device_id)) [...] - Shreyansh