Lines Matching refs:vf_id
63 ice_aq_send_msg_to_vf(hw, vf->vf_id, v_opcode, v_retval, msg, in ice_vc_vf_broadcast()
141 ice_aq_send_msg_to_vf(hw, vf->vf_id, VIRTCHNL_OP_EVENT, in ice_vc_notify_vf_link_state()
193 wr32(hw, VPINT_ALLOC(vf->vf_id), 0); in ice_dis_vf_mappings()
194 wr32(hw, VPINT_ALLOC_PCI(vf->vf_id), 0); in ice_dis_vf_mappings()
209 wr32(hw, VPLAN_TX_QBASE(vf->vf_id), 0); in ice_dis_vf_mappings()
215 wr32(hw, VPLAN_RX_QBASE(vf->vf_id), 0); in ice_dis_vf_mappings()
281 ice_vsi_stop_lan_tx_rings(vsi, ICE_NO_RESET, vf->vf_id); in ice_dis_vf_qs()
339 int vf_id; in ice_free_vfs() local
344 for (vf_id = 0; vf_id < tmp; vf_id++) { in ice_free_vfs()
347 reg_idx = (hw->func_caps.vf_base_id + vf_id) / 32; in ice_free_vfs()
348 bit_idx = (hw->func_caps.vf_base_id + vf_id) % 32; in ice_free_vfs()
374 vf_abs_id = vf->vf_id + hw->func_caps.vf_base_id; in ice_trigger_vf_reset()
400 reg = rd32(hw, VPGEN_VFRTRIG(vf->vf_id)); in ice_trigger_vf_reset()
402 wr32(hw, VPGEN_VFRTRIG(vf->vf_id), reg); in ice_trigger_vf_reset()
419 "VF %d PCI transactions stuck\n", vf->vf_id); in ice_trigger_vf_reset()
501 ice_vf_vsi_setup(struct ice_pf *pf, struct ice_port_info *pi, u16 vf_id) in ice_vf_vsi_setup() argument
503 return ice_vsi_setup(pf, pi, ICE_VSI_VF, vf_id); in ice_vf_vsi_setup()
520 return pf->sriov_base_vector + vf->vf_id * pf->num_vf_msix; in ice_calc_vf_first_vector_idx()
540 vsi = ice_vf_vsi_setup(pf, pf->hw.port_info, vf->vf_id); in ice_alloc_vsi_res()
648 abs_vf_id = vf->vf_id + hw->func_caps.vf_base_id; in ice_ena_vf_mappings()
654 wr32(hw, VPINT_ALLOC(vf->vf_id), reg); in ice_ena_vf_mappings()
660 wr32(hw, VPINT_ALLOC_PCI(vf->vf_id), reg); in ice_ena_vf_mappings()
675 wr32(hw, VPLAN_TXQ_MAPENA(vf->vf_id), VPLAN_TXQ_MAPENA_TX_ENA_M); in ice_ena_vf_mappings()
687 wr32(hw, VPLAN_TX_QBASE(vf->vf_id), reg); in ice_ena_vf_mappings()
694 wr32(hw, VPLAN_RXQ_MAPENA(vf->vf_id), VPLAN_RXQ_MAPENA_RX_ENA_M); in ice_ena_vf_mappings()
706 wr32(hw, VPLAN_RX_QBASE(vf->vf_id), reg); in ice_ena_vf_mappings()
767 return pf->sriov_base_vector + pf->num_vf_msix * vf->vf_id + in ice_calc_vf_reg_idx()
955 reg = rd32(hw, VPGEN_VFRTRIG(vf->vf_id)); in ice_cleanup_and_realloc_vf()
957 wr32(hw, VPGEN_VFRTRIG(vf->vf_id), reg); in ice_cleanup_and_realloc_vf()
971 wr32(hw, VFGEN_RSTAT(vf->vf_id), VIRTCHNL_VFR_VFACTIVE); in ice_cleanup_and_realloc_vf()
1046 vf->vf_id, vf->num_vf_qs); in ice_config_res_vfs()
1094 NULL, ICE_VF_RESET, vf->vf_id, NULL); in ice_reset_all_vfs()
1110 reg = rd32(hw, VPGEN_VFRSTAT(vf->vf_id)); in ice_reset_all_vfs()
1195 NULL, ICE_VF_RESET, vf->vf_id, NULL); in ice_reset_vf()
1206 reg = rd32(hw, VPGEN_VFRSTAT(vf->vf_id)); in ice_reset_vf()
1221 vf->vf_id); in ice_reset_vf()
1288 if (!vf || vf->vf_id >= vf->pf->num_alloc_vfs) in ice_vc_notify_vf_reset()
1301 ice_aq_send_msg_to_vf(&vf->pf->hw, vf->vf_id, VIRTCHNL_OP_EVENT, in ice_vc_notify_vf_reset()
1341 vfs[i].vf_id = i; in ice_alloc_vfs()
1480 int vf_id; in ice_process_vflr_event() local
1487 for (vf_id = 0; vf_id < pf->num_alloc_vfs; vf_id++) { in ice_process_vflr_event()
1488 struct ice_vf *vf = &pf->vf[vf_id]; in ice_process_vflr_event()
1491 reg_idx = (hw->func_caps.vf_base_id + vf_id) / 32; in ice_process_vflr_event()
1492 bit_idx = (hw->func_caps.vf_base_id + vf_id) % 32; in ice_process_vflr_event()
1531 if (!vf || vf->vf_id >= vf->pf->num_alloc_vfs) in ice_vc_send_msg_to_vf()
1540 vf->vf_id, v_opcode, v_retval); in ice_vc_send_msg_to_vf()
1544 vf->vf_id); in ice_vc_send_msg_to_vf()
1555 aq_ret = ice_aq_send_msg_to_vf(&pf->hw, vf->vf_id, v_opcode, v_retval, in ice_vc_send_msg_to_vf()
1560 vf->vf_id, aq_ret, pf->hw.mailboxq.sq_last_status); in ice_vc_send_msg_to_vf()
1736 return (vsi && (vsi->vf_id == vf->vf_id)); in ice_vc_isvalid_vsi_id()
2067 if (ice_vsi_stop_tx_ring(vsi, ICE_NO_RESET, vf->vf_id, in ice_vc_dis_qs_msg()
2260 vf->vf_id, min_t(u16, vsi->alloc_txq, vsi->alloc_rxq)); in ice_vc_cfg_qs_msg()
2389 vf->vf_id); in ice_vc_handle_mac_addr_msg()
2414 maddr, vf->vf_id); in ice_vc_handle_mac_addr_msg()
2420 maddr, vf->vf_id); in ice_vc_handle_mac_addr_msg()
2429 maddr, vf->vf_id); in ice_vc_handle_mac_addr_msg()
2438 vf->vf_id); in ice_vc_handle_mac_addr_msg()
2449 set ? "add" : "remove", maddr, vf->vf_id, in ice_vc_handle_mac_addr_msg()
2454 set ? "add" : "remove", vf->vf_id, status); in ice_vc_handle_mac_addr_msg()
2530 vf->vf_id); in ice_vc_request_qs_msg()
2534 vf->vf_id, ICE_MAX_BASE_QS_PER_VF); in ice_vc_request_qs_msg()
2540 vf->vf_id, req_queues - cur_queues, tx_rx_queue_left); in ice_vc_request_qs_msg()
2549 vf->vf_id, req_queues); in ice_vc_request_qs_msg()
2570 ice_set_vf_port_vlan(struct net_device *netdev, int vf_id, u16 vlan_id, u8 qos, in ice_set_vf_port_vlan() argument
2581 if (vf_id >= pf->num_alloc_vfs) { in ice_set_vf_port_vlan()
2582 dev_err(&pf->pdev->dev, "invalid VF id: %d\n", vf_id); in ice_set_vf_port_vlan()
2596 vf = &pf->vf[vf_id]; in ice_set_vf_port_vlan()
2599 dev_err(&pf->pdev->dev, "VF %d in reset. Try again.\n", vf_id); in ice_set_vf_port_vlan()
2626 vlan_id, qos, vf_id); in ice_set_vf_port_vlan()
2678 vf->vf_id); in ice_vc_process_vlan_msg()
2726 vf->vf_id); in ice_vc_process_vlan_msg()
2905 s16 vf_id = le16_to_cpu(event->desc.retval); in ice_vc_process_vf_msg() local
2911 if (vf_id >= pf->num_alloc_vfs) { in ice_vc_process_vf_msg()
2916 vf = &pf->vf[vf_id]; in ice_vc_process_vf_msg()
2938 vf_id, v_opcode, msglen, err); in ice_vc_process_vf_msg()
2999 v_opcode, vf_id); in ice_vc_process_vf_msg()
3011 vf_id, v_opcode, err); in ice_vc_process_vf_msg()
3024 ice_get_vf_cfg(struct net_device *netdev, int vf_id, struct ifla_vf_info *ivi) in ice_get_vf_cfg() argument
3032 if (vf_id >= pf->num_alloc_vfs) { in ice_get_vf_cfg()
3033 netdev_err(netdev, "invalid VF id: %d\n", vf_id); in ice_get_vf_cfg()
3037 vf = &pf->vf[vf_id]; in ice_get_vf_cfg()
3041 netdev_err(netdev, "VF %d in reset. Try again.\n", vf_id); in ice_get_vf_cfg()
3045 ivi->vf = vf_id; in ice_get_vf_cfg()
3074 int ice_set_vf_spoofchk(struct net_device *netdev, int vf_id, bool ena) in ice_set_vf_spoofchk() argument
3085 if (vf_id >= pf->num_alloc_vfs) { in ice_set_vf_spoofchk()
3086 netdev_err(netdev, "invalid VF id: %d\n", vf_id); in ice_set_vf_spoofchk()
3090 vf = &pf->vf[vf_id]; in ice_set_vf_spoofchk()
3092 netdev_err(netdev, "VF %d in reset. Try again.\n", vf_id); in ice_set_vf_spoofchk()
3137 int ice_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac) in ice_set_vf_mac() argument
3146 if (vf_id >= pf->num_alloc_vfs) { in ice_set_vf_mac()
3147 netdev_err(netdev, "invalid VF id: %d\n", vf_id); in ice_set_vf_mac()
3151 vf = &pf->vf[vf_id]; in ice_set_vf_mac()
3153 netdev_err(netdev, "VF %d in reset. Try again.\n", vf_id); in ice_set_vf_mac()
3171 vf_id, mac); in ice_set_vf_mac()
3185 int ice_set_vf_trust(struct net_device *netdev, int vf_id, bool trusted) in ice_set_vf_trust() argument
3193 if (vf_id >= pf->num_alloc_vfs) { in ice_set_vf_trust()
3194 dev_err(&pf->pdev->dev, "invalid VF id: %d\n", vf_id); in ice_set_vf_trust()
3198 vf = &pf->vf[vf_id]; in ice_set_vf_trust()
3200 dev_err(&pf->pdev->dev, "VF %d in reset. Try again.\n", vf_id); in ice_set_vf_trust()
3211 vf_id, trusted ? "" : "un"); in ice_set_vf_trust()
3224 int ice_set_vf_link_state(struct net_device *netdev, int vf_id, int link_state) in ice_set_vf_link_state() argument
3233 if (vf_id >= pf->num_alloc_vfs) { in ice_set_vf_link_state()
3234 dev_err(&pf->pdev->dev, "Invalid VF Identifier %d\n", vf_id); in ice_set_vf_link_state()
3238 vf = &pf->vf[vf_id]; in ice_set_vf_link_state()
3243 dev_err(&pf->pdev->dev, "vf %d in reset. Try again.\n", vf_id); in ice_set_vf_link_state()
3273 ice_aq_send_msg_to_vf(hw, vf->vf_id, VIRTCHNL_OP_EVENT, in ice_set_vf_link_state()