| 216 | } |
| 217 | |
| 218 | int bnxt_alloc_vnic_mem(struct bnxt *bp) |
| 219 | { |
| 220 | struct bnxt_vnic_info *vnic_mem; |
| 221 | uint16_t max_vnics; |
| 222 | |
| 223 | max_vnics = bp->max_vnics; |
| 224 | /* Allocate memory for VNIC pool and filter pool */ |
| 225 | vnic_mem = rte_zmalloc("bnxt_vnic_info", |
| 226 | max_vnics * sizeof(struct bnxt_vnic_info), 0); |
| 227 | if (vnic_mem == NULL) { |
| 228 | PMD_DRV_LOG(ERR, "Failed to alloc memory for %d VNICs", |
| 229 | max_vnics); |
| 230 | return -ENOMEM; |
| 231 | } |
| 232 | bp->vnic_info = vnic_mem; |
| 233 | bnxt_init_vnics(bp); |
| 234 | return 0; |
| 235 | } |
| 236 | |
| 237 | int bnxt_vnic_grp_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic) |
| 238 | { |
no test coverage detected