| 361 | } |
| 362 | |
| 363 | static int bnxt_alloc_mem(struct bnxt *bp, bool reconfig) |
| 364 | { |
| 365 | int rc; |
| 366 | |
| 367 | rc = bnxt_alloc_ring_grps(bp); |
| 368 | if (rc) |
| 369 | goto alloc_mem_err; |
| 370 | |
| 371 | rc = bnxt_alloc_async_ring_struct(bp); |
| 372 | if (rc) |
| 373 | goto alloc_mem_err; |
| 374 | |
| 375 | rc = bnxt_alloc_vnic_mem(bp); |
| 376 | if (rc) |
| 377 | goto alloc_mem_err; |
| 378 | |
| 379 | rc = bnxt_alloc_vnic_attributes(bp, reconfig); |
| 380 | if (rc) |
| 381 | goto alloc_mem_err; |
| 382 | |
| 383 | rc = bnxt_alloc_filter_mem(bp); |
| 384 | if (rc) |
| 385 | goto alloc_mem_err; |
| 386 | |
| 387 | rc = bnxt_alloc_async_cp_ring(bp); |
| 388 | if (rc) |
| 389 | goto alloc_mem_err; |
| 390 | |
| 391 | rc = bnxt_alloc_rxtx_nq_ring(bp); |
| 392 | if (rc) |
| 393 | goto alloc_mem_err; |
| 394 | |
| 395 | if (BNXT_FLOW_XSTATS_EN(bp)) { |
| 396 | rc = bnxt_alloc_flow_stats_info(bp); |
| 397 | if (rc) |
| 398 | goto alloc_mem_err; |
| 399 | } |
| 400 | |
| 401 | return 0; |
| 402 | |
| 403 | alloc_mem_err: |
| 404 | bnxt_free_mem(bp, reconfig); |
| 405 | return rc; |
| 406 | } |
| 407 | |
| 408 | static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id) |
| 409 | { |
no test coverage detected