From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id CF6571B7AB for ; Tue, 24 Oct 2017 12:36:02 +0200 (CEST) Received: by mail-wr0-f193.google.com with SMTP id y39so20162122wrd.4 for ; Tue, 24 Oct 2017 03:36:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=iQARZ/B9IP6wWB7Ql6xYn6UUhLdtcgclYrbWzVd0euc=; b=Ai8CiF/RU+uzcQnyDWZrdbCI6wuqQVJVua7XZV51vXynHssCpCY9yUg4AIRbXvTCtx sn8lpNYiRdrbQzyvPfHsOz1vVTTUnGSyzECoMQyLaDXOXcqkmUv5iF9uGXc6pqNZRYEp 8Cf7yixvAk8Wd1qS+mLZfqlnWKaR1bh6BmZLr3Xm1hshQlXoHmD2KkseUr23SF6h27gu skoDECFn3LqOaL1uwGQQuEaEof2kYVA2z9E6zUghHz22uT7RS4kvgDtX1rwcoqlpl5b6 RN1XwrEmzGG2na8WQkNtn8/W6xVqV/P2PFPBYREPdQ/GXHXw3tzK11VT15FbZH8/FO7Q B/TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=iQARZ/B9IP6wWB7Ql6xYn6UUhLdtcgclYrbWzVd0euc=; b=jg3CX9VoKeGTwqN6Dj0oZ2V2it5o+iR3Y6NUK2B9C+ZGnTIeXBzkKvwTPnR6ynlMX/ 8BqErfORgBx0tkT3yB/B8AKjZOp1EWHvRe6PGa1TpqrEQuBEkQX6SIdAsk5n56vUu6Y4 8pjcwzqPulqhHvDtoAwQvVsF8nWA4XaBCK3YmspnYnuUL7IUHwB7ni3FVAxJ4y0VFt/N +JcYjBidnSVKUIgsmU4B8WCgiy2DRpQhYMTjgKcr34g0Q8n6ReoVCvIzdCpjMdWRLexU wIj/2XjavK6d3ZNwpvt+rVqcVAjlPebNsMFI/jcHcP6mSbOuTwBQFtzD7XL+eYvP10Os 70Pg== X-Gm-Message-State: AMCzsaUIxq2w69ov6quoGvFuQTMZfQLRyHMYn777f4ea8tWeUHNjilUR kDDatFC6Q+VvjLgEuymx3iXYlhn8 X-Google-Smtp-Source: ABhQp+Shdg1QQDYPhm/OwTrYyCWxPpYYPgaDZnCSyRDwmzjbrpB6RXTqhKojXGYBwYNFx5+aIBgNuQ== X-Received: by 10.223.176.14 with SMTP id f14mr10684597wra.129.1508841361683; Tue, 24 Oct 2017 03:36:01 -0700 (PDT) Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id w4sm12205088wrc.17.2017.10.24.03.36.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Oct 2017 03:36:00 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Tue, 24 Oct 2017 12:35:38 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: <409639fdf67753288cff5bf7d91f725666ff5678.1508840586.git.gaetan.rivet@6wind.com> References: <409639fdf67753288cff5bf7d91f725666ff5678.1508840586.git.gaetan.rivet@6wind.com> Subject: [dpdk-dev] [PATCH v2 2/6] ethdev: remove detachable device flag 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: Tue, 24 Oct 2017 10:36:03 -0000 This flag is not necessary at the ether layer anymore. Buses are able to advertize their hotplug support. The ether layer can rely upon this capability instead of a special flag. Signed-off-by: Gaetan Rivet Acked-by: Andrew Rybchenko --- drivers/net/af_packet/rte_eth_af_packet.c | 1 - drivers/net/ark/ark_ethdev.c | 1 - drivers/net/avp/avp_ethdev.c | 2 -- drivers/net/bnxt/bnxt_ethdev.c | 1 - drivers/net/bonding/rte_eth_bond_pmd.c | 3 +-- drivers/net/e1000/em_ethdev.c | 1 - drivers/net/e1000/igb_ethdev.c | 2 -- drivers/net/fm10k/fm10k_ethdev.c | 1 - drivers/net/i40e/i40e_ethdev.c | 1 - drivers/net/i40e/i40e_ethdev_vf.c | 1 - drivers/net/ixgbe/ixgbe_ethdev.c | 2 -- drivers/net/kni/rte_eth_kni.c | 2 -- drivers/net/liquidio/lio_ethdev.c | 1 - drivers/net/mlx4/mlx4.c | 1 - drivers/net/mlx5/mlx5.c | 1 - drivers/net/nfp/nfp_net.c | 19 ++++++++++++++++--- drivers/net/null/rte_eth_null.c | 2 -- drivers/net/pcap/rte_eth_pcap.c | 1 - drivers/net/ring/rte_eth_ring.c | 1 - drivers/net/sfc/sfc_ethdev.c | 2 -- drivers/net/softnic/rte_eth_softnic.c | 1 - drivers/net/tap/rte_eth_tap.c | 2 +- drivers/net/vhost/rte_eth_vhost.c | 3 +-- drivers/net/virtio/virtio_ethdev.c | 1 - drivers/net/virtio/virtio_user_ethdev.c | 1 - drivers/net/vmxnet3/vmxnet3_ethdev.c | 1 - lib/librte_ether/rte_ethdev.h | 2 -- 27 files changed, 19 insertions(+), 38 deletions(-) diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c index 46b8250..c6b86a3 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -814,7 +814,6 @@ rte_pmd_init_internals(struct rte_vdev_device *dev, (*eth_dev)->data = data; (*eth_dev)->dev_ops = &ops; - (*eth_dev)->data->dev_flags = RTE_ETH_DEV_DETACHABLE; return 0; diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c index dae1f3d..1760628 100644 --- a/drivers/net/ark/ark_ethdev.c +++ b/drivers/net/ark/ark_ethdev.c @@ -342,7 +342,6 @@ eth_ark_dev_init(struct rte_eth_dev *dev) /* We are a single function multi-port device. */ ret = ark_config_device(dev); dev->dev_ops = &ark_eth_dev_ops; - dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE; dev->data->mac_addrs = rte_zmalloc("ark", ETHER_ADDR_LEN, 0); if (!dev->data->mac_addrs) { diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c index b97a90c..d729b26 100644 --- a/drivers/net/avp/avp_ethdev.c +++ b/drivers/net/avp/avp_ethdev.c @@ -1004,8 +1004,6 @@ eth_avp_dev_init(struct rte_eth_dev *eth_dev) rte_eth_copy_pci_info(eth_dev, pci_dev); - eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE; - /* Check current migration status */ if (avp_dev_migration_pending(eth_dev)) { PMD_DRV_LOG(ERR, "VM live migration operation in progress\n"); diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index d3da301..29252d8 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -2780,7 +2780,6 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev) RTE_LOG(INFO, PMD, "%s\n", bnxt_version); rte_eth_copy_pci_info(eth_dev, pci_dev); - eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE; bp = eth_dev->data->dev_private; diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 3fbc1b1..cbc7ddd 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2761,8 +2761,7 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode) } eth_dev->dev_ops = &default_dev_ops; - eth_dev->data->dev_flags = RTE_ETH_DEV_INTR_LSC | - RTE_ETH_DEV_DETACHABLE; + eth_dev->data->dev_flags = RTE_ETH_DEV_INTR_LSC; rte_spinlock_init(&internals->lock); diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 6ebfa6d..a599260 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -341,7 +341,6 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev) } rte_eth_copy_pci_info(eth_dev, pci_dev); - eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE; hw->hw_addr = (void *)pci_dev->mem_resource[0].addr; hw->device_id = pci_dev->id.device_id; diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index 003bdf0..2fd679b 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -818,7 +818,6 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev) } rte_eth_copy_pci_info(eth_dev, pci_dev); - eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE; hw->hw_addr= (void *)pci_dev->mem_resource[0].addr; @@ -1053,7 +1052,6 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev) pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); rte_eth_copy_pci_info(eth_dev, pci_dev); - eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE; hw->device_id = pci_dev->id.device_id; hw->vendor_id = pci_dev->id.vendor_id; diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 586f482..d760600 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -2909,7 +2909,6 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev) } rte_eth_copy_pci_info(dev, pdev); - dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE; macvlan = FM10K_DEV_PRIVATE_TO_MACVLAN(dev->data->dev_private); memset(macvlan, 0, sizeof(*macvlan)); diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index f40c463..d360a32 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -1100,7 +1100,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev) intr_handle = &pci_dev->intr_handle; rte_eth_copy_pci_info(dev, pci_dev); - dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE; pf->adapter = I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); pf->adapter->eth_dev = dev; diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 9f14875..bc8bbca 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1461,7 +1461,6 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev) i40e_set_default_ptype_table(eth_dev); i40e_set_default_pctype_table(eth_dev); rte_eth_copy_pci_info(eth_dev, pci_dev); - eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE; hw->vendor_id = pci_dev->id.vendor_id; hw->device_id = pci_dev->id.device_id; diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 14b9c53..ad18b6f 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -1168,7 +1168,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev) } rte_eth_copy_pci_info(eth_dev, pci_dev); - eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE; /* Vendor and Device ID need to be set before init of shared code */ hw->device_id = pci_dev->id.device_id; @@ -1627,7 +1626,6 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev) } rte_eth_copy_pci_info(eth_dev, pci_dev); - eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE; hw->device_id = pci_dev->id.device_id; hw->vendor_id = pci_dev->id.vendor_id; diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index d290c79..d68ff7a 100644 --- a/drivers/net/kni/rte_eth_kni.c +++ b/drivers/net/kni/rte_eth_kni.c @@ -397,8 +397,6 @@ eth_kni_create(struct rte_vdev_device *vdev, eth_dev->data = data; eth_dev->dev_ops = ð_kni_ops; - data->dev_flags = RTE_ETH_DEV_DETACHABLE; - internals->no_request_thread = args->no_request_thread; return eth_dev; diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c index 239f6af..924eb26 100644 --- a/drivers/net/liquidio/lio_ethdev.c +++ b/drivers/net/liquidio/lio_ethdev.c @@ -2079,7 +2079,6 @@ lio_eth_dev_init(struct rte_eth_dev *eth_dev) return 0; rte_eth_copy_pci_info(eth_dev, pdev); - eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE; if (pdev->mem_resource[0].addr) { lio_dev->hw_addr = pdev->mem_resource[0].addr; diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index a297b9a..59286af 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -642,7 +642,6 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) eth_dev->intr_handle = &priv->intr_handle; priv->dev = eth_dev; eth_dev->dev_ops = &mlx4_dev_ops; - eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE; /* Bring Ethernet device up. */ DEBUG("forcing Ethernet interface up"); mlx4_dev_set_link_up(priv->dev); diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 29221dc..9abe333 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -917,7 +917,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) eth_dev->data->mac_addrs = priv->mac; eth_dev->device = &pci_dev->device; rte_eth_copy_pci_info(eth_dev, pci_dev); - eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE; eth_dev->device->driver = &mlx5_driver.driver; priv->dev = eth_dev; eth_dev->dev_ops = &mlx5_dev_ops; diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 0917b9c..b2ad20e 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -2668,9 +2668,6 @@ nfp_net_init(struct rte_eth_dev *eth_dev) return 0; rte_eth_copy_pci_info(eth_dev, pci_dev); - /* hotplug is not possible with multiport PF */ - if (!hw->pf_multiport_enabled) - eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE; hw->device_id = pci_dev->id.device_id; hw->vendor_id = pci_dev->id.vendor_id; @@ -3016,6 +3013,22 @@ static int eth_nfp_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, static int eth_nfp_pci_remove(struct rte_pci_device *pci_dev) { + struct rte_eth_dev *eth_dev; + struct nfp_net_hw *hw, *hwport0; + int port = 0; + + eth_dev = rte_eth_dev_allocated(pci_dev->device.name); + if ((pci_dev->id.device_id == PCI_DEVICE_ID_NFP4000_PF_NIC) || + (pci_dev->id.device_id == PCI_DEVICE_ID_NFP6000_PF_NIC)) { + port = get_pf_port_number(eth_dev->data->name); + hwport0 = NFP_NET_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); + hw = &hwport0[port]; + } else { + hw = NFP_NET_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); + } + /* hotplug is not possible with multiport PF */ + if (!hw->pf_multiport_enabled) + return -ENOTSUP; return rte_eth_dev_pci_generic_remove(pci_dev, NULL); } diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index 47c7b14..3433c9c 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -542,8 +542,6 @@ eth_dev_null_create(struct rte_vdev_device *dev, eth_dev->data = data; eth_dev->dev_ops = &ops; - data->dev_flags = RTE_ETH_DEV_DETACHABLE; - /* finally assign rx and tx ops */ if (packet_copy) { eth_dev->rx_pkt_burst = eth_null_copy_rx; diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 1b8a74e..3205df8 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -840,7 +840,6 @@ pmd_init_internals(struct rte_vdev_device *vdev, */ (*eth_dev)->data = data; (*eth_dev)->dev_ops = &ops; - data->dev_flags = RTE_ETH_DEV_DETACHABLE; return 0; } diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index 61473ca..d82d207 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -358,7 +358,6 @@ do_eth_dev_ring_create(const char *name, eth_dev->data = data; eth_dev->dev_ops = &ops; - data->dev_flags = RTE_ETH_DEV_DETACHABLE; data->kdrv = RTE_KDRV_NONE; data->numa_node = numa_node; diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c index bd09191..cd82b0d 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -1791,8 +1791,6 @@ sfc_eth_dev_init(struct rte_eth_dev *dev) /* Copy PCI device info to the dev->data */ rte_eth_copy_pci_info(dev, pci_dev); - dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE; - rc = sfc_kvargs_parse(sa); if (rc != 0) goto fail_kvargs_parse; diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c index 34dceae..abb617a 100644 --- a/drivers/net/softnic/rte_eth_softnic.c +++ b/drivers/net/softnic/rte_eth_softnic.c @@ -557,7 +557,6 @@ pmd_ethdev_register(struct rte_vdev_device *vdev, soft_dev->data->promiscuous = 1; soft_dev->data->kdrv = RTE_KDRV_NONE; soft_dev->data->numa_node = numa_node; - soft_dev->data->dev_flags = RTE_ETH_DEV_DETACHABLE; return 0; } diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 61c6774..64dd3b0 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -1268,7 +1268,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name, /* Setup some default values */ rte_memcpy(data, dev->data, sizeof(*data)); data->dev_private = pmd; - data->dev_flags = RTE_ETH_DEV_DETACHABLE | RTE_ETH_DEV_INTR_LSC; + data->dev_flags = RTE_ETH_DEV_INTR_LSC; data->numa_node = numa_node; data->dev_link = pmd_link; diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index 3534649..f98c980 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -1086,8 +1086,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name, internal->max_queues = queues; data->dev_link = pmd_link; data->mac_addrs = eth_addr; - data->dev_flags = - RTE_ETH_DEV_DETACHABLE | RTE_ETH_DEV_INTR_LSC; + data->dev_flags = RTE_ETH_DEV_INTR_LSC; eth_dev->dev_ops = &ops; diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 0ec54a9..f3d36a0 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1384,7 +1384,6 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features) rte_eth_copy_pci_info(eth_dev, pci_dev); } - eth_dev->data->dev_flags = RTE_ETH_DEV_DETACHABLE; /* If host does not support both status and MSI-X then disable LSC */ if (vtpci_with_feature(hw, VIRTIO_NET_F_STATUS) && hw->use_msix) eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC; diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 57c964d..595585a 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -372,7 +372,6 @@ virtio_user_eth_dev_alloc(struct rte_vdev_device *vdev) hw->use_simple_rx = 0; hw->use_simple_tx = 0; hw->virtio_user_dev = dev; - data->dev_flags = RTE_ETH_DEV_DETACHABLE; return eth_dev; } diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index 58bc4f2..6f5cadf 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -309,7 +309,6 @@ eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev) return 0; rte_eth_copy_pci_info(eth_dev, pci_dev); - eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE; /* Vendor and Device ID need to be set before init of shared code */ hw->device_id = pci_dev->id.device_id; diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index aaf02b3..34cdf56 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -1798,8 +1798,6 @@ struct rte_eth_dev_data { /**< VLAN filter configuration. */ }; -/** Device supports hotplug detach */ -#define RTE_ETH_DEV_DETACHABLE 0x0001 /** Device supports link state interrupt */ #define RTE_ETH_DEV_INTR_LSC 0x0002 /** Device is a bonded slave */ -- 2.1.4