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

Function show_mempool

dpdk/app/proc-info/main.c:1616–1668  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1614}
1615
1616static void
1617show_mempool(char *name)
1618{
1619 snprintf(bdr_str, MAX_STRING_LEN, " show - MEMPOOL ");
1620 STATS_BDR_STR(10, bdr_str);
1621
1622 if (name != NULL) {
1623 struct rte_mempool *ptr = rte_mempool_lookup(name);
1624 if (ptr != NULL) {
1625 struct rte_mempool_ops *ops;
1626 uint64_t flags = ptr->flags;
1627
1628 ops = rte_mempool_get_ops(ptr->ops_index);
1629 printf(" - Name: %s on socket %d\n"
1630 " - flags:\n"
1631 "\t -- No spread (%c)\n"
1632 "\t -- No cache align (%c)\n"
1633 "\t -- SP put (%c), SC get (%c)\n"
1634 "\t -- Pool created (%c)\n"
1635 "\t -- No IOVA config (%c)\n"
1636 "\t -- Not used for IO (%c)\n",
1637 ptr->name,
1638 ptr->socket_id,
1639 (flags & RTE_MEMPOOL_F_NO_SPREAD) ? 'y' : 'n',
1640 (flags & RTE_MEMPOOL_F_NO_CACHE_ALIGN) ? 'y' : 'n',
1641 (flags & RTE_MEMPOOL_F_SP_PUT) ? 'y' : 'n',
1642 (flags & RTE_MEMPOOL_F_SC_GET) ? 'y' : 'n',
1643 (flags & RTE_MEMPOOL_F_POOL_CREATED) ? 'y' : 'n',
1644 (flags & RTE_MEMPOOL_F_NO_IOVA_CONTIG) ? 'y' : 'n',
1645 (flags & RTE_MEMPOOL_F_NON_IO) ? 'y' : 'n');
1646 printf(" - Size %u Cache %u element %u\n"
1647 " - header %u trailer %u\n"
1648 " - private data size %u\n",
1649 ptr->size,
1650 ptr->cache_size,
1651 ptr->elt_size,
1652 ptr->header_size,
1653 ptr->trailer_size,
1654 ptr->private_data_size);
1655 printf(" - memezone - socket %d\n",
1656 ptr->mz->socket_id);
1657 printf(" - Count: avail (%u), in use (%u)\n",
1658 rte_mempool_avail_count(ptr),
1659 rte_mempool_in_use_count(ptr));
1660 printf(" - ops_index %d ops_name %s\n",
1661 ptr->ops_index, ops ? ops->name : "NA");
1662
1663 return;
1664 }
1665 }
1666
1667 rte_mempool_list_dump(stdout);
1668}
1669
1670static void
1671mempool_itr_obj(struct rte_mempool *mp, void *opaque,

Callers 1

mainFunction · 0.85

Calls 7

snprintfFunction · 0.85
rte_mempool_lookupFunction · 0.85
rte_mempool_get_opsFunction · 0.85
rte_mempool_avail_countFunction · 0.85
rte_mempool_in_use_countFunction · 0.85
rte_mempool_list_dumpFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected