X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fdma%2Fskeleton%2Fskeleton_dmadev.c;h=d9e4f731d7f990dfdd3758391583835513693891;hb=b56f1e2dad38067fad0572063d6f8e72108bf6a4;hp=dd2f1c9b57d69d3f41c33fb707678242f66c515d;hpb=5e0f85912754bf0d50c940165c40cac68e7c762f;p=dpdk.git diff --git a/drivers/dma/skeleton/skeleton_dmadev.c b/drivers/dma/skeleton/skeleton_dmadev.c index dd2f1c9b57..d9e4f731d7 100644 --- a/drivers/dma/skeleton/skeleton_dmadev.c +++ b/drivers/dma/skeleton/skeleton_dmadev.c @@ -153,7 +153,7 @@ skeldma_stop(struct rte_dma_dev *dev) hw->exit_flag = true; rte_delay_ms(1); - pthread_cancel(hw->thread); + (void)pthread_cancel(hw->thread); pthread_join(hw->thread, NULL); return 0; @@ -431,6 +431,15 @@ skeldma_completed_status(void *dev_private, return count; } +static uint16_t +skeldma_burst_capacity(const void *dev_private, uint16_t vchan) +{ + const struct skeldma_hw *hw = dev_private; + + RTE_SET_USED(vchan); + return rte_ring_count(hw->desc_empty); +} + static const struct rte_dma_dev_ops skeldma_ops = { .dev_info_get = skeldma_info_get, .dev_configure = skeldma_configure, @@ -469,6 +478,7 @@ skeldma_create(const char *name, struct rte_vdev_device *vdev, int lcore_id) dev->fp_obj->submit = skeldma_submit; dev->fp_obj->completed = skeldma_completed; dev->fp_obj->completed_status = skeldma_completed_status; + dev->fp_obj->burst_capacity = skeldma_burst_capacity; hw = dev->data->dev_private; hw->lcore_id = lcore_id;