examples/l3fwd: share queue size variables
[dpdk.git] / drivers / net / netvsc / hn_vf.c
index 75192e6..ebb9c60 100644 (file)
@@ -103,7 +103,7 @@ static void hn_remove_delayed(void *args)
        struct rte_device *dev = rte_eth_devices[port_id].device;
        int ret;
 
-       /* Tell VSP to switch data path to synthentic */
+       /* Tell VSP to switch data path to synthetic */
        hn_vf_remove(hv);
 
        PMD_DRV_LOG(NOTICE, "Start to remove port %d", port_id);
@@ -624,11 +624,8 @@ void hn_vf_tx_queue_release(struct hn_data *hv, uint16_t queue_id)
 
        rte_rwlock_read_lock(&hv->vf_lock);
        vf_dev = hn_get_vf_dev(hv);
-       if (vf_dev && vf_dev->dev_ops->tx_queue_release) {
-               void *subq = vf_dev->data->tx_queues[queue_id];
-
-               (*vf_dev->dev_ops->tx_queue_release)(subq);
-       }
+       if (vf_dev && vf_dev->dev_ops->tx_queue_release)
+               (*vf_dev->dev_ops->tx_queue_release)(vf_dev, queue_id);
 
        rte_rwlock_read_unlock(&hv->vf_lock);
 }
@@ -659,11 +656,8 @@ void hn_vf_rx_queue_release(struct hn_data *hv, uint16_t queue_id)
 
        rte_rwlock_read_lock(&hv->vf_lock);
        vf_dev = hn_get_vf_dev(hv);
-       if (vf_dev && vf_dev->dev_ops->rx_queue_release) {
-               void *subq = vf_dev->data->rx_queues[queue_id];
-
-               (*vf_dev->dev_ops->rx_queue_release)(subq);
-       }
+       if (vf_dev && vf_dev->dev_ops->rx_queue_release)
+               (*vf_dev->dev_ops->rx_queue_release)(vf_dev, queue_id);
        rte_rwlock_read_unlock(&hv->vf_lock);
 }