ethdev: remove detachable device flag
[dpdk.git] / drivers / net / kni / rte_eth_kni.c
index f688d91..d68ff7a 100644 (file)
@@ -145,7 +145,7 @@ eth_kni_start(struct rte_eth_dev *dev)
        uint16_t port_id = dev->data->port_id;
        struct rte_mempool *mb_pool;
        struct rte_kni_conf conf;
-       const char *name = dev->data->name + 4; /* remove net_ */
+       const char *name = dev->device->name + 4; /* remove net_ */
 
        snprintf(conf.name, RTE_KNI_NAMESIZE, "%s", name);
        conf.force_bind = 0;
@@ -283,7 +283,7 @@ eth_kni_link_update(struct rte_eth_dev *dev __rte_unused,
        return 0;
 }
 
-static void
+static int
 eth_kni_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
        unsigned long rx_packets_total = 0, rx_bytes_total = 0;
@@ -320,6 +320,8 @@ eth_kni_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
        stats->opackets = tx_packets_total;
        stats->obytes = tx_bytes_total;
        stats->oerrors = tx_packets_err_total;
+
+       return 0;
 }
 
 static void
@@ -395,8 +397,6 @@ eth_kni_create(struct rte_vdev_device *vdev,
        eth_dev->data = data;
        eth_dev->dev_ops = &eth_kni_ops;
 
-       data->dev_flags = RTE_ETH_DEV_DETACHABLE;
-
        internals->no_request_thread = args->no_request_thread;
 
        return eth_dev;