Lines Matching refs:vnic_id

5406 static int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp, u16 vnic_id)
5409 struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id];
5416 req->vnic_id = cpu_to_le32(vnic->fw_vnic_id);
5869 static int bnxt_hwrm_set_vnic_filter(struct bnxt *bp, u16 vnic_id, u16 idx,
5882 fltr->base.fw_vnic_id = bp->vnic_info[vnic_id].fw_vnic_id;
5887 bp->vnic_info[vnic_id].l2_filters[idx] = fltr;
5933 static int bnxt_hwrm_vnic_set_tpa(struct bnxt *bp, u16 vnic_id, u32 tpa_flags)
5935 struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id];
5991 req->vnic_id = cpu_to_le16(vnic->fw_vnic_id);
6149 static int bnxt_hwrm_vnic_set_rss(struct bnxt *bp, u16 vnic_id, bool set_rss)
6151 struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id];
6169 static int bnxt_hwrm_vnic_set_rss_p5(struct bnxt *bp, u16 vnic_id, bool set_rss)
6171 struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id];
6181 req->vnic_id = cpu_to_le16(vnic->fw_vnic_id);
6213 req->vnic_id = cpu_to_le16(vnic->fw_vnic_id);
6224 static int bnxt_hwrm_vnic_set_hds(struct bnxt *bp, u16 vnic_id)
6226 struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id];
6247 req->vnic_id = cpu_to_le32(vnic->fw_vnic_id);
6251 static void bnxt_hwrm_vnic_ctx_free_one(struct bnxt *bp, u16 vnic_id,
6260 cpu_to_le16(bp->vnic_info[vnic_id].fw_rss_cos_lb_ctx[ctx_idx]);
6263 bp->vnic_info[vnic_id].fw_rss_cos_lb_ctx[ctx_idx] = INVALID_HW_RING_ID;
6281 static int bnxt_hwrm_vnic_ctx_alloc(struct bnxt *bp, u16 vnic_id, u16 ctx_idx)
6294 bp->vnic_info[vnic_id].fw_rss_cos_lb_ctx[ctx_idx] =
6308 int bnxt_hwrm_vnic_cfg(struct bnxt *bp, u16 vnic_id)
6311 struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id];
6359 ring = vnic_id - 1;
6360 else if ((vnic_id == 1) && BNXT_CHIP_TYPE_NITRO_A0(bp))
6369 req->vnic_id = cpu_to_le16(vnic->fw_vnic_id);
6376 if (!vnic_id && bnxt_ulp_registered(bp->edev))
6382 static void bnxt_hwrm_vnic_free_one(struct bnxt *bp, u16 vnic_id)
6384 if (bp->vnic_info[vnic_id].fw_vnic_id != INVALID_HW_RING_ID) {
6390 req->vnic_id =
6391 cpu_to_le32(bp->vnic_info[vnic_id].fw_vnic_id);
6394 bp->vnic_info[vnic_id].fw_vnic_id = INVALID_HW_RING_ID;
6406 static int bnxt_hwrm_vnic_alloc(struct bnxt *bp, u16 vnic_id,
6411 struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id];
6437 if (vnic_id == BNXT_VNIC_DEFAULT)
6443 vnic->fw_vnic_id = le32_to_cpu(resp->vnic_id);
9764 static int __bnxt_setup_vnic(struct bnxt *bp, u16 vnic_id)
9766 struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id];
9773 rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic_id, 0);
9776 vnic_id, rc);
9782 rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic_id, 1);
9785 vnic_id, rc);
9793 rc = bnxt_hwrm_vnic_cfg(bp, vnic_id);
9796 vnic_id, rc);
9801 rc = bnxt_hwrm_vnic_set_rss(bp, vnic_id, true);
9804 vnic_id, rc);
9809 rc = bnxt_hwrm_vnic_set_hds(bp, vnic_id);
9812 vnic_id, rc);
9820 static int __bnxt_setup_vnic_p5(struct bnxt *bp, u16 vnic_id)
9826 rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic_id, i);
9829 vnic_id, i, rc);
9837 rc = bnxt_hwrm_vnic_set_rss_p5(bp, vnic_id, true);
9840 vnic_id, rc);
9843 rc = bnxt_hwrm_vnic_cfg(bp, vnic_id);
9846 vnic_id, rc);
9850 rc = bnxt_hwrm_vnic_set_hds(bp, vnic_id);
9853 vnic_id, rc);
9859 static int bnxt_setup_vnic(struct bnxt *bp, u16 vnic_id)
9862 return __bnxt_setup_vnic_p5(bp, vnic_id);
9864 return __bnxt_setup_vnic(bp, vnic_id);
9867 static int bnxt_alloc_and_setup_vnic(struct bnxt *bp, u16 vnic_id,
9872 rc = bnxt_hwrm_vnic_alloc(bp, vnic_id, start_rx_ring_idx, rx_rings);
9875 vnic_id, rc);
9878 return bnxt_setup_vnic(bp, vnic_id);
9894 u16 vnic_id = i + 1;
9897 if (vnic_id >= bp->nr_vnics)
9900 vnic = &bp->vnic_info[vnic_id];
9904 if (bnxt_alloc_and_setup_vnic(bp, vnic_id, ring_id, 1))