net/ice: support RSS hash configuration in DCF mode
[dpdk.git] / drivers / net / netvsc / hn_vf.c
index 75192e6..62948bf 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);
@@ -129,6 +129,10 @@ static void hn_remove_delayed(void *args)
                PMD_DRV_LOG(ERR, "rte_eth_dev_stop failed port_id=%u ret=%d",
                            port_id, ret);
 
+       /* Record the device parameters for possible hotplug events */
+       if (dev->devargs && dev->devargs->args)
+               hv->vf_devargs = strdup(dev->devargs->args);
+
        ret = rte_eth_dev_close(port_id);
        if (ret)
                PMD_DRV_LOG(ERR, "rte_eth_dev_close failed port_id=%u ret=%d",
@@ -624,11 +628,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 +660,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);
 }