Lines Matching refs:vf

535 static void bnx2x_leading_vfq_init(struct bnx2x *bp, struct bnx2x_virtf *vf,  in bnx2x_leading_vfq_init()  argument
538 u8 cl_id = vfq_cl_id(vf, q); in bnx2x_leading_vfq_init()
539 u8 func_id = FW_VF_HANDLE(vf->abs_vfid); in bnx2x_leading_vfq_init()
544 bnx2x_vf_sp(bp, vf, mac_rdata), in bnx2x_leading_vfq_init()
545 bnx2x_vf_sp_map(bp, vf, mac_rdata), in bnx2x_leading_vfq_init()
547 &vf->filter_state, in bnx2x_leading_vfq_init()
553 bnx2x_vf_sp(bp, vf, vlan_rdata), in bnx2x_leading_vfq_init()
554 bnx2x_vf_sp_map(bp, vf, vlan_rdata), in bnx2x_leading_vfq_init()
556 &vf->filter_state, in bnx2x_leading_vfq_init()
561 bnx2x_init_mcast_obj(bp, &vf->mcast_obj, cl_id, in bnx2x_leading_vfq_init()
563 bnx2x_vf_sp(bp, vf, mcast_rdata), in bnx2x_leading_vfq_init()
564 bnx2x_vf_sp_map(bp, vf, mcast_rdata), in bnx2x_leading_vfq_init()
566 &vf->filter_state, in bnx2x_leading_vfq_init()
570 bnx2x_init_rss_config_obj(bp, &vf->rss_conf_obj, cl_id, q->cid, in bnx2x_leading_vfq_init()
572 bnx2x_vf_sp(bp, vf, rss_rdata), in bnx2x_leading_vfq_init()
573 bnx2x_vf_sp_map(bp, vf, rss_rdata), in bnx2x_leading_vfq_init()
575 &vf->filter_state, in bnx2x_leading_vfq_init()
578 vf->leading_rss = cl_id; in bnx2x_leading_vfq_init()
1043 struct bnx2x_virtf *vf) in bnx2x_vf_mbx_resp_single_tlv() argument
1045 struct bnx2x_vf_mbx *mbx = BP_VF_MBX(bp, vf->index); in bnx2x_vf_mbx_resp_single_tlv()
1059 struct bnx2x_virtf *vf, in bnx2x_vf_mbx_resp_send_msg() argument
1062 struct bnx2x_vf_mbx *mbx = BP_VF_MBX(bp, vf->index); in bnx2x_vf_mbx_resp_send_msg()
1085 rc = bnx2x_copy32_vf_dmae(bp, false, pf_addr, vf->abs_vfid, in bnx2x_vf_mbx_resp_send_msg()
1091 vf->abs_vfid); in bnx2x_vf_mbx_resp_send_msg()
1098 storm_memset_vf_mbx_ack(bp, vf->abs_vfid); in bnx2x_vf_mbx_resp_send_msg()
1104 rc = bnx2x_copy32_vf_dmae(bp, false, pf_addr, vf->abs_vfid, in bnx2x_vf_mbx_resp_send_msg()
1110 bnx2x_unlock_vf_pf_channel(bp, vf, mbx->first_tlv.tl.type); in bnx2x_vf_mbx_resp_send_msg()
1114 vf->abs_vfid); in bnx2x_vf_mbx_resp_send_msg()
1120 bnx2x_vf_release(bp, vf); in bnx2x_vf_mbx_resp_send_msg()
1124 struct bnx2x_virtf *vf, in bnx2x_vf_mbx_resp() argument
1127 bnx2x_vf_mbx_resp_single_tlv(bp, vf); in bnx2x_vf_mbx_resp()
1128 bnx2x_vf_mbx_resp_send_msg(bp, vf, rc); in bnx2x_vf_mbx_resp()
1132 struct bnx2x_virtf *vf, in bnx2x_vf_mbx_resp_phys_port() argument
1155 struct bnx2x_virtf *vf, in bnx2x_vf_mbx_resp_fp_hsi_ver() argument
1166 fp_hsi->is_supported = (vf->fp_hsi > ETH_FP_HSI_VERSION) ? 0 : 1; in bnx2x_vf_mbx_resp_fp_hsi_ver()
1174 static void bnx2x_vf_mbx_acquire_resp(struct bnx2x *bp, struct bnx2x_virtf *vf, in bnx2x_vf_mbx_acquire_resp() argument
1200 resc->num_rxqs = vf_rxq_count(vf) ? : in bnx2x_vf_mbx_acquire_resp()
1201 bnx2x_vf_max_queue_cnt(bp, vf); in bnx2x_vf_mbx_acquire_resp()
1202 resc->num_txqs = vf_txq_count(vf) ? : in bnx2x_vf_mbx_acquire_resp()
1203 bnx2x_vf_max_queue_cnt(bp, vf); in bnx2x_vf_mbx_acquire_resp()
1204 resc->num_sbs = vf_sb_count(vf); in bnx2x_vf_mbx_acquire_resp()
1205 resc->num_mac_filters = vf_mac_rules_cnt(vf); in bnx2x_vf_mbx_acquire_resp()
1206 resc->num_vlan_filters = vf_vlan_rules_visible_cnt(vf); in bnx2x_vf_mbx_acquire_resp()
1212 BP_VF_BULLETIN(bp, vf->index); in bnx2x_vf_mbx_acquire_resp()
1214 for_each_vfq(vf, i) in bnx2x_vf_mbx_acquire_resp()
1216 vfq_qzone_id(vf, vfq_get(vf, i)); in bnx2x_vf_mbx_acquire_resp()
1218 for_each_vf_sb(vf, i) { in bnx2x_vf_mbx_acquire_resp()
1219 resc->hw_sbs[i].hw_sb_id = vf_igu_sb(vf, i); in bnx2x_vf_mbx_acquire_resp()
1220 resc->hw_sbs[i].sb_qid = vf_hc_qzone(vf, i); in bnx2x_vf_mbx_acquire_resp()
1233 vf->abs_vfid, in bnx2x_vf_mbx_acquire_resp()
1247 for (i = 0; i < vf_rxq_count(vf); i++) in bnx2x_vf_mbx_acquire_resp()
1250 for (i = 0; i < vf_sb_count(vf); i++) in bnx2x_vf_mbx_acquire_resp()
1266 bnx2x_vf_mbx_resp_phys_port(bp, vf, &mbx->msg->resp, &length); in bnx2x_vf_mbx_acquire_resp()
1272 bnx2x_vf_mbx_resp_fp_hsi_ver(bp, vf, &mbx->msg->resp, &length); in bnx2x_vf_mbx_acquire_resp()
1278 bnx2x_vf_mbx_resp_send_msg(bp, vf, vfop_status); in bnx2x_vf_mbx_acquire_resp()
1299 struct bnx2x_virtf *vf, in bnx2x_vf_mbx_acquire_chk_dorq() argument
1316 static void bnx2x_vf_mbx_acquire(struct bnx2x *bp, struct bnx2x_virtf *vf, in bnx2x_vf_mbx_acquire() argument
1325 vf->abs_vfid, acquire->vfdev_info.vf_id, acquire->vfdev_info.vf_os, in bnx2x_vf_mbx_acquire()
1335 rc = bnx2x_vf_mbx_acquire_chk_dorq(bp, vf, mbx); in bnx2x_vf_mbx_acquire()
1339 vf->abs_vfid); in bnx2x_vf_mbx_acquire()
1347 vf->fp_hsi = acquire->vfdev_info.fp_hsi_ver; in bnx2x_vf_mbx_acquire()
1349 vf->fp_hsi = max_t(u8, acquire->vfdev_info.fp_hsi_ver, in bnx2x_vf_mbx_acquire()
1351 if (vf->fp_hsi > ETH_FP_HSI_VERSION) { in bnx2x_vf_mbx_acquire()
1354 vf->abs_vfid, acquire->vfdev_info.fp_hsi_ver, in bnx2x_vf_mbx_acquire()
1361 rc = bnx2x_vf_acquire(bp, vf, &acquire->resc_request); in bnx2x_vf_mbx_acquire()
1364 vf->bulletin_map = acquire->bulletin_addr; in bnx2x_vf_mbx_acquire()
1367 vf->abs_vfid); in bnx2x_vf_mbx_acquire()
1368 vf->cfg_flags |= VF_CFG_EXT_BULLETIN; in bnx2x_vf_mbx_acquire()
1370 vf->cfg_flags &= ~VF_CFG_EXT_BULLETIN; in bnx2x_vf_mbx_acquire()
1375 bnx2x_vf_mbx_acquire_resp(bp, vf, mbx, rc); in bnx2x_vf_mbx_acquire()
1378 static void bnx2x_vf_mbx_init_vf(struct bnx2x *bp, struct bnx2x_virtf *vf, in bnx2x_vf_mbx_init_vf() argument
1385 vf->spq_map = init->spq_addr; in bnx2x_vf_mbx_init_vf()
1386 vf->fw_stat_map = init->stats_addr; in bnx2x_vf_mbx_init_vf()
1387 vf->stats_stride = init->stats_stride; in bnx2x_vf_mbx_init_vf()
1388 rc = bnx2x_vf_init(bp, vf, (dma_addr_t *)init->sb_addr); in bnx2x_vf_mbx_init_vf()
1392 vf->cfg_flags |= VF_CFG_STATS_COALESCE; in bnx2x_vf_mbx_init_vf()
1395 if (vf->cfg_flags & VF_CFG_EXT_BULLETIN) in bnx2x_vf_mbx_init_vf()
1396 bnx2x_iov_link_update_vf(bp, vf->index); in bnx2x_vf_mbx_init_vf()
1399 bnx2x_vf_mbx_resp(bp, vf, rc); in bnx2x_vf_mbx_init_vf()
1430 static void bnx2x_vf_mbx_setup_q(struct bnx2x *bp, struct bnx2x_virtf *vf, in bnx2x_vf_mbx_setup_q() argument
1438 if (setup_q->vf_qid >= vf_rxq_count(vf)) { in bnx2x_vf_mbx_setup_q()
1440 setup_q->vf_qid, vf_rxq_count(vf)); in bnx2x_vf_mbx_setup_q()
1449 struct bnx2x_vf_queue *q = vfq_get(vf, setup_q->vf_qid); in bnx2x_vf_mbx_setup_q()
1456 bnx2x_leading_vfq_init(bp, vf, q); in bnx2x_vf_mbx_setup_q()
1494 bnx2x_vfop_qctor_dump_tx(bp, vf, init_p, setup_p, in bnx2x_vf_mbx_setup_q()
1538 u8 mcast_id = FW_VF_HANDLE(vf->abs_vfid); in bnx2x_vf_mbx_setup_q()
1544 bnx2x_vfop_qctor_dump_rx(bp, vf, init_p, setup_p, in bnx2x_vf_mbx_setup_q()
1548 bnx2x_vfop_qctor_prep(bp, vf, q, &qctor, q_type); in bnx2x_vf_mbx_setup_q()
1550 rc = bnx2x_vf_queue_setup(bp, vf, q->index, &qctor); in bnx2x_vf_mbx_setup_q()
1555 bnx2x_vf_mbx_resp(bp, vf, rc); in bnx2x_vf_mbx_setup_q()
1559 struct bnx2x_virtf *vf, in bnx2x_vf_mbx_macvlan_list() argument
1633 static int bnx2x_vf_mbx_qfilters(struct bnx2x *bp, struct bnx2x_virtf *vf) in bnx2x_vf_mbx_qfilters() argument
1638 &BP_VF_MBX(bp, vf->index)->msg->req.set_q_filters; in bnx2x_vf_mbx_qfilters()
1645 rc = bnx2x_vf_mbx_macvlan_list(bp, vf, msg, &fl, in bnx2x_vf_mbx_qfilters()
1653 rc = bnx2x_vf_mac_vlan_config_list(bp, vf, fl, in bnx2x_vf_mbx_qfilters()
1663 rc = bnx2x_vf_mbx_macvlan_list(bp, vf, msg, &fl, in bnx2x_vf_mbx_qfilters()
1670 rc = bnx2x_vf_mac_vlan_config_list(bp, vf, fl, in bnx2x_vf_mbx_qfilters()
1681 BP_VF_BULLETIN(bp, vf->index); in bnx2x_vf_mbx_qfilters()
1698 rc = bnx2x_vf_rxmode(bp, vf, msg->vf_qid, accept); in bnx2x_vf_mbx_qfilters()
1705 rc = bnx2x_vf_mcast(bp, vf, msg->multicast, in bnx2x_vf_mbx_qfilters()
1713 vf->abs_vfid, msg->vf_qid, rc); in bnx2x_vf_mbx_qfilters()
1718 struct bnx2x_virtf *vf, in bnx2x_filters_validate_mac() argument
1721 struct pf_vf_bulletin_content *bulletin = BP_VF_BULLETIN(bp, vf->index); in bnx2x_filters_validate_mac()
1733 vf->abs_vfid); in bnx2x_filters_validate_mac()
1742 vf->abs_vfid); in bnx2x_filters_validate_mac()
1754 struct bnx2x_virtf *vf, in bnx2x_filters_validate_vlan() argument
1757 struct pf_vf_bulletin_content *bulletin = BP_VF_BULLETIN(bp, vf->index); in bnx2x_filters_validate_vlan()
1769 vf->abs_vfid); in bnx2x_filters_validate_vlan()
1777 if (filters->vf_qid > vf_rxq_count(vf)) { in bnx2x_filters_validate_vlan()
1787 struct bnx2x_virtf *vf, in bnx2x_vf_mbx_set_q_filters() argument
1793 rc = bnx2x_filters_validate_mac(bp, vf, filters); in bnx2x_vf_mbx_set_q_filters()
1797 rc = bnx2x_filters_validate_vlan(bp, vf, filters); in bnx2x_vf_mbx_set_q_filters()
1802 vf->abs_vfid, in bnx2x_vf_mbx_set_q_filters()
1808 rc = bnx2x_vf_mbx_qfilters(bp, vf); in bnx2x_vf_mbx_set_q_filters()
1810 bnx2x_vf_mbx_resp(bp, vf, rc); in bnx2x_vf_mbx_set_q_filters()
1813 static void bnx2x_vf_mbx_teardown_q(struct bnx2x *bp, struct bnx2x_virtf *vf, in bnx2x_vf_mbx_teardown_q() argument
1820 vf->abs_vfid, qid); in bnx2x_vf_mbx_teardown_q()
1822 rc = bnx2x_vf_queue_teardown(bp, vf, qid); in bnx2x_vf_mbx_teardown_q()
1823 bnx2x_vf_mbx_resp(bp, vf, rc); in bnx2x_vf_mbx_teardown_q()
1826 static void bnx2x_vf_mbx_close_vf(struct bnx2x *bp, struct bnx2x_virtf *vf, in bnx2x_vf_mbx_close_vf() argument
1831 DP(BNX2X_MSG_IOV, "VF[%d] VF_CLOSE\n", vf->abs_vfid); in bnx2x_vf_mbx_close_vf()
1833 rc = bnx2x_vf_close(bp, vf); in bnx2x_vf_mbx_close_vf()
1834 bnx2x_vf_mbx_resp(bp, vf, rc); in bnx2x_vf_mbx_close_vf()
1837 static void bnx2x_vf_mbx_release_vf(struct bnx2x *bp, struct bnx2x_virtf *vf, in bnx2x_vf_mbx_release_vf() argument
1842 DP(BNX2X_MSG_IOV, "VF[%d] VF_RELEASE\n", vf->abs_vfid); in bnx2x_vf_mbx_release_vf()
1844 rc = bnx2x_vf_free(bp, vf); in bnx2x_vf_mbx_release_vf()
1845 bnx2x_vf_mbx_resp(bp, vf, rc); in bnx2x_vf_mbx_release_vf()
1848 static void bnx2x_vf_mbx_update_rss(struct bnx2x *bp, struct bnx2x_virtf *vf, in bnx2x_vf_mbx_update_rss() argument
1858 vf->index); in bnx2x_vf_mbx_update_rss()
1869 rss.rss_obj = &vf->rss_conf_obj; in bnx2x_vf_mbx_update_rss()
1904 rc = bnx2x_vf_rss_update(bp, vf, &rss); in bnx2x_vf_mbx_update_rss()
1906 bnx2x_vf_mbx_resp(bp, vf, rc); in bnx2x_vf_mbx_update_rss()
1932 static void bnx2x_vf_mbx_update_tpa(struct bnx2x *bp, struct bnx2x_virtf *vf, in bnx2x_vf_mbx_update_tpa() argument
1967 rc = bnx2x_vf_tpa_update(bp, vf, tpa_tlv, &vf_op_params); in bnx2x_vf_mbx_update_tpa()
1970 bnx2x_vf_mbx_resp(bp, vf, rc); in bnx2x_vf_mbx_update_tpa()
1974 static void bnx2x_vf_mbx_request(struct bnx2x *bp, struct bnx2x_virtf *vf, in bnx2x_vf_mbx_request() argument
1984 bnx2x_lock_vf_pf_channel(bp, vf, mbx->first_tlv.tl.type); in bnx2x_vf_mbx_request()
1989 bnx2x_vf_mbx_acquire(bp, vf, mbx); in bnx2x_vf_mbx_request()
1992 bnx2x_vf_mbx_init_vf(bp, vf, mbx); in bnx2x_vf_mbx_request()
1995 bnx2x_vf_mbx_setup_q(bp, vf, mbx); in bnx2x_vf_mbx_request()
1998 bnx2x_vf_mbx_set_q_filters(bp, vf, mbx); in bnx2x_vf_mbx_request()
2001 bnx2x_vf_mbx_teardown_q(bp, vf, mbx); in bnx2x_vf_mbx_request()
2004 bnx2x_vf_mbx_close_vf(bp, vf, mbx); in bnx2x_vf_mbx_request()
2007 bnx2x_vf_mbx_release_vf(bp, vf, mbx); in bnx2x_vf_mbx_request()
2010 bnx2x_vf_mbx_update_rss(bp, vf, mbx); in bnx2x_vf_mbx_request()
2013 bnx2x_vf_mbx_update_tpa(bp, vf, mbx); in bnx2x_vf_mbx_request()
2026 vf->state); in bnx2x_vf_mbx_request()
2033 if (vf->state == VF_ACQUIRED || vf->state == VF_ENABLED) { in bnx2x_vf_mbx_request()
2035 bnx2x_vf_mbx_resp(bp, vf, PFVF_STATUS_NOT_SUPPORTED); in bnx2x_vf_mbx_request()
2041 storm_memset_vf_mbx_ack(bp, vf->abs_vfid); in bnx2x_vf_mbx_request()
2044 bnx2x_unlock_vf_pf_channel(bp, vf, mbx->first_tlv.tl.type); in bnx2x_vf_mbx_request()
2096 struct bnx2x_virtf *vf = BP_VF(bp, vf_idx); in bnx2x_vf_mbx() local
2109 vf->abs_vfid, mbx->vf_addr_hi, in bnx2x_vf_mbx()
2114 vf->abs_vfid); in bnx2x_vf_mbx()
2115 bnx2x_vf_release(bp, vf); in bnx2x_vf_mbx()
2128 bnx2x_vf_mbx_request(bp, vf, mbx); in bnx2x_vf_mbx()
2144 int bnx2x_post_vf_bulletin(struct bnx2x *bp, int vf) in bnx2x_post_vf_bulletin() argument
2146 struct pf_vf_bulletin_content *bulletin = BP_VF_BULLETIN(bp, vf); in bnx2x_post_vf_bulletin()
2148 vf * BULLETIN_CONTENT_SIZE; in bnx2x_post_vf_bulletin()
2149 dma_addr_t vf_addr = bnx2x_vf(bp, vf, bulletin_map); in bnx2x_post_vf_bulletin()
2153 if (bnx2x_vf(bp, vf, state) != VF_ENABLED && in bnx2x_post_vf_bulletin()
2154 bnx2x_vf(bp, vf, state) != VF_ACQUIRED) in bnx2x_post_vf_bulletin()
2160 (bnx2x_vf(bp, vf, cfg_flags) & in bnx2x_post_vf_bulletin()
2165 bnx2x_vf(bp, vf, abs_vfid), U64_HI(vf_addr), in bnx2x_post_vf_bulletin()