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

Function rte_eth_stats_get

dpdk/lib/ethdev/rte_ethdev.c:3139–3164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3137}
3138
3139int
3140rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats)
3141{
3142 struct rte_eth_dev *dev;
3143 int ret;
3144
3145 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
3146 dev = &rte_eth_devices[port_id];
3147
3148 if (stats == NULL) {
3149 RTE_ETHDEV_LOG(ERR, "Cannot get ethdev port %u stats to NULL\n",
3150 port_id);
3151 return -EINVAL;
3152 }
3153
3154 memset(stats, 0, sizeof(*stats));
3155
3156 if (*dev->dev_ops->stats_get == NULL)
3157 return -ENOTSUP;
3158 stats->rx_nombuf = dev->data->rx_mbuf_alloc_failed;
3159 ret = eth_err(port_id, (*dev->dev_ops->stats_get)(dev, stats));
3160
3161 rte_eth_trace_stats_get(port_id, stats, ret);
3162
3163 return ret;
3164}
3165
3166int
3167rte_eth_stats_reset(uint16_t port_id)

Callers 15

rte_stats_bitrate_calcFunction · 0.85
eth_basic_stats_getFunction · 0.85
bond_ethdev_stats_getFunction · 0.85
fs_stats_getFunction · 0.85
fs_dev_stats_saveFunction · 0.85
hn_vf_stats_getFunction · 0.85
statistics_loopFunction · 0.85
stats_displayFunction · 0.85
test_get_statsFunction · 0.85
test_stats_resetFunction · 0.85

Calls 2

memsetFunction · 0.85
eth_errFunction · 0.85