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

Function rte_dma_stats_get

dpdk/lib/dmadev/rte_dmadev.c:683–703  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

681}
682
683int
684rte_dma_stats_get(int16_t dev_id, uint16_t vchan, struct rte_dma_stats *stats)
685{
686 const struct rte_dma_dev *dev = &rte_dma_devices[dev_id];
687
688 if (!rte_dma_is_valid(dev_id) || stats == NULL)
689 return -EINVAL;
690
691 if (vchan >= dev->data->dev_conf.nb_vchans &&
692 vchan != RTE_DMA_ALL_VCHAN) {
693 RTE_DMA_LOG(ERR,
694 "Device %d vchan %u out of range", dev_id, vchan);
695 return -EINVAL;
696 }
697
698 if (*dev->dev_ops->stats_get == NULL)
699 return -ENOTSUP;
700 memset(stats, 0, sizeof(struct rte_dma_stats));
701 return (*dev->dev_ops->stats_get)(dev, vchan, stats,
702 sizeof(struct rte_dma_stats));
703}
704
705int
706rte_dma_stats_reset(int16_t dev_id, uint16_t vchan)

Callers 7

dmadev_handle_dev_statsFunction · 0.85
test_dma_statsFunction · 0.85
__rte_format_printfFunction · 0.85
test_dmadev_instanceFunction · 0.85
print_statsFunction · 0.85

Calls 2

rte_dma_is_validFunction · 0.85
memsetFunction · 0.85

Tested by 4

test_dma_statsFunction · 0.68
__rte_format_printfFunction · 0.68
test_dmadev_instanceFunction · 0.68