net: add rte prefix to ether structures
[dpdk.git] / drivers / net / netvsc / hn_vf.c
index 883272f..f1be7e2 100644 (file)
 /* Search for VF with matching MAC address, return port id */
 static int hn_vf_match(const struct rte_eth_dev *dev)
 {
-       const struct ether_addr *mac = dev->data->mac_addrs;
+       const struct rte_ether_addr *mac = dev->data->mac_addrs;
        int i;
 
        RTE_ETH_FOREACH_DEV(i) {
                const struct rte_eth_dev *vf_dev = &rte_eth_devices[i];
-               const struct ether_addr *vf_mac = vf_dev->data->mac_addrs;
+               const struct rte_ether_addr *vf_mac = vf_dev->data->mac_addrs;
 
                if (vf_dev == dev)
                        continue;
@@ -362,7 +362,16 @@ void hn_vf_reset(struct rte_eth_dev *dev)
 
 void hn_vf_close(struct rte_eth_dev *dev)
 {
-       VF_ETHDEV_FUNC(dev, rte_eth_dev_close);
+       struct hn_data *hv = dev->data->dev_private;
+       uint16_t vf_port;
+
+       rte_spinlock_lock(&hv->vf_lock);
+       vf_port = hv->vf_port;
+       if (vf_port != HN_INVALID_PORT)
+               rte_eth_dev_close(vf_port);
+
+       hv->vf_port = HN_INVALID_PORT;
+       rte_spinlock_unlock(&hv->vf_lock);
 }
 
 void hn_vf_stats_reset(struct rte_eth_dev *dev)
@@ -391,7 +400,7 @@ void hn_vf_promiscuous_disable(struct rte_eth_dev *dev)
 }
 
 int hn_vf_mc_addr_list(struct rte_eth_dev *dev,
-                       struct ether_addr *mc_addr_set,
+                       struct rte_ether_addr *mc_addr_set,
                        uint32_t nb_mc_addr)
 {
        struct hn_data *hv = dev->data->dev_private;