MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bnxt_alloc_mem

Function bnxt_alloc_mem

dpdk/drivers/net/bnxt/bnxt_ethdev.c:363–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

361}
362
363static 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
403alloc_mem_err:
404 bnxt_free_mem(bp, reconfig);
405 return rc;
406}
407
408static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
409{

Callers 1

bnxt_init_resourcesFunction · 0.85

Calls 9

bnxt_alloc_ring_grpsFunction · 0.85
bnxt_alloc_vnic_memFunction · 0.85
bnxt_alloc_filter_memFunction · 0.85
bnxt_alloc_async_cp_ringFunction · 0.85
bnxt_alloc_rxtx_nq_ringFunction · 0.85
bnxt_free_memFunction · 0.85

Tested by

no test coverage detected