X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fnetvsc%2Fhn_var.h;h=d1d38b459601d841a0f16a115b4307a872305e61;hb=d789705873d47d70a3ba0a6a4dfb83fb629d3464;hp=822d737bd3ccf44d555d29882b3e7820391d05dd;hpb=cc0251813277fcf43b930b43ab4a423ed7536120;p=dpdk.git diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h index 822d737bd3..d1d38b4596 100644 --- a/drivers/net/netvsc/hn_var.h +++ b/drivers/net/netvsc/hn_var.h @@ -98,7 +98,7 @@ struct hn_rx_bufinfo { struct hn_data { struct rte_vmbus_device *vmbus; struct hn_rx_queue *primary; - rte_spinlock_t vf_lock; + rte_rwlock_t vf_lock; uint16_t port_id; uint16_t vf_port; @@ -139,8 +139,6 @@ struct hn_data { uint8_t rss_key[40]; uint16_t rss_ind[128]; - struct rte_ether_addr mac_addr; - struct rte_eth_dev_owner owner; struct rte_intr_handle vf_intr; @@ -190,15 +188,15 @@ hn_vf_attached(const struct hn_data *hv) return hv->vf_port != HN_INVALID_PORT; } -/* Get VF device for existing netvsc device */ +/* + * Get VF device for existing netvsc device + * Assumes vf_lock is held. + */ static inline struct rte_eth_dev * hn_get_vf_dev(const struct hn_data *hv) { uint16_t vf_port = hv->vf_port; - /* make sure vf_port is loaded */ - rte_smp_rmb(); - if (vf_port == HN_INVALID_PORT) return NULL; else