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

Function rte_compressdev_stats_get

dpdk/lib/compressdev/rte_compressdev.c:603–625  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

601}
602
603int
604rte_compressdev_stats_get(uint8_t dev_id, struct rte_compressdev_stats *stats)
605{
606 struct rte_compressdev *dev;
607
608 if (!rte_compressdev_is_valid_dev(dev_id)) {
609 COMPRESSDEV_LOG(ERR, "Invalid dev_id=%d", dev_id);
610 return -ENODEV;
611 }
612
613 if (stats == NULL) {
614 COMPRESSDEV_LOG(ERR, "Invalid stats ptr");
615 return -EINVAL;
616 }
617
618 dev = &rte_comp_devices[dev_id];
619 memset(stats, 0, sizeof(*stats));
620
621 if (*dev->dev_ops->stats_get == NULL)
622 return -ENOTSUP;
623 (*dev->dev_ops->stats_get)(dev, stats);
624 return 0;
625}
626
627void
628rte_compressdev_stats_reset(uint8_t dev_id)

Callers 3

main_loopFunction · 0.85
main_loopFunction · 0.85
main_loopFunction · 0.85

Calls 2

memsetFunction · 0.85

Tested by 3

main_loopFunction · 0.68
main_loopFunction · 0.68
main_loopFunction · 0.68