[dpdk-dev] [PATCH v2 2/7] pci: Separate detaching ethernet ports from PCI devices

Shreyansh Jain shreyansh.jain at nxp.com
Fri Nov 25 10:25:44 CET 2016


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 <benjamin.walker at intel.com>
> ---
>  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



More information about the dev mailing list