test/dma: fix missing checks for device capacity
For some DMA HW devices, e.g. those using the idxd driver, the maximum burst size is configurable, which can lead to test failures if the value is set too small. Add explicit check for this to give reasonable error messages for devices which need their config adjusted. Fixes: 1b86a66a30c2 ("test/dma: add more comprehensive copy tests") Fixes: 8fa5d2683940 ("test/dma: add burst capacity test") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Conor Walsh <conor.walsh@intel.com> Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>
This commit is contained in:
parent
033904450b
commit
727e6b7840
@ -775,6 +775,9 @@ test_dmadev_instance(int16_t dev_id)
|
||||
if (rte_dma_stats_get(dev_id, vchan, &stats) != 0)
|
||||
ERR_RETURN("Error with rte_dma_stats_get()\n");
|
||||
|
||||
if (rte_dma_burst_capacity(dev_id, vchan) < 32)
|
||||
ERR_RETURN("Error: Device does not have sufficient burst capacity to run tests");
|
||||
|
||||
if (stats.completed != 0 || stats.submitted != 0 || stats.errors != 0)
|
||||
ERR_RETURN("Error device stats are not all zero: completed = %"PRIu64", "
|
||||
"submitted = %"PRIu64", errors = %"PRIu64"\n",
|
||||
@ -796,7 +799,10 @@ test_dmadev_instance(int16_t dev_id)
|
||||
goto err;
|
||||
|
||||
/* run some burst capacity tests */
|
||||
if (runtest("burst capacity", test_burst_capacity, 1, dev_id, vchan, CHECK_ERRS) < 0)
|
||||
if (rte_dma_burst_capacity(dev_id, vchan) < 64)
|
||||
printf("DMA Dev %u: insufficient burst capacity (64 required), skipping tests\n",
|
||||
dev_id);
|
||||
else if (runtest("burst capacity", test_burst_capacity, 1, dev_id, vchan, CHECK_ERRS) < 0)
|
||||
goto err;
|
||||
|
||||
/* to test error handling we can provide null pointers for source or dest in copies. This
|
||||
|
Loading…
x
Reference in New Issue
Block a user