mbox series

[v7,00/13] add test suite for DMA drivers

Message ID 20211013151736.762378-1-bruce.richardson@intel.com (mailing list archive)
Headers
Series add test suite for DMA drivers |

Message

Bruce Richardson Oct. 13, 2021, 3:17 p.m. UTC
  This patchset adds a fairly comprehensive set of tests for basic dmadev
functionality. Tests are added to verify basic copy operation in each
device, using both submit function and submit flag, and verifying
completion gathering using both "completed()" and "completed_status()"
functions. Beyond that, tests are then added for the error reporting and
handling, as is a suite of tests for the fill() operation for devices that
support those.

New in version 6 of the series are a couple of new patches to add support
for the skeleton dmadev to pass the suite of tests. This includes adding
missing function support to it, as well as adding a capability flag
to dmadev to indicate that it can't support invalid addresses.

Depends-on: series-19594 ("support dmadev")

V7:
* rebased to dmadev v26 patchset

V6:
* changed type of dev_id from uint16_t to int16_t
* moved burst_capacity function to datapath function set
* added burst_capacity function and vchan_status functions to skeleton driver
* added capability flag to indicate if device supports handling errors
* enabled running unit tests on skeleton driver

V5:
* added missing reviewed-by tags from v3 reviewed.

V4:
* rebased to v22 of dmadev set
* added patch for iteration macro for dmadevs to allow testing each dmadev in
  turn

V3:
* add patch and tests for a burst-capacity function
* addressed review feedback from v2
* code cleanups to try and shorten code where possible

V2:
* added into dmadev a API to check for a device being idle
* removed the hard-coded timeout delays before checking completions, and instead
  wait for device to be idle
* added in checks for statistics updates as part of some tests
* fixed issue identified by internal coverity scan
* other minor miscellaneous changes and fixes.

Bruce Richardson (10):
  dmadev: add channel status check for testing use
  dma/skeleton: add channel status function
  dma/skeleton: add burst capacity function
  dmadev: add device iterator
  app/test: add basic dmadev instance tests
  app/test: add basic dmadev copy tests
  app/test: run test suite on skeleton driver
  app/test: add more comprehensive dmadev copy tests
  dmadev: add flag for error handling support
  app/test: test dmadev instance failure handling

Kevin Laatz (3):
  dmadev: add burst capacity API
  app/test: add dmadev fill tests
  app/test: add dmadev burst capacity API test

 app/test/test_dmadev.c                 | 830 ++++++++++++++++++++++++-
 drivers/dma/skeleton/skeleton_dmadev.c |  28 +-
 drivers/dma/skeleton/skeleton_dmadev.h |   2 +-
 lib/dmadev/rte_dmadev.c                |  40 ++
 lib/dmadev/rte_dmadev.h                |  89 +++
 lib/dmadev/rte_dmadev_core.h           |   4 +
 lib/dmadev/rte_dmadev_pmd.h            |   5 +
 lib/dmadev/version.map                 |   3 +
 8 files changed, 995 insertions(+), 6 deletions(-)

--
2.30.2
  

Comments

Thomas Monjalon Oct. 18, 2021, 9:20 a.m. UTC | #1
13/10/2021 17:17, Bruce Richardson:
> Bruce Richardson (10):
>   dmadev: add channel status check for testing use
>   dma/skeleton: add channel status function
>   dma/skeleton: add burst capacity function
>   dmadev: add device iterator
>   app/test: add basic dmadev instance tests
>   app/test: add basic dmadev copy tests
>   app/test: run test suite on skeleton driver
>   app/test: add more comprehensive dmadev copy tests
>   dmadev: add flag for error handling support
>   app/test: test dmadev instance failure handling
> 
> Kevin Laatz (3):
>   dmadev: add burst capacity API
>   app/test: add dmadev fill tests
>   app/test: add dmadev burst capacity API test

Applied, thanks.
  
Chengwen Feng Oct. 21, 2021, 12:06 p.m. UTC | #2
Hi Bruce,

I observed a large number of checkpatch errors [1] when synchronizing to our inner CI,
almost all of them are over 80 lines, and many are not LONG LOG.

The DPDK coding style recommends to be not more than 80 characters unless rarest
situations (which LONG LOG belongs to this one I think).

I don't know which to follow: just ignore or should fix it ?


[1]:
lib/dmadev/rte_dmadev.c:56: WARNING:LONG_LINE: line length of 95 exceeds 80 columns
lib/dmadev/rte_dmadev.c:696: WARNING:LONG_LINE: line length of 87 exceeds 80 columns
lib/dmadev/rte_dmadev.c:704: WARNING:LONG_LINE: line length of 85 exceeds 80 columns
lib/dmadev/rte_dmadev.h:267: WARNING:LONG_LINE_COMMENT: line length of 84 exceeds 80 columns
lib/dmadev/rte_dmadev.h:269: WARNING:LONG_LINE_COMMENT: line length of 84 exceeds 80 columns
lib/dmadev/rte_dmadev.h:677: WARNING:LONG_LINE_COMMENT: line length of 91 exceeds 80 columns
lib/dmadev/rte_dmadev.h:683: WARNING:LONG_LINE_COMMENT: line length of 95 exceeds 80 columns
lib/dmadev/rte_dmadev.h:691: WARNING:LONG_LINE_COMMENT: line length of 90 exceeds 80 columns
lib/dmadev/rte_dmadev.h:692: WARNING:LONG_LINE_COMMENT: line length of 82 exceeds 80 columns
lib/dmadev/rte_dmadev.h:706: WARNING:LONG_LINE: line length of 88 exceeds 80 columns
lib/dmadev/rte_dmadev_core.h:51: WARNING:LONG_LINE: line length of 86 exceeds 80 columns
lib/dmadev/rte_dmadev_pmd.h:58: WARNING:LONG_LINE: line length of 84 exceeds 80 columns
total: 1 errors, 12 warnings, 235 lines checked

app/test/test_dmadev.c:19: WARNING:LONG_LINE: line length of 95 exceeds 80 columns
app/test/test_dmadev.c:19: WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
app/test/test_dmadev.c:39: WARNING:LONG_LINE: line length of 94 exceeds 80 columns
app/test/test_dmadev.c:72: WARNING:LONG_LINE_COMMENT: line length of 90 exceeds 80 columns
app/test/test_dmadev.c:77: WARNING:LONG_LINE_COMMENT: line length of 96 exceeds 80 columns
app/test/test_dmadev.c:79: WARNING:LONG_LINE: line length of 83 exceeds 80 columns
app/test/test_dmadev.c:85: WARNING:LONG_LINE_COMMENT: line length of 95 exceeds 80 columns
app/test/test_dmadev.c:90: WARNING:LONG_LINE_COMMENT: line length of 90 exceeds 80 columns
app/test/test_dmadev.c:113: WARNING:LONG_LINE: line length of 86 exceeds 80 columns
app/test/test_dmadev.c:114: WARNING:LONG_LINE: line length of 98 exceeds 80 columns
app/test/test_dmadev.c:115: WARNING:LONG_LINE: line length of 81 exceeds 80 columns
app/test/test_dmadev.c:124: WARNING:LONG_LINE: line length of 85 exceeds 80 columns
app/test/test_dmadev.c:129: WARNING:LONG_LINE: line length of 81 exceeds 80 columns
app/test/test_dmadev.c:138: WARNING:LONG_LINE: line length of 96 exceeds 80 columns
app/test/test_dmadev.c:143: WARNING:LONG_LINE: line length of 97 exceeds 80 columns
app/test/test_dmadev.c:157: WARNING:LONG_LINE: line length of 90 exceeds 80 columns
app/test/test_dmadev.c:158: WARNING:LONG_LINE: line length of 88 exceeds 80 columns
app/test/test_dmadev.c:169: WARNING:LONG_LINE: line length of 92 exceeds 80 columns
app/test/test_dmadev.c:196: WARNING:LONG_LINE: line length of 94 exceeds 80 columns
app/test/test_dmadev.c:207: WARNING:LONG_LINE: line length of 95 exceeds 80 columns
app/test/test_dmadev.c:249: WARNING:LONG_LINE: line length of 88 exceeds 80 columns
app/test/test_dmadev.c:254: WARNING:LONG_LINE: line length of 81 exceeds 80 columns
app/test/test_dmadev.c:272: WARNING:LONG_LINE_COMMENT: line length of 99 exceeds 80 columns
app/test/test_dmadev.c:277: WARNING:LONG_LINE_COMMENT: line length of 91 exceeds 80 columns
app/test/test_dmadev.c:287: WARNING:LONG_LINE: line length of 86 exceeds 80 columns
app/test/test_dmadev.c:299: WARNING:LONG_LINE_COMMENT: line length of 86 exceeds 80 columns
app/test/test_dmadev.c:302: WARNING:LONG_LINE: line length of 94 exceeds 80 columns
app/test/test_dmadev.c:306: WARNING:LONG_LINE: line length of 81 exceeds 80 columns
app/test/test_dmadev.c:313: WARNING:LONG_LINE: line length of 94 exceeds 80 columns
app/test/test_dmadev.c:314: WARNING:LONG_LINE: line length of 85 exceeds 80 columns
app/test/test_dmadev.c:329: WARNING:LONG_LINE_COMMENT: line length of 82 exceeds 80 columns
app/test/test_dmadev.c:331: WARNING:LONG_LINE: line length of 86 exceeds 80 columns
app/test/test_dmadev.c:332: WARNING:LONG_LINE: line length of 82 exceeds 80 columns
app/test/test_dmadev.c:338: WARNING:LONG_LINE_COMMENT: line length of 97 exceeds 80 columns
app/test/test_dmadev.c:339: WARNING:LONG_LINE_COMMENT: line length of 96 exceeds 80 columns
app/test/test_dmadev.c:344: WARNING:LONG_LINE: line length of 90 exceeds 80 columns
app/test/test_dmadev.c:351: WARNING:LONG_LINE_COMMENT: line length of 92 exceeds 80 columns
app/test/test_dmadev.c:357: WARNING:LONG_LINE_COMMENT: line length of 85 exceeds 80 columns
app/test/test_dmadev.c:367: WARNING:LONG_LINE: line length of 94 exceeds 80 columns
app/test/test_dmadev.c:368: WARNING:LONG_LINE: line length of 85 exceeds 80 columns
app/test/test_dmadev.c:372: WARNING:LONG_LINE: line length of 93 exceeds 80 columns
app/test/test_dmadev.c:379: WARNING:LONG_LINE: line length of 85 exceeds 80 columns
app/test/test_dmadev.c:380: WARNING:LONG_LINE: line length of 86 exceeds 80 columns
app/test/test_dmadev.c:392: WARNING:LONG_LINE: line length of 94 exceeds 80 columns
app/test/test_dmadev.c:396: WARNING:LONG_LINE: line length of 81 exceeds 80 columns
app/test/test_dmadev.c:421: WARNING:LONG_LINE_COMMENT: line length of 87 exceeds 80 columns
app/test/test_dmadev.c:441: WARNING:LONG_LINE: line length of 86 exceeds 80 columns
app/test/test_dmadev.c:443: WARNING:LONG_LINE_COMMENT: line length of 83 exceeds 80 columns
app/test/test_dmadev.c:455: WARNING:LONG_LINE: line length of 94 exceeds 80 columns
app/test/test_dmadev.c:459: WARNING:LONG_LINE: line length of 81 exceeds 80 columns
app/test/test_dmadev.c:479: WARNING:LONG_LINE: line length of 81 exceeds 80 columns
app/test/test_dmadev.c:503: WARNING:LONG_LINE: line length of 98 exceeds 80 columns
app/test/test_dmadev.c:515: WARNING:LONG_LINE_COMMENT: line length of 92 exceeds 80 columns
app/test/test_dmadev.c:524: WARNING:LONG_LINE: line length of 81 exceeds 80 columns
app/test/test_dmadev.c:529: WARNING:LONG_LINE: line length of 85 exceeds 80 columns
app/test/test_dmadev.c:533: WARNING:LONG_LINE: line length of 93 exceeds 80 columns
app/test/test_dmadev.c:548: WARNING:LONG_LINE_COMMENT: line length of 88 exceeds 80 columns
app/test/test_dmadev.c:551: WARNING:LONG_LINE_COMMENT: line length of 92 exceeds 80 columns
app/test/test_dmadev.c:560: WARNING:LONG_LINE: line length of 81 exceeds 80 columns
app/test/test_dmadev.c:568: WARNING:LONG_LINE: line length of 87 exceeds 80 columns
app/test/test_dmadev.c:570: WARNING:LONG_LINE: line length of 81 exceeds 80 columns
app/test/test_dmadev.c:598: WARNING:LONG_LINE: line length of 94 exceeds 80 columns
app/test/test_dmadev.c:601: WARNING:LONG_LINE: line length of 83 exceeds 80 columns
app/test/test_dmadev.c:605: WARNING:LONG_LINE_COMMENT: line length of 95 exceeds 80 columns
app/test/test_dmadev.c:611: WARNING:LONG_LINE: line length of 83 exceeds 80 columns
app/test/test_dmadev.c:624: WARNING:LONG_LINE_COMMENT: line length of 93 exceeds 80 columns
app/test/test_dmadev.c:625: WARNING:LONG_LINE_COMMENT: line length of 90 exceeds 80 columns
app/test/test_dmadev.c:648: WARNING:LONG_LINE: line length of 91 exceeds 80 columns
app/test/test_dmadev.c:654: WARNING:LONG_LINE: line length of 94 exceeds 80 columns
app/test/test_dmadev.c:660: WARNING:LONG_LINE: line length of 83 exceeds 80 columns
app/test/test_dmadev.c:662: WARNING:LONG_LINE_COMMENT: line length of 85 exceeds 80 columns
app/test/test_dmadev.c:693: WARNING:LONG_LINE: line length of 84 exceeds 80 columns
app/test/test_dmadev.c:697: WARNING:LONG_LINE: line length of 88 exceeds 80 columns
app/test/test_dmadev.c:698: WARNING:LONG_LINE: line length of 84 exceeds 80 columns
app/test/test_dmadev.c:702: WARNING:LONG_LINE: line length of 91 exceeds 80 columns
app/test/test_dmadev.c:713: WARNING:LONG_LINE: line length of 84 exceeds 80 columns
app/test/test_dmadev.c:719: WARNING:LONG_LINE: line length of 90 exceeds 80 columns
app/test/test_dmadev.c:721: WARNING:LONG_LINE: line length of 100 exceeds 80 columns
app/test/test_dmadev.c:755: WARNING:LONG_LINE: line length of 85 exceeds 80 columns
app/test/test_dmadev.c:765: WARNING:LONG_LINE: line length of 93 exceeds 80 columns
app/test/test_dmadev.c:774: WARNING:LONG_LINE: line length of 89 exceeds 80 columns
app/test/test_dmadev.c:789: WARNING:LONG_LINE_COMMENT: line length of 88 exceeds 80 columns
app/test/test_dmadev.c:790: WARNING:LONG_LINE: line length of 85 exceeds 80 columns
app/test/test_dmadev.c:794: WARNING:LONG_LINE: line length of 93 exceeds 80 columns
app/test/test_dmadev.c:797: WARNING:LONG_LINE_COMMENT: line length of 97 exceeds 80 columns
app/test/test_dmadev.c:802: WARNING:LONG_LINE: line length of 99 exceeds 80 columns
app/test/test_dmadev.c:811: WARNING:LONG_LINE: line length of 92 exceeds 80 columns
app/test/test_dmadev.c:812: WARNING:LONG_LINE: line length of 86 exceeds 80 columns
app/test/test_dmadev.c:833: WARNING:LONG_LINE_COMMENT: line length of 98 exceeds 80 columns
total: 0 errors, 89 warnings, 861 lines checked


On 2021/10/18 17:20, Thomas Monjalon wrote:
> 13/10/2021 17:17, Bruce Richardson:
>> Bruce Richardson (10):
>>   dmadev: add channel status check for testing use
>>   dma/skeleton: add channel status function
>>   dma/skeleton: add burst capacity function
>>   dmadev: add device iterator
>>   app/test: add basic dmadev instance tests
>>   app/test: add basic dmadev copy tests
>>   app/test: run test suite on skeleton driver
>>   app/test: add more comprehensive dmadev copy tests
>>   dmadev: add flag for error handling support
>>   app/test: test dmadev instance failure handling
>>
>> Kevin Laatz (3):
>>   dmadev: add burst capacity API
>>   app/test: add dmadev fill tests
>>   app/test: add dmadev burst capacity API test
> 
> Applied, thanks.
> 
> 
> 
> 
> .
>
  
Bruce Richardson Oct. 21, 2021, 2:55 p.m. UTC | #3
On Thu, Oct 21, 2021 at 08:06:13PM +0800, fengchengwen wrote:
> Hi Bruce,
> 
> I observed a large number of checkpatch errors [1] when synchronizing to our inner CI,
> almost all of them are over 80 lines, and many are not LONG LOG.
> 
> The DPDK coding style recommends to be not more than 80 characters unless rarest
> situations (which LONG LOG belongs to this one I think).
> 
> I don't know which to follow: just ignore or should fix it ?

I'd rather not change these as the code is more readable unwrapped.
Although the docs do indeed recommend 80 characters, in practice we allow
up to 100 characters and the CI's run using that limit for checkpatch. I've
actually submitted a patchset to try and update our doc and usertools to
match the in-practice policy.

/Bruce

[1] http://patches.dpdk.org/project/dpdk/patch/20211020142601.157649-1-bruce.richardson@intel.com/