- dpdk_stats_ctx_t *ctx = DPDK_STATS_CTX_GET(phc);
-
- /* get stats from DPDK */
-
- uint8_t ports_count = rte_eth_dev_count();
- if (ports_count == 0) {
- DPDK_CHILD_LOG("%s: No DPDK ports available. "
- "Check bound devices to DPDK driver.\n",
- DPDK_STATS_PLUGIN);
- return -ENODEV;
- }
-
- if (ports_count > RTE_MAX_ETHPORTS)
- ports_count = RTE_MAX_ETHPORTS;
-
- ctx->ports_count = ports_count;
-