net/iavf: fix command after PF reset
[dpdk.git] / drivers / net / iavf / iavf_ethdev.c
index 5f3aea8..6bb915d 100644 (file)
@@ -117,9 +117,6 @@ static const struct eth_dev_ops iavf_eth_dev_ops = {
        .rss_hash_conf_get          = iavf_dev_rss_hash_conf_get,
        .rxq_info_get               = iavf_dev_rxq_info_get,
        .txq_info_get               = iavf_dev_txq_info_get,
-       .rx_queue_count             = iavf_dev_rxq_count,
-       .rx_descriptor_status       = iavf_dev_rx_desc_status,
-       .tx_descriptor_status       = iavf_dev_tx_desc_status,
        .mtu_set                    = iavf_dev_mtu_set,
        .rx_queue_intr_enable       = iavf_dev_rx_queue_intr_enable,
        .rx_queue_intr_disable      = iavf_dev_rx_queue_intr_disable,
@@ -1020,9 +1017,6 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
        old_addr = (struct rte_ether_addr *)hw->mac.addr;
        perm_addr = (struct rte_ether_addr *)hw->mac.perm_addr;
 
-       if (rte_is_same_ether_addr(mac_addr, old_addr))
-               return 0;
-
        /* If the MAC address is configured by host, skip the setting */
        if (rte_is_valid_assigned_ether_addr(perm_addr))
                return -EPERM;
@@ -1291,6 +1285,8 @@ iavf_init_vf(struct rte_eth_dev *dev)
                }
        }
 
+       vf->vf_reset = false;
+
        return 0;
 err_rss:
        rte_free(vf->rss_key);
@@ -1386,6 +1382,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
 
        /* assign ops func pointer */
        eth_dev->dev_ops = &iavf_eth_dev_ops;
+       eth_dev->rx_queue_count = iavf_dev_rxq_count;
+       eth_dev->rx_descriptor_status = iavf_dev_rx_desc_status;
+       eth_dev->tx_descriptor_status = iavf_dev_tx_desc_status;
        eth_dev->rx_pkt_burst = &iavf_recv_pkts;
        eth_dev->tx_pkt_burst = &iavf_xmit_pkts;
        eth_dev->tx_pkt_prepare = &iavf_prep_pkts;