bus/pci: query PCI extended capabilities
[dpdk.git] / drivers / net / netvsc / hn_ethdev.c
index ac182a5..229c1b9 100644 (file)
@@ -45,9 +45,6 @@
                            DEV_RX_OFFLOAD_VLAN_STRIP | \
                            DEV_RX_OFFLOAD_RSS_HASH)
 
-int hn_logtype_init;
-int hn_logtype_driver;
-
 struct hn_xstats_name_off {
        char name[RTE_ETH_XSTATS_NAME_SIZE];
        unsigned int offset;
@@ -874,11 +871,8 @@ static const struct eth_dev_ops hn_eth_dev_ops = {
        .tx_queue_setup         = hn_dev_tx_queue_setup,
        .tx_queue_release       = hn_dev_tx_queue_release,
        .tx_done_cleanup        = hn_dev_tx_done_cleanup,
-       .tx_descriptor_status   = hn_dev_tx_descriptor_status,
        .rx_queue_setup         = hn_dev_rx_queue_setup,
        .rx_queue_release       = hn_dev_rx_queue_release,
-       .rx_queue_count         = hn_dev_rx_queue_count,
-       .rx_descriptor_status   = hn_dev_rx_queue_status,
        .link_update            = hn_dev_link_update,
        .stats_get              = hn_dev_stats_get,
        .stats_reset            = hn_dev_stats_reset,
@@ -939,6 +933,9 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
 
        vmbus = container_of(device, struct rte_vmbus_device, device);
        eth_dev->dev_ops = &hn_eth_dev_ops;
+       eth_dev->rx_queue_count = hn_dev_rx_queue_count;
+       eth_dev->rx_descriptor_status = hn_dev_rx_queue_status;
+       eth_dev->tx_descriptor_status = hn_dev_tx_descriptor_status;
        eth_dev->tx_pkt_burst = &hn_xmit_pkts;
        eth_dev->rx_pkt_burst = &hn_recv_pkts;
 
@@ -1121,13 +1118,5 @@ static struct rte_vmbus_driver rte_netvsc_pmd = {
 
 RTE_PMD_REGISTER_VMBUS(net_netvsc, rte_netvsc_pmd);
 RTE_PMD_REGISTER_KMOD_DEP(net_netvsc, "* uio_hv_generic");
-
-RTE_INIT(hn_init_log)
-{
-       hn_logtype_init = rte_log_register("pmd.net.netvsc.init");
-       if (hn_logtype_init >= 0)
-               rte_log_set_level(hn_logtype_init, RTE_LOG_NOTICE);
-       hn_logtype_driver = rte_log_register("pmd.net.netvsc.driver");
-       if (hn_logtype_driver >= 0)
-               rte_log_set_level(hn_logtype_driver, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(hn_logtype_init, pmd.net.netvsc.init, NOTICE);
+RTE_LOG_REGISTER(hn_logtype_driver, pmd.net.netvsc.driver, NOTICE);