Lines Matching refs:adapter
133 void opa_vnic_release_mac_tbl(struct opa_vnic_adapter *adapter) in opa_vnic_release_mac_tbl() argument
137 mutex_lock(&adapter->mactbl_lock); in opa_vnic_release_mac_tbl()
138 mactbl = rcu_access_pointer(adapter->mactbl); in opa_vnic_release_mac_tbl()
139 rcu_assign_pointer(adapter->mactbl, NULL); in opa_vnic_release_mac_tbl()
142 adapter->info.vport.mac_tbl_digest = 0; in opa_vnic_release_mac_tbl()
143 mutex_unlock(&adapter->mactbl_lock); in opa_vnic_release_mac_tbl()
152 void opa_vnic_query_mac_tbl(struct opa_vnic_adapter *adapter, in opa_vnic_query_mac_tbl() argument
161 mactbl = rcu_dereference(adapter->mactbl); in opa_vnic_query_mac_tbl()
184 tbl->mac_tbl_digest = cpu_to_be32(adapter->info.vport.mac_tbl_digest); in opa_vnic_query_mac_tbl()
204 int opa_vnic_update_mac_tbl(struct opa_vnic_adapter *adapter, in opa_vnic_update_mac_tbl() argument
213 mutex_lock(&adapter->mactbl_lock); in opa_vnic_update_mac_tbl()
217 mutex_unlock(&adapter->mactbl_lock); in opa_vnic_update_mac_tbl()
259 old_mactbl = rcu_access_pointer(adapter->mactbl); in opa_vnic_update_mac_tbl()
282 rcu_assign_pointer(adapter->mactbl, new_mactbl); in opa_vnic_update_mac_tbl()
285 adapter->info.vport.mac_tbl_digest = be32_to_cpu(tbl->mac_tbl_digest); in opa_vnic_update_mac_tbl()
293 mutex_unlock(&adapter->mactbl_lock); in opa_vnic_update_mac_tbl()
298 static uint32_t opa_vnic_chk_mac_tbl(struct opa_vnic_adapter *adapter, in opa_vnic_chk_mac_tbl() argument
307 mactbl = rcu_dereference(adapter->mactbl); in opa_vnic_chk_mac_tbl()
333 static uint32_t opa_vnic_get_dlid(struct opa_vnic_adapter *adapter, in opa_vnic_get_dlid() argument
336 struct __opa_veswport_info *info = &adapter->info; in opa_vnic_get_dlid()
340 dlid = opa_vnic_chk_mac_tbl(adapter, mac_hdr); in opa_vnic_get_dlid()
387 u8 opa_vnic_get_vl(struct opa_vnic_adapter *adapter, struct sk_buff *skb) in opa_vnic_get_vl() argument
390 struct __opa_veswport_info *info = &adapter->info; in opa_vnic_get_vl()
460 static inline u8 opa_vnic_get_def_port(struct opa_vnic_adapter *adapter, in opa_vnic_get_def_port() argument
467 return adapter->flow_tbl[flow_id & (OPA_VNIC_FLOW_TBL_SIZE - 1)]; in opa_vnic_get_def_port()
483 void opa_vnic_encap_skb(struct opa_vnic_adapter *adapter, struct sk_buff *skb) in opa_vnic_encap_skb() argument
485 struct __opa_veswport_info *info = &adapter->info; in opa_vnic_encap_skb()
494 def_port = opa_vnic_get_def_port(adapter, entropy); in opa_vnic_encap_skb()
496 dlid = opa_vnic_get_dlid(adapter, skb, def_port); in opa_vnic_encap_skb()
502 mdata->vl = opa_vnic_get_vl(adapter, skb); in opa_vnic_encap_skb()