Lines Matching refs:vf

163 	struct qed_vf_info *vf = NULL;  in qed_iov_get_vf_info()  local
172 vf = &p_hwfn->pf_iov_info->vfs_array[relative_vf_id]; in qed_iov_get_vf_info()
177 return vf; in qed_iov_get_vf_info()
430 struct qed_vf_info *vf = &p_iov_info->vfs_array[idx]; in qed_iov_setup_vfdb() local
433 vf->vf_mbx.req_virt = p_req_virt_addr + idx; in qed_iov_setup_vfdb()
434 vf->vf_mbx.req_phys = req_p + idx * sizeof(union vfpf_tlvs); in qed_iov_setup_vfdb()
435 vf->vf_mbx.reply_virt = p_reply_virt_addr + idx; in qed_iov_setup_vfdb()
436 vf->vf_mbx.reply_phys = rply_p + idx * sizeof(union pfvf_tlvs); in qed_iov_setup_vfdb()
438 vf->state = VF_STOPPED; in qed_iov_setup_vfdb()
439 vf->b_init = false; in qed_iov_setup_vfdb()
441 vf->bulletin.phys = idx * in qed_iov_setup_vfdb()
444 vf->bulletin.p_virt = p_bulletin_virt + idx; in qed_iov_setup_vfdb()
445 vf->bulletin.size = sizeof(struct qed_bulletin_content); in qed_iov_setup_vfdb()
447 vf->relative_vf_id = idx; in qed_iov_setup_vfdb()
448 vf->abs_vf_id = idx + p_iov->first_vf_in_pf; in qed_iov_setup_vfdb()
449 concrete = qed_vfid_to_concrete(p_hwfn, vf->abs_vf_id); in qed_iov_setup_vfdb()
450 vf->concrete_fid = concrete; in qed_iov_setup_vfdb()
451 vf->opaque_fid = (p_hwfn->hw_info.opaque_fid & 0xff) | in qed_iov_setup_vfdb()
452 (vf->abs_vf_id << 8); in qed_iov_setup_vfdb()
453 vf->vport_id = idx + 1; in qed_iov_setup_vfdb()
455 vf->num_mac_filters = QED_ETH_VF_NUM_MAC_FILTERS; in qed_iov_setup_vfdb()
456 vf->num_vlan_filters = QED_ETH_VF_NUM_VLAN_FILTERS; in qed_iov_setup_vfdb()
680 struct qed_vf_info *vf; in qed_iov_set_vf_to_disable() local
686 vf = qed_iov_get_vf_info(p_hwfn, rel_vf_id, false); in qed_iov_set_vf_to_disable()
687 if (!vf) in qed_iov_set_vf_to_disable()
690 vf->to_disable = to_disable; in qed_iov_set_vf_to_disable()
714 struct qed_ptt *p_ptt, struct qed_vf_info *vf) in qed_iov_vf_igu_reset() argument
719 qed_fid_pretend(p_hwfn, p_ptt, (u16)vf->concrete_fid); in qed_iov_vf_igu_reset()
727 for (i = 0; i < vf->num_sbs; i++) in qed_iov_vf_igu_reset()
729 vf->igu_sbs[i], in qed_iov_vf_igu_reset()
730 vf->opaque_fid, true); in qed_iov_vf_igu_reset()
735 struct qed_vf_info *vf, bool enable) in qed_iov_vf_igu_set_int() argument
739 qed_fid_pretend(p_hwfn, p_ptt, (u16)vf->concrete_fid); in qed_iov_vf_igu_set_int()
785 struct qed_vf_info *vf) in qed_iov_enable_vf_access() argument
793 vf->b_malicious = false; in qed_iov_enable_vf_access()
795 if (vf->to_disable) in qed_iov_enable_vf_access()
801 vf->abs_vf_id, QED_VF_ABS_ID(p_hwfn, vf)); in qed_iov_enable_vf_access()
803 qed_iov_vf_pglue_clear_err(p_hwfn, p_ptt, QED_VF_ABS_ID(p_hwfn, vf)); in qed_iov_enable_vf_access()
805 qed_iov_vf_igu_reset(p_hwfn, p_ptt, vf); in qed_iov_enable_vf_access()
808 vf->abs_vf_id, vf->num_sbs); in qed_iov_enable_vf_access()
812 qed_fid_pretend(p_hwfn, p_ptt, (u16)vf->concrete_fid); in qed_iov_enable_vf_access()
817 qed_init_run(p_hwfn, p_ptt, PHASE_VF, vf->abs_vf_id, in qed_iov_enable_vf_access()
823 vf->state = VF_FREE; in qed_iov_enable_vf_access()
843 struct qed_vf_info *vf, u8 enable) in qed_iov_config_perm_table() argument
849 for (qid = 0; qid < vf->num_rxqs; qid++) { in qed_iov_config_perm_table()
850 qed_fw_l2_queue(p_hwfn, vf->vf_queues[qid].fw_rx_qid, in qed_iov_config_perm_table()
854 val = enable ? (vf->abs_vf_id | BIT(8)) : 0; in qed_iov_config_perm_table()
861 struct qed_vf_info *vf) in qed_iov_enable_vf_traffic() argument
864 qed_iov_vf_igu_reset(p_hwfn, p_ptt, vf); in qed_iov_enable_vf_traffic()
866 qed_iov_vf_igu_set_int(p_hwfn, p_ptt, vf, 1); in qed_iov_enable_vf_traffic()
869 qed_iov_config_perm_table(p_hwfn, p_ptt, vf, true); in qed_iov_enable_vf_traffic()
874 struct qed_vf_info *vf, u16 num_rx_queues) in qed_iov_alloc_vf_igu_sbs() argument
885 SET_FIELD(val, IGU_MAPPING_LINE_FUNCTION_NUMBER, vf->abs_vf_id); in qed_iov_alloc_vf_igu_sbs()
891 vf->igu_sbs[qid] = p_block->igu_sb_id; in qed_iov_alloc_vf_igu_sbs()
901 p_hwfn->rel_pf_id, vf->abs_vf_id, 1); in qed_iov_alloc_vf_igu_sbs()
909 vf->num_sbs = (u8)num_rx_queues; in qed_iov_alloc_vf_igu_sbs()
911 return vf->num_sbs; in qed_iov_alloc_vf_igu_sbs()
916 struct qed_vf_info *vf) in qed_iov_free_vf_igu_sbs() argument
923 for (idx = 0; idx < vf->num_sbs; idx++) { in qed_iov_free_vf_igu_sbs()
924 igu_id = vf->igu_sbs[idx]; in qed_iov_free_vf_igu_sbs()
935 vf->num_sbs = 0; in qed_iov_free_vf_igu_sbs()
985 struct qed_vf_info *vf = NULL; in qed_iov_init_hw_for_vf() local
991 vf = qed_iov_get_vf_info(p_hwfn, p_params->rel_vf_id, false); in qed_iov_init_hw_for_vf()
992 if (!vf) { in qed_iov_init_hw_for_vf()
997 if (vf->b_init) { in qed_iov_init_hw_for_vf()
1040 vf->relative_vf_id, p_params->num_queues, (u16)cids); in qed_iov_init_hw_for_vf()
1045 vf, num_irqs); in qed_iov_init_hw_for_vf()
1052 vf->num_rxqs = num_of_vf_avaiable_chains; in qed_iov_init_hw_for_vf()
1053 vf->num_txqs = num_of_vf_avaiable_chains; in qed_iov_init_hw_for_vf()
1055 for (i = 0; i < vf->num_rxqs; i++) { in qed_iov_init_hw_for_vf()
1056 struct qed_vf_queue *p_queue = &vf->vf_queues[i]; in qed_iov_init_hw_for_vf()
1063 vf->relative_vf_id, i, vf->igu_sbs[i], in qed_iov_init_hw_for_vf()
1076 rc = qed_iov_enable_vf_access(p_hwfn, p_ptt, vf); in qed_iov_init_hw_for_vf()
1078 vf->b_init = true; in qed_iov_init_hw_for_vf()
1093 struct qed_vf_info *vf = NULL; in qed_iov_release_hw_for_vf() local
1095 vf = qed_iov_get_vf_info(p_hwfn, rel_vf_id, true); in qed_iov_release_hw_for_vf()
1096 if (!vf) { in qed_iov_release_hw_for_vf()
1101 if (vf->bulletin.p_virt) in qed_iov_release_hw_for_vf()
1102 memset(vf->bulletin.p_virt, 0, sizeof(*vf->bulletin.p_virt)); in qed_iov_release_hw_for_vf()
1104 memset(&vf->p_vf_info, 0, sizeof(vf->p_vf_info)); in qed_iov_release_hw_for_vf()
1116 memset(&vf->acquire, 0, sizeof(vf->acquire)); in qed_iov_release_hw_for_vf()
1122 qed_iov_vf_igu_set_int(p_hwfn, p_ptt, vf, 0); in qed_iov_release_hw_for_vf()
1125 qed_iov_config_perm_table(p_hwfn, p_ptt, vf, 0); in qed_iov_release_hw_for_vf()
1127 vf->num_rxqs = 0; in qed_iov_release_hw_for_vf()
1128 vf->num_txqs = 0; in qed_iov_release_hw_for_vf()
1129 qed_iov_free_vf_igu_sbs(p_hwfn, p_ptt, vf); in qed_iov_release_hw_for_vf()
1131 if (vf->b_init) { in qed_iov_release_hw_for_vf()
1132 vf->b_init = false; in qed_iov_release_hw_for_vf()
1323 struct qed_vf_info *vf = NULL; in qed_iov_get_public_vf_info() local
1325 vf = qed_iov_get_vf_info(p_hwfn, relative_vf_id, b_enabled_only); in qed_iov_get_public_vf_info()
1326 if (!vf) in qed_iov_get_public_vf_info()
1329 return &vf->p_vf_info; in qed_iov_get_public_vf_info()
1537 struct qed_vf_info *vf) in qed_iov_vf_mbx_acquire() argument
1539 struct qed_iov_vf_mbx *mbx = &vf->vf_mbx; in qed_iov_vf_mbx_acquire()
1556 if (vf->state != VF_FREE && vf->state != VF_STOPPED) { in qed_iov_vf_mbx_acquire()
1560 vf->abs_vf_id, vf->state); in qed_iov_vf_mbx_acquire()
1572 vf->abs_vf_id); in qed_iov_vf_mbx_acquire()
1578 vf->abs_vf_id, in qed_iov_vf_mbx_acquire()
1592 vf->abs_vf_id); in qed_iov_vf_mbx_acquire()
1597 memcpy(&vf->acquire, req, sizeof(vf->acquire)); in qed_iov_vf_mbx_acquire()
1599 vf->opaque_fid = req->vfdev_info.opaque_fid; in qed_iov_vf_mbx_acquire()
1601 vf->vf_bulletin = req->bulletin_addr; in qed_iov_vf_mbx_acquire()
1602 vf->bulletin.size = (vf->bulletin.size < req->bulletin_size) ? in qed_iov_vf_mbx_acquire()
1603 vf->bulletin.size : req->bulletin_size; in qed_iov_vf_mbx_acquire()
1647 vfpf_status = qed_iov_vf_mbx_acquire_resc(p_hwfn, p_ptt, vf, in qed_iov_vf_mbx_acquire()
1653 rc = qed_sp_vf_start(p_hwfn, vf); in qed_iov_vf_mbx_acquire()
1655 DP_NOTICE(p_hwfn, "Failed to start VF[%02x]\n", vf->abs_vf_id); in qed_iov_vf_mbx_acquire()
1661 resp->bulletin_size = vf->bulletin.size; in qed_iov_vf_mbx_acquire()
1662 qed_iov_post_vf_bulletin(p_hwfn, vf->relative_vf_id, p_ptt); in qed_iov_vf_mbx_acquire()
1668 vf->abs_vf_id, in qed_iov_vf_mbx_acquire()
1678 vf->state = VF_ACQUIRED; in qed_iov_vf_mbx_acquire()
1682 qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_ACQUIRE, in qed_iov_vf_mbx_acquire()
1891 struct qed_vf_info *vf) in qed_iov_vf_mbx_start_vport() argument
1894 struct qed_iov_vf_mbx *mbx = &vf->vf_mbx; in qed_iov_vf_mbx_start_vport()
1902 vf_info = qed_iov_get_vf_info(p_hwfn, (u16)vf->relative_vf_id, true); in qed_iov_vf_mbx_start_vport()
1906 vf->relative_vf_id); in qed_iov_vf_mbx_start_vport()
1910 vf->state = VF_ENABLED; in qed_iov_vf_mbx_start_vport()
1913 qed_iov_enable_vf_traffic(p_hwfn, p_ptt, vf); in qed_iov_vf_mbx_start_vport()
1916 for (sb_id = 0; sb_id < vf->num_sbs; sb_id++) { in qed_iov_vf_mbx_start_vport()
1920 vf->relative_vf_id, sb_id); in qed_iov_vf_mbx_start_vport()
1926 vf->igu_sbs[sb_id], vf->abs_vf_id, 1); in qed_iov_vf_mbx_start_vport()
1929 vf->mtu = start->mtu; in qed_iov_vf_mbx_start_vport()
1930 vf->shadow_config.inner_vlan_removal = start->inner_vlan_removal; in qed_iov_vf_mbx_start_vport()
1950 params.concrete_fid = vf->concrete_fid; in qed_iov_vf_mbx_start_vport()
1951 params.opaque_fid = vf->opaque_fid; in qed_iov_vf_mbx_start_vport()
1952 params.vport_id = vf->vport_id; in qed_iov_vf_mbx_start_vport()
1954 params.mtu = vf->mtu; in qed_iov_vf_mbx_start_vport()
1957 params.check_mac = !vf->p_vf_info.is_trusted_configured; in qed_iov_vf_mbx_start_vport()
1965 vf->vport_instance++; in qed_iov_vf_mbx_start_vport()
1968 qed_iov_configure_vport_forced(p_hwfn, vf, *p_bitmap); in qed_iov_vf_mbx_start_vport()
1970 __qed_iov_spoofchk_set(p_hwfn, vf, vf->req_spoofchk_val); in qed_iov_vf_mbx_start_vport()
1972 qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_VPORT_START, in qed_iov_vf_mbx_start_vport()
1978 struct qed_vf_info *vf) in qed_iov_vf_mbx_stop_vport() argument
1983 vf->vport_instance--; in qed_iov_vf_mbx_stop_vport()
1984 vf->spoof_chk = false; in qed_iov_vf_mbx_stop_vport()
1986 if ((qed_iov_validate_active_rxq(p_hwfn, vf)) || in qed_iov_vf_mbx_stop_vport()
1987 (qed_iov_validate_active_txq(p_hwfn, vf))) { in qed_iov_vf_mbx_stop_vport()
1988 vf->b_malicious = true; in qed_iov_vf_mbx_stop_vport()
1991 vf->abs_vf_id); in qed_iov_vf_mbx_stop_vport()
1996 rc = qed_sp_vport_stop(p_hwfn, vf->opaque_fid, vf->vport_id); in qed_iov_vf_mbx_stop_vport()
2004 vf->configured_features = 0; in qed_iov_vf_mbx_stop_vport()
2005 memset(&vf->shadow_config, 0, sizeof(vf->shadow_config)); in qed_iov_vf_mbx_stop_vport()
2008 qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_VPORT_TEARDOWN, in qed_iov_vf_mbx_stop_vport()
2014 struct qed_vf_info *vf, in qed_iov_vf_mbx_start_rxq_resp() argument
2017 struct qed_iov_vf_mbx *mbx = &vf->vf_mbx; in qed_iov_vf_mbx_start_rxq_resp()
2047 qed_iov_send_response(p_hwfn, p_ptt, vf, length, status); in qed_iov_vf_mbx_start_rxq_resp()
2088 struct qed_vf_info *vf) in qed_iov_vf_mbx_start_rxq() argument
2092 struct qed_iov_vf_mbx *mbx = &vf->vf_mbx; in qed_iov_vf_mbx_start_rxq()
2103 if (!qed_iov_validate_rxq(p_hwfn, vf, req->rx_qid, in qed_iov_vf_mbx_start_rxq()
2105 !qed_iov_validate_sb(p_hwfn, vf, req->hw_sb)) in qed_iov_vf_mbx_start_rxq()
2108 qid_usage_idx = qed_iov_vf_mbx_qid(p_hwfn, vf, false); in qed_iov_vf_mbx_start_rxq()
2112 p_queue = &vf->vf_queues[req->rx_qid]; in qed_iov_vf_mbx_start_rxq()
2116 vf_legacy = qed_vf_calculate_legacy(vf); in qed_iov_vf_mbx_start_rxq()
2121 params.vport_id = vf->vport_id; in qed_iov_vf_mbx_start_rxq()
2122 params.stats_id = vf->abs_vf_id + 0x10; in qed_iov_vf_mbx_start_rxq()
2130 vf_params.vfid = vf->relative_vf_id; in qed_iov_vf_mbx_start_rxq()
2134 p_cid = qed_eth_queue_to_cid(p_hwfn, vf->opaque_fid, in qed_iov_vf_mbx_start_rxq()
2145 MSTORM_ETH_VF_PRODS_OFFSET(vf->abs_vf_id, in qed_iov_vf_mbx_start_rxq()
2159 vf->num_active_rxqs++; in qed_iov_vf_mbx_start_rxq()
2163 qed_iov_vf_mbx_start_rxq_resp(p_hwfn, p_ptt, vf, status, in qed_iov_vf_mbx_start_rxq()
2421 struct qed_vf_info *vf) in qed_iov_vf_mbx_start_txq() argument
2425 struct qed_iov_vf_mbx *mbx = &vf->vf_mbx; in qed_iov_vf_mbx_start_txq()
2439 if (!qed_iov_validate_txq(p_hwfn, vf, req->tx_qid, in qed_iov_vf_mbx_start_txq()
2441 !qed_iov_validate_sb(p_hwfn, vf, req->hw_sb)) in qed_iov_vf_mbx_start_txq()
2444 qid_usage_idx = qed_iov_vf_mbx_qid(p_hwfn, vf, true); in qed_iov_vf_mbx_start_txq()
2448 p_queue = &vf->vf_queues[req->tx_qid]; in qed_iov_vf_mbx_start_txq()
2452 vf_legacy = qed_vf_calculate_legacy(vf); in qed_iov_vf_mbx_start_txq()
2456 params.vport_id = vf->vport_id; in qed_iov_vf_mbx_start_txq()
2457 params.stats_id = vf->abs_vf_id + 0x10; in qed_iov_vf_mbx_start_txq()
2466 vf_params.vfid = vf->relative_vf_id; in qed_iov_vf_mbx_start_txq()
2471 p_cid = qed_eth_queue_to_cid(p_hwfn, vf->opaque_fid, in qed_iov_vf_mbx_start_txq()
2476 pq = qed_get_cm_pq_idx_vf(p_hwfn, vf->relative_vf_id); in qed_iov_vf_mbx_start_txq()
2490 qed_iov_vf_mbx_start_txq_resp(p_hwfn, p_ptt, vf, cid, status); in qed_iov_vf_mbx_start_txq()
2494 struct qed_vf_info *vf, in qed_iov_vf_stop_rxqs() argument
2501 if (!qed_iov_validate_rxq(p_hwfn, vf, rxq_id, QED_IOV_VALIDATE_Q_NA)) { in qed_iov_vf_stop_rxqs()
2505 vf->relative_vf_id, rxq_id, qid_usage_idx); in qed_iov_vf_stop_rxqs()
2509 p_queue = &vf->vf_queues[rxq_id]; in qed_iov_vf_stop_rxqs()
2522 vf->relative_vf_id, in qed_iov_vf_stop_rxqs()
2535 vf->num_active_rxqs--; in qed_iov_vf_stop_rxqs()
2541 struct qed_vf_info *vf, in qed_iov_vf_stop_txqs() argument
2547 if (!qed_iov_validate_txq(p_hwfn, vf, txq_id, QED_IOV_VALIDATE_Q_NA)) in qed_iov_vf_stop_txqs()
2550 p_queue = &vf->vf_queues[txq_id]; in qed_iov_vf_stop_txqs()
2565 struct qed_vf_info *vf) in qed_iov_vf_mbx_stop_rxqs() argument
2568 struct qed_iov_vf_mbx *mbx = &vf->vf_mbx; in qed_iov_vf_mbx_stop_rxqs()
2582 vf->relative_vf_id); in qed_iov_vf_mbx_stop_rxqs()
2588 qid_usage_idx = qed_iov_vf_mbx_qid(p_hwfn, vf, false); in qed_iov_vf_mbx_stop_rxqs()
2592 rc = qed_iov_vf_stop_rxqs(p_hwfn, vf, req->rx_qid, in qed_iov_vf_mbx_stop_rxqs()
2597 qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_STOP_RXQS, in qed_iov_vf_mbx_stop_rxqs()
2603 struct qed_vf_info *vf) in qed_iov_vf_mbx_stop_txqs() argument
2606 struct qed_iov_vf_mbx *mbx = &vf->vf_mbx; in qed_iov_vf_mbx_stop_txqs()
2620 vf->relative_vf_id); in qed_iov_vf_mbx_stop_txqs()
2626 qid_usage_idx = qed_iov_vf_mbx_qid(p_hwfn, vf, true); in qed_iov_vf_mbx_stop_txqs()
2630 rc = qed_iov_vf_stop_txqs(p_hwfn, vf, req->tx_qid, qid_usage_idx); in qed_iov_vf_mbx_stop_txqs()
2635 qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_STOP_TXQS, in qed_iov_vf_mbx_stop_txqs()
2641 struct qed_vf_info *vf) in qed_iov_vf_mbx_update_rxqs() argument
2645 struct qed_iov_vf_mbx *mbx = &vf->vf_mbx; in qed_iov_vf_mbx_update_rxqs()
2658 qid_usage_idx = qed_iov_vf_mbx_qid(p_hwfn, vf, false); in qed_iov_vf_mbx_update_rxqs()
2665 if ((vf->acquire.vfdev_info.capabilities & in qed_iov_vf_mbx_update_rxqs()
2669 vf->relative_vf_id); in qed_iov_vf_mbx_update_rxqs()
2677 if (!qed_iov_validate_rxq(p_hwfn, vf, i, in qed_iov_vf_mbx_update_rxqs()
2679 !vf->vf_queues[i].cids[qid_usage_idx].p_cid || in qed_iov_vf_mbx_update_rxqs()
2680 vf->vf_queues[i].cids[qid_usage_idx].b_is_tx) { in qed_iov_vf_mbx_update_rxqs()
2683 vf->relative_vf_id, req->rx_qid, in qed_iov_vf_mbx_update_rxqs()
2693 handlers[i] = vf->vf_queues[qid].cids[qid_usage_idx].p_cid; in qed_iov_vf_mbx_update_rxqs()
2706 qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_UPDATE_RXQ, in qed_iov_vf_mbx_update_rxqs()
2867 struct qed_vf_info *vf, in qed_iov_vp_update_rss_param() argument
2898 p_rss->rss_eng_id = vf->relative_vf_id + 1; in qed_iov_vp_update_rss_param()
2910 if (!qed_iov_validate_rxq(p_hwfn, vf, q_idx, in qed_iov_vp_update_rss_param()
2915 vf->relative_vf_id, q_idx); in qed_iov_vp_update_rss_param()
2920 p_cid = qed_iov_get_vf_rx_queue_cid(&vf->vf_queues[q_idx]); in qed_iov_vp_update_rss_param()
2933 struct qed_vf_info *vf, in qed_iov_vp_update_sge_tpa_param() argument
3014 struct qed_vf_info *vf) in qed_iov_vf_mbx_vport_update() argument
3018 struct qed_iov_vf_mbx *mbx = &vf->vf_mbx; in qed_iov_vf_mbx_vport_update()
3026 if (!vf->vport_instance) { in qed_iov_vf_mbx_vport_update()
3030 vf->abs_vf_id); in qed_iov_vf_mbx_vport_update()
3041 params.opaque_fid = vf->opaque_fid; in qed_iov_vf_mbx_vport_update()
3042 params.vport_id = vf->vport_id; in qed_iov_vf_mbx_vport_update()
3049 qed_iov_vp_update_vlan_param(p_hwfn, &params, vf, mbx, &tlvs_mask); in qed_iov_vf_mbx_vport_update()
3054 qed_iov_vp_update_sge_tpa_param(p_hwfn, vf, &params, in qed_iov_vf_mbx_vport_update()
3063 qed_iov_vp_update_rss_param(p_hwfn, vf, &params, p_rss_params, in qed_iov_vf_mbx_vport_update()
3066 if (qed_iov_pre_update_vport(p_hwfn, vf->relative_vf_id, in qed_iov_vf_mbx_vport_update()
3091 length = qed_iov_prep_vp_update_resp_tlvs(p_hwfn, vf, mbx, status, in qed_iov_vf_mbx_vport_update()
3093 qed_iov_send_response(p_hwfn, p_ptt, vf, length, status); in qed_iov_vf_mbx_vport_update()
3234 struct qed_public_vf_info *vf; in qed_iov_chk_ucast() local
3236 vf = qed_iov_get_public_vf_info(hwfn, vfid, true); in qed_iov_chk_ucast()
3237 if (!vf) in qed_iov_chk_ucast()
3243 ether_addr_copy(vf->mac, params->mac); in qed_iov_chk_ucast()
3245 if (vf->is_trusted_configured) { in qed_iov_chk_ucast()
3246 qed_iov_bulletin_set_mac(hwfn, vf->mac, vfid); in qed_iov_chk_ucast()
3258 struct qed_vf_info *vf) in qed_iov_vf_mbx_ucast_filter() argument
3260 struct qed_bulletin_content *p_bulletin = vf->bulletin.p_virt; in qed_iov_vf_mbx_ucast_filter()
3261 struct qed_iov_vf_mbx *mbx = &vf->vf_mbx; in qed_iov_vf_mbx_ucast_filter()
3275 params.vport_to_remove_from = vf->vport_id; in qed_iov_vf_mbx_ucast_filter()
3276 params.vport_to_add_to = vf->vport_id; in qed_iov_vf_mbx_ucast_filter()
3283 vf->abs_vf_id, params.opcode, params.type, in qed_iov_vf_mbx_ucast_filter()
3289 if (!vf->vport_instance) { in qed_iov_vf_mbx_ucast_filter()
3293 vf->abs_vf_id); in qed_iov_vf_mbx_ucast_filter()
3299 if (qed_iov_vf_update_unicast_shadow(p_hwfn, vf, &params)) { in qed_iov_vf_mbx_ucast_filter()
3327 rc = qed_iov_chk_ucast(p_hwfn, vf->relative_vf_id, &params); in qed_iov_vf_mbx_ucast_filter()
3333 rc = qed_sp_eth_filter_ucast(p_hwfn, vf->opaque_fid, &params, in qed_iov_vf_mbx_ucast_filter()
3339 qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_UCAST_FILTER, in qed_iov_vf_mbx_ucast_filter()
3345 struct qed_vf_info *vf) in qed_iov_vf_mbx_int_cleanup() argument
3350 for (i = 0; i < vf->num_sbs; i++) in qed_iov_vf_mbx_int_cleanup()
3352 vf->igu_sbs[i], in qed_iov_vf_mbx_int_cleanup()
3353 vf->opaque_fid, false); in qed_iov_vf_mbx_int_cleanup()
3355 qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_INT_CLEANUP, in qed_iov_vf_mbx_int_cleanup()
3361 struct qed_ptt *p_ptt, struct qed_vf_info *vf) in qed_iov_vf_mbx_close() argument
3367 qed_iov_vf_igu_set_int(p_hwfn, p_ptt, vf, 0); in qed_iov_vf_mbx_close()
3370 qed_iov_config_perm_table(p_hwfn, p_ptt, vf, 0); in qed_iov_vf_mbx_close()
3372 qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_CLOSE, in qed_iov_vf_mbx_close()
3475 struct qed_vf_info *vf) in qed_iov_vf_pf_set_coalesce() argument
3477 struct qed_iov_vf_mbx *mbx = &vf->vf_mbx; in qed_iov_vf_pf_set_coalesce()
3491 if (!qed_iov_validate_rxq(p_hwfn, vf, qid, in qed_iov_vf_pf_set_coalesce()
3495 vf->abs_vf_id, qid); in qed_iov_vf_pf_set_coalesce()
3499 if (!qed_iov_validate_txq(p_hwfn, vf, qid, in qed_iov_vf_pf_set_coalesce()
3503 vf->abs_vf_id, qid); in qed_iov_vf_pf_set_coalesce()
3510 vf->abs_vf_id, rx_coal, tx_coal, qid); in qed_iov_vf_pf_set_coalesce()
3513 p_cid = qed_iov_get_vf_rx_queue_cid(&vf->vf_queues[qid]); in qed_iov_vf_pf_set_coalesce()
3520 vf->abs_vf_id, vf->vf_queues[qid].fw_rx_qid); in qed_iov_vf_pf_set_coalesce()
3523 vf->rx_coal = rx_coal; in qed_iov_vf_pf_set_coalesce()
3527 struct qed_vf_queue *p_queue = &vf->vf_queues[qid]; in qed_iov_vf_pf_set_coalesce()
3543 vf->abs_vf_id); in qed_iov_vf_pf_set_coalesce()
3547 vf->tx_coal = tx_coal; in qed_iov_vf_pf_set_coalesce()
3552 qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_COALESCE_UPDATE, in qed_iov_vf_pf_set_coalesce()
4285 struct qed_vf_info *vf; in qed_iov_spoofchk_set() local
4294 vf = qed_iov_get_vf_info(p_hwfn, (u16)vfid, true); in qed_iov_spoofchk_set()
4295 if (!vf) in qed_iov_spoofchk_set()
4300 vf->req_spoofchk_val = val; in qed_iov_spoofchk_set()
4305 rc = __qed_iov_spoofchk_set(p_hwfn, vf, val); in qed_iov_spoofchk_set()
4359 struct qed_vf_info *vf; in qed_iov_configure_tx_rate() local
4364 vf = qed_iov_get_vf_info(p_hwfn, (u16)vfid, true); in qed_iov_configure_tx_rate()
4365 if (!vf) in qed_iov_configure_tx_rate()
4368 rc = qed_fw_vport(p_hwfn, vf->vport_id, &abs_vp_id); in qed_iov_configure_tx_rate()
4380 struct qed_vf_info *vf; in qed_iov_configure_min_tx_rate() local
4394 vf = qed_iov_get_vf_info(QED_LEADING_HWFN(cdev), (u16)vfid, true); in qed_iov_configure_min_tx_rate()
4395 vport_id = vf->vport_id; in qed_iov_configure_min_tx_rate()
4705 ivi->vf = vf_id; in qed_get_vf_config()
4815 struct qed_public_vf_info *vf; in qed_set_vf_link_state() local
4817 vf = qed_iov_get_public_vf_info(hwfn, vf_id, true); in qed_set_vf_link_state()
4818 if (!vf) in qed_set_vf_link_state()
4821 if (vf->link_state == link_state) in qed_set_vf_link_state()
4824 vf->link_state = link_state; in qed_set_vf_link_state()
4852 struct qed_public_vf_info *vf; in qed_configure_max_vf_rate() local
4860 vf = qed_iov_get_public_vf_info(p_hwfn, vfid, true); in qed_configure_max_vf_rate()
4862 vf->tx_rate = rate; in qed_configure_max_vf_rate()
4893 struct qed_public_vf_info *vf; in qed_set_vf_trust() local
4901 vf = qed_iov_get_public_vf_info(hwfn, vfid, true); in qed_set_vf_trust()
4903 if (vf->is_trusted_request == trust) in qed_set_vf_trust()
4905 vf->is_trusted_request = trust; in qed_set_vf_trust()
5049 struct qed_vf_info *vf; in qed_update_mac_for_vf_trust_change() local
5054 vf = qed_iov_get_vf_info(hwfn, vf_id, true); in qed_update_mac_for_vf_trust_change()
5056 if (!vf_info || !vf) in qed_update_mac_for_vf_trust_change()
5061 (vf->bulletin.p_virt->valid_bitmap & BIT(MAC_ADDR_FORCED))) { in qed_update_mac_for_vf_trust_change()
5069 if (ether_addr_equal(vf->shadow_config.macs[i], in qed_update_mac_for_vf_trust_change()
5071 eth_zero_addr(vf->shadow_config.macs[i]); in qed_update_mac_for_vf_trust_change()
5081 vf->bulletin.p_virt->valid_bitmap &= in qed_update_mac_for_vf_trust_change()
5093 if (ether_addr_equal(vf->shadow_config.macs[i], in qed_update_mac_for_vf_trust_change()
5095 ether_addr_copy(vf->shadow_config.macs[i], in qed_update_mac_for_vf_trust_change()
5116 struct qed_vf_info *vf; in qed_iov_handle_trust_change() local
5138 vf = qed_iov_get_vf_info(hwfn, i, true); in qed_iov_handle_trust_change()
5139 if (!vf->vport_instance) in qed_iov_handle_trust_change()
5143 params.opaque_fid = vf->opaque_fid; in qed_iov_handle_trust_change()
5144 params.vport_id = vf->vport_id; in qed_iov_handle_trust_change()