ethdev: remove useless parameter in callback process
[dpdk.git] / drivers / net / virtio / virtio_ethdev.c
index 21f2131..ebb968c 100644 (file)
@@ -77,6 +77,9 @@ static int virtio_dev_queue_stats_mapping_set(
        uint8_t stat_idx,
        uint8_t is_rx);
 
+int virtio_logtype_init;
+int virtio_logtype_driver;
+
 /*
  * The set of PCI devices this driver supports
  */
@@ -864,7 +867,7 @@ static int virtio_dev_xstats_get_names(struct rte_eth_dev *dev,
                /* Note: limit checked in rte_eth_xstats_names() */
 
                for (i = 0; i < dev->data->nb_rx_queues; i++) {
-                       struct virtqueue *rxvq = dev->data->rx_queues[i];
+                       struct virtnet_rx *rxvq = dev->data->rx_queues[i];
                        if (rxvq == NULL)
                                continue;
                        for (t = 0; t < VIRTIO_NB_RXQ_XSTATS; t++) {
@@ -877,7 +880,7 @@ static int virtio_dev_xstats_get_names(struct rte_eth_dev *dev,
                }
 
                for (i = 0; i < dev->data->nb_tx_queues; i++) {
-                       struct virtqueue *txvq = dev->data->tx_queues[i];
+                       struct virtnet_tx *txvq = dev->data->tx_queues[i];
                        if (txvq == NULL)
                                continue;
                        for (t = 0; t < VIRTIO_NB_TXQ_XSTATS; t++) {
@@ -1237,7 +1240,7 @@ virtio_interrupt_handler(void *param)
                if (virtio_dev_link_update(dev, 0) == 0)
                        _rte_eth_dev_callback_process(dev,
                                                      RTE_ETH_EVENT_INTR_LSC,
-                                                     NULL, NULL);
+                                                     NULL);
        }
 
 }
@@ -1725,7 +1728,7 @@ virtio_dev_configure(struct rte_eth_dev *dev)
 
        if (rxmode->enable_lro &&
                (!vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4) ||
-                       !vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4))) {
+                !vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO6))) {
                PMD_DRV_LOG(ERR,
                        "Large Receive Offload not available on this host");
                return -ENOTSUP;
@@ -1831,7 +1834,7 @@ virtio_dev_start(struct rte_eth_dev *dev)
        for (i = 0; i < dev->data->nb_rx_queues; i++) {
                rxvq = dev->data->rx_queues[i];
                /* Flush the old packets */
-               virtqueue_flush(rxvq->vq);
+               virtqueue_rxvq_flush(rxvq->vq);
                virtqueue_notify(rxvq->vq);
        }
 
@@ -1936,7 +1939,7 @@ virtio_dev_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complet
        virtio_dev_atomic_read_link_status(dev, &link);
        old = link;
        link.link_duplex = ETH_LINK_FULL_DUPLEX;
-       link.link_speed  = SPEED_10G;
+       link.link_speed  = ETH_SPEED_NUM_10G;
 
        if (hw->started == 0) {
                link.link_status = ETH_LINK_DOWN;
@@ -2043,3 +2046,15 @@ __rte_unused uint8_t is_rx)
 RTE_PMD_EXPORT_NAME(net_virtio, __COUNTER__);
 RTE_PMD_REGISTER_PCI_TABLE(net_virtio, pci_id_virtio_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_virtio, "* igb_uio | uio_pci_generic | vfio-pci");
+
+RTE_INIT(virtio_init_log);
+static void
+virtio_init_log(void)
+{
+       virtio_logtype_init = rte_log_register("pmd.virtio.init");
+       if (virtio_logtype_init >= 0)
+               rte_log_set_level(virtio_logtype_init, RTE_LOG_NOTICE);
+       virtio_logtype_driver = rte_log_register("pmd.virtio.driver");
+       if (virtio_logtype_driver >= 0)
+               rte_log_set_level(virtio_logtype_driver, RTE_LOG_NOTICE);
+}