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

Function rte_cryptodev_stats_get

dpdk/lib/cryptodev/rte_cryptodev.c:1779–1803  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1777}
1778
1779int
1780rte_cryptodev_stats_get(uint8_t dev_id, struct rte_cryptodev_stats *stats)
1781{
1782 struct rte_cryptodev *dev;
1783
1784 if (!rte_cryptodev_is_valid_dev(dev_id)) {
1785 CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
1786 return -ENODEV;
1787 }
1788
1789 if (stats == NULL) {
1790 CDEV_LOG_ERR("Invalid stats ptr");
1791 return -EINVAL;
1792 }
1793
1794 dev = &rte_crypto_devices[dev_id];
1795 memset(stats, 0, sizeof(*stats));
1796
1797 if (*dev->dev_ops->stats_get == NULL)
1798 return -ENOTSUP;
1799 (*dev->dev_ops->stats_get)(dev, stats);
1800
1801 rte_cryptodev_trace_stats_get(dev_id, stats);
1802 return 0;
1803}
1804
1805void
1806rte_cryptodev_stats_reset(uint8_t dev_id)

Callers 3

test_statsFunction · 0.85
show_cryptoFunction · 0.85

Calls 2

memsetFunction · 0.85

Tested by 1

test_statsFunction · 0.68