i40evf: fix write flush
[dpdk.git] / drivers / net / enic / enic_ethdev.c
index f8f7817..2a88043 100644 (file)
@@ -193,6 +193,7 @@ static int enicpmd_dev_tx_queue_start(struct rte_eth_dev *eth_dev,
        ENICPMD_FUNC_TRACE();
 
        enic_start_wq(enic, queue_idx);
+       eth_dev->data->tx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STARTED;
 
        return 0;
 }
@@ -208,6 +209,8 @@ static int enicpmd_dev_tx_queue_stop(struct rte_eth_dev *eth_dev,
        ret = enic_stop_wq(enic, queue_idx);
        if (ret)
                dev_err(enic, "error in stopping wq %d\n", queue_idx);
+       else
+               eth_dev->data->tx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STOPPED;
 
        return ret;
 }
@@ -220,6 +223,7 @@ static int enicpmd_dev_rx_queue_start(struct rte_eth_dev *eth_dev,
        ENICPMD_FUNC_TRACE();
 
        enic_start_rq(enic, queue_idx);
+       eth_dev->data->rx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STARTED;
 
        return 0;
 }
@@ -235,6 +239,8 @@ static int enicpmd_dev_rx_queue_stop(struct rte_eth_dev *eth_dev,
        ret = enic_stop_rq(enic, queue_idx);
        if (ret)
                dev_err(enic, "error in stopping rq %d\n", queue_idx);
+       else
+               eth_dev->data->rx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STOPPED;
 
        return ret;
 }
@@ -271,13 +277,14 @@ static int enicpmd_vlan_filter_set(struct rte_eth_dev *eth_dev,
        uint16_t vlan_id, int on)
 {
        struct enic *enic = pmd_priv(eth_dev);
+       int err;
 
        ENICPMD_FUNC_TRACE();
        if (on)
-               enic_add_vlan(enic, vlan_id);
+               err = enic_add_vlan(enic, vlan_id);
        else
-               enic_del_vlan(enic, vlan_id);
-       return 0;
+               err = enic_del_vlan(enic, vlan_id);
+       return err;
 }
 
 static void enicpmd_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
@@ -603,6 +610,7 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev)
        eth_dev->tx_pkt_burst = &enicpmd_xmit_pkts;
 
        pdev = eth_dev->pci_dev;
+       rte_eth_copy_pci_info(eth_dev, pdev);
        enic->pdev = pdev;
        addr = &pdev->addr;