Lines Matching refs:vf

22 ice_eswitch_add_vf_mac_rule(struct ice_pf *pf, struct ice_vf *vf, const u8 *mac)  in ice_eswitch_add_vf_mac_rule()  argument
44 ctrl_vsi->rxq_map[vf->vf_id]; in ice_eswitch_add_vf_mac_rule()
50 vf->repr->mac_rule); in ice_eswitch_add_vf_mac_rule()
53 vf->vf_id); in ice_eswitch_add_vf_mac_rule()
55 vf->repr->rule_added = true; in ice_eswitch_add_vf_mac_rule()
67 void ice_eswitch_replay_vf_mac_rule(struct ice_vf *vf) in ice_eswitch_replay_vf_mac_rule() argument
71 if (!ice_is_switchdev_running(vf->pf)) in ice_eswitch_replay_vf_mac_rule()
74 if (is_valid_ether_addr(vf->hw_lan_addr)) { in ice_eswitch_replay_vf_mac_rule()
75 err = ice_eswitch_add_vf_mac_rule(vf->pf, vf, in ice_eswitch_replay_vf_mac_rule()
76 vf->hw_lan_addr); in ice_eswitch_replay_vf_mac_rule()
78 dev_err(ice_pf_to_dev(vf->pf), "Failed to add MAC %pM for VF %d\n, error %d\n", in ice_eswitch_replay_vf_mac_rule()
79 vf->hw_lan_addr, vf->vf_id, err); in ice_eswitch_replay_vf_mac_rule()
82 vf->num_mac++; in ice_eswitch_replay_vf_mac_rule()
84 ether_addr_copy(vf->dev_lan_addr, vf->hw_lan_addr); in ice_eswitch_replay_vf_mac_rule()
95 void ice_eswitch_del_vf_mac_rule(struct ice_vf *vf) in ice_eswitch_del_vf_mac_rule() argument
97 if (!ice_is_switchdev_running(vf->pf)) in ice_eswitch_del_vf_mac_rule()
100 if (!vf->repr->rule_added) in ice_eswitch_del_vf_mac_rule()
103 ice_rem_adv_rule_by_id(&vf->pf->hw, vf->repr->mac_rule); in ice_eswitch_del_vf_mac_rule()
104 vf->repr->rule_added = false; in ice_eswitch_del_vf_mac_rule()
183 struct ice_vf *vf; in ice_eswitch_remap_rings_to_vectors() local
185 vf = ice_get_vf_by_id(pf, q_id); in ice_eswitch_remap_rings_to_vectors()
186 if (WARN_ON(!vf)) in ice_eswitch_remap_rings_to_vectors()
189 repr = vf->repr; in ice_eswitch_remap_rings_to_vectors()
213 ice_put_vf(vf); in ice_eswitch_remap_rings_to_vectors()
225 struct ice_vf *vf; in ice_eswitch_release_reprs() local
230 ice_for_each_vf(pf, bkt, vf) { in ice_eswitch_release_reprs()
231 struct ice_vsi *vsi = vf->repr->src_vsi; in ice_eswitch_release_reprs()
234 if (!vf->repr->dst) in ice_eswitch_release_reprs()
238 metadata_dst_free(vf->repr->dst); in ice_eswitch_release_reprs()
239 vf->repr->dst = NULL; in ice_eswitch_release_reprs()
240 ice_fltr_add_mac_and_broadcast(vsi, vf->hw_lan_addr, in ice_eswitch_release_reprs()
243 netif_napi_del(&vf->repr->q_vector->napi); in ice_eswitch_release_reprs()
255 struct ice_vf *vf; in ice_eswitch_setup_reprs() local
260 ice_for_each_vf(pf, bkt, vf) { in ice_eswitch_setup_reprs()
261 struct ice_vsi *vsi = vf->repr->src_vsi; in ice_eswitch_setup_reprs()
264 vf->repr->dst = metadata_dst_alloc(0, METADATA_HW_PORT_MUX, in ice_eswitch_setup_reprs()
266 if (!vf->repr->dst) { in ice_eswitch_setup_reprs()
268 vf->hw_lan_addr, in ice_eswitch_setup_reprs()
275 vf->hw_lan_addr, in ice_eswitch_setup_reprs()
277 metadata_dst_free(vf->repr->dst); in ice_eswitch_setup_reprs()
278 vf->repr->dst = NULL; in ice_eswitch_setup_reprs()
284 vf->hw_lan_addr, in ice_eswitch_setup_reprs()
286 metadata_dst_free(vf->repr->dst); in ice_eswitch_setup_reprs()
287 vf->repr->dst = NULL; in ice_eswitch_setup_reprs()
295 netif_napi_add(vf->repr->netdev, &vf->repr->q_vector->napi, in ice_eswitch_setup_reprs()
298 netif_keep_dst(vf->repr->netdev); in ice_eswitch_setup_reprs()
301 ice_for_each_vf(pf, bkt, vf) { in ice_eswitch_setup_reprs()
302 struct ice_repr *repr = vf->repr; in ice_eswitch_setup_reprs()
328 struct ice_vf *vf; in ice_eswitch_update_repr() local
334 vf = vsi->vf; in ice_eswitch_update_repr()
335 repr = vf->repr; in ice_eswitch_update_repr()
341 ice_fltr_add_mac_and_broadcast(vsi, vf->hw_lan_addr, ICE_FWD_TO_VSI); in ice_eswitch_update_repr()
343 vsi->vf->vf_id); in ice_eswitch_update_repr()
372 skb->queue_mapping = repr->vf->vf_id; in ice_eswitch_port_start_xmit()
443 struct ice_vf *vf; in ice_eswitch_napi_del() local
448 ice_for_each_vf(pf, bkt, vf) in ice_eswitch_napi_del()
449 netif_napi_del(&vf->repr->q_vector->napi); in ice_eswitch_napi_del()
458 struct ice_vf *vf; in ice_eswitch_napi_enable() local
463 ice_for_each_vf(pf, bkt, vf) in ice_eswitch_napi_enable()
464 napi_enable(&vf->repr->q_vector->napi); in ice_eswitch_napi_enable()
473 struct ice_vf *vf; in ice_eswitch_napi_disable() local
478 ice_for_each_vf(pf, bkt, vf) in ice_eswitch_napi_disable()
479 napi_disable(&vf->repr->q_vector->napi); in ice_eswitch_napi_disable()
648 struct ice_vf *vf; in ice_eswitch_start_all_tx_queues() local
656 ice_for_each_vf(pf, bkt, vf) { in ice_eswitch_start_all_tx_queues()
657 if (vf->repr) in ice_eswitch_start_all_tx_queues()
658 ice_repr_start_tx_queues(vf->repr); in ice_eswitch_start_all_tx_queues()
668 struct ice_vf *vf; in ice_eswitch_stop_all_tx_queues() local
676 ice_for_each_vf(pf, bkt, vf) { in ice_eswitch_stop_all_tx_queues()
677 if (vf->repr) in ice_eswitch_stop_all_tx_queues()
678 ice_repr_stop_tx_queues(vf->repr); in ice_eswitch_stop_all_tx_queues()