We used the default as a work-around for the 4-byte MTU VNICs,
but we filter those out now. So fix the calculation of VNICs
accordingly.
Fixes:
ff63ebbb67a7 ("net/bnxt: determine the Rx status of VF")
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
return rc;
}
-static void bnxt_vnic_count(struct bnxt_vnic_info *vnic, void *cbdata)
+static void
+bnxt_vnic_count(struct bnxt_vnic_info *vnic __rte_unused, void *cbdata)
{
uint32_t *count = cbdata;
- if (vnic->func_default)
- *count = *count + 1;
+ *count = *count + 1;
}
static int bnxt_vnic_count_hwrm_stub(struct bnxt *bp __rte_unused,
return 0;
}
-int bnxt_vf_default_vnic_count(struct bnxt *bp, uint16_t vf)
+int bnxt_vf_vnic_count(struct bnxt *bp, uint16_t vf)
{
uint32_t count = 0;
rc = bnxt_hwrm_vnic_qcfg(bp, &vnic, bp->pf.first_vf_id + vf);
if (rc)
break;
- if (vnic.mru == 4) /* Indicates unallocated */
+ if (vnic.mru <= 4) /* Indicates unallocated */
continue;
vnic_cb(&vnic, cbdata);
int bnxt_hwrm_func_cfg_vf_set_flags(struct bnxt *bp, uint16_t vf);
void vf_vnic_set_rxmask_cb(struct bnxt_vnic_info *vnic, void *flagp);
int bnxt_set_rx_mask_no_vlan(struct bnxt *bp, struct bnxt_vnic_info *vnic);
-int bnxt_vf_default_vnic_count(struct bnxt *bp, uint16_t vf);
+int bnxt_vf_vnic_count(struct bnxt *bp, uint16_t vf);
int bnxt_hwrm_func_vf_vnic_query_and_config(struct bnxt *bp, uint16_t vf,
void (*vnic_cb)(struct bnxt_vnic_info *, void *), void *cbdata,
int (*hwrm_cb)(struct bnxt *bp, struct bnxt_vnic_info *vnic));
return -ENOTSUP;
}
- return bnxt_vf_default_vnic_count(bp, vf_id);
+ return bnxt_vf_vnic_count(bp, vf_id);
}
int rte_pmd_bnxt_get_vf_tx_drop_count(uint8_t port, uint16_t vf_id,