summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2018-10-08eal: use correct data type for bitmap slab operationsVivek Sharma
Currently, slab operations use unsigned long data type for 64-bit slab related operations. On target 'i686-native-linuxapp-gcc', unsigned long is 32-bit and thus, slab operations breaks on this target. Changing slab operations to use unsigned long long for correct functioning on all targets. Fixes: de3cfa2c9823 ("sched: initial import") Fixes: 693f715da45c ("remove extra parentheses in return statement") Cc: stable@dpdk.org Signed-off-by: Vivek Sharma <vivek.sharma@caviumnetworks.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-11test: support external memoryAnatoly Burakov
Add simple unit tests to test external memory support. The tests are pretty basic and mostly consist of checking if invalid API calls are handled correctly, plus a simple allocation/deallocation test for malloc and memzone. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-10-11mem: allow memseg lists to be marked as externalAnatoly Burakov
When we allocate and use DPDK memory, we need to be able to differentiate between DPDK hugepage segments and segments that were made part of DPDK but are externally allocated. Add such a property to memseg lists. This breaks the ABI, so document the change in release notes. This also breaks a few internal assumptions about memory contiguousness, so adjust malloc code in a few places. All current calls for memseg walk functions were adjusted to ignore external segments where it made sense. Mempools is a special case, because we may be asked to allocate a mempool on a specific socket, and we need to ignore all page sizes on other heaps or other sockets. Previously, this assumption of knowing all page sizes was not a problem, but it will be now, so we have to match socket ID with page size when calculating minimum page size for a mempool. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-10-02kni: allocate memory dynamically for each deviceIgor Ryzhov
Long time ago preallocation of memory for KNI was introduced in commit 0c6bc8e. It was done because of lack of ability to free previously allocated memzones, which led to memzone exhaustion. Currently memzones can be freed and this patch uses this ability for dynamic KNI memory allocation. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-01test/event: fix Rx adapter intr test for skeleton PMDNikhil Rao
Skeleton PMD does not support RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ so make the Rx queue_id = -1 and initialize the event port configuration to zero. Fixes: d65856999dd6 ("test/event: add Rx adapter tests for interrupt driven queues") Cc: stable@dpdk.org Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01test/event: fix eth Rx adapter test for skeleton PMDNikhil Rao
Skeleton PMD does not support RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ and implicit_release_disable so make the Rx queue_id = -1 and initialize the event port configuration to zero. Fixes: ec36d881f56d ("eventdev: add implicit release disable capability") Fixes: 2a9c83ae3b2e ("test/eventdev: add multi-ports test") Cc: stable@dpdk.org Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01eventdev: fix port id argument in Rx adapter capsNikhil Rao
Make the ethernet port id passed into rte_event_eth_rx_adapter_caps_get() 16 bit. Also, update the event rx adapter test to use 16 bit ethernet port ids. Fixes: c2189c907dd1 ("eventdev: make ethdev port identifiers 16-bit") Cc: stable@dpdk.org Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01test/event: fix RSS config for eth Rx adapterNikhil Rao
Remove RSS config as it is not required. The hardcoded RSS configuration also generates an error on NICs that don't support it. Fixes: 8863a1fbfc66 ("ethdev: add supported hash function check") Cc: stable@dpdk.org Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01test/event: add adapter tests to meson buildNikhil Rao
Add tests for event eth Rx, crypto and timer adapters to meson build Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-10-01test/event: fix build for timer adapterNikhil Rao
Limit the number of objects passed to rte_mempool_put_bulk() to the size of the object table. This fix eliminates a compiler warning (array-bounds) triggered when the march command line parameter to gcc is set to nehalem. Fixes: d1f3385d0076 ("test: add event timer adapter auto-test") Cc: stable@dpdk.org Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-10-01eventdev: add test for eth Tx adapterNikhil Rao
This patch adds tests for the eth Tx adapter APIs. It also tests the data path for the rte_service function based implementation of the APIs. Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01test/event: check burst mode capabilityPavan Nikhilesh
Enqueue, dequeue depths are only valid for event devs that have burst mode capability. Check event dev capability before testing depth boundary. Fixes: f8f9d233ea0e ("test/eventdev: add unit tests") Cc: stable@dpdk.org Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01test/event: remove eth Rx adapter vdev workaroundNikhil Rao
eth Rx adapter has been updated to support hotplugged devices, devices created after adapter creation can now be added to the adapter. Update the adapter_multi_eth_add_del test case to create the adapter as part of test setup instead of creating it after creating vdevs. Fixes: 2a9c83ae3b2e ("test/eventdev: add multi-ports test") Cc: stable@dpdk.org Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-09-27test/crypto: fix number of queue pairsFiona Trahe
Some of the tests use a QAT-specific value (2) for maximum nr of queue pairs to create valid/invalid test cases. This has accidentally worked ok as default max_qps for all PMDs is larger. It is incorrect however and would fail if a device had a max lower than the QAT value. Instead use the value returned by the PMD in the rte_cryptodev_get_info query, this value is stored in the ts_params. Fixes: 202d375c60bc ("app/test: add cryptodev unit and performance tests") Cc: stable@dpdk.org Signed-off-by: Fiona Trahe <fiona.trahe@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-14ethdev: make default behavior CRC strip on RxFerruh Yigit
Removed DEV_RX_OFFLOAD_CRC_STRIP offload flag. Without any specific Rx offload flag, default behavior by PMDs is to strip CRC. PMDs that support keeping CRC should advertise DEV_RX_OFFLOAD_KEEP_CRC Rx offload capability. Applications that require keeping CRC should check PMD capability first and if it is supported can enable this feature by setting DEV_RX_OFFLOAD_KEEP_CRC in Rx offload flag in rte_eth_dev_configure() Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Tomasz Duszynski <tdu@semihalf.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Acked-by: Jan Remes <remes@netcope.com> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Acked-by: Hyong Youb Kim <hyonkim@cisco.com>
2018-09-16acl: forbid rule with priority zeroKonstantin Ananyev
If user specifies priority=0 for some of ACL rules that can cause rte_acl_classify to return wrong results. The reason is that priority zero is used internally for no-match nodes. See more details at: https://bugs.dpdk.org/show_bug.cgi?id=79. The simplest way to overcome the issue is just not allow zero to be a valid priority for the rule. Fixes: dc276b5780c2 ("acl: new library") Cc: stable@dpdk.org Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-08-01test: remove CRC offload for bonding slaveReshma Pattan
Link bonding unit tests uses net_null vdev as slaves, and trying to configure DEV_RX_OFFLOAD_CRC_STRIP as offload flags to vdev is not correct as vdev doesn't support offloads. The unit test is reporting this as failure, so fix this by removing the offloads. Fixes: c6698a3e8f ("ethdev: convert remaining apps to new offload API") Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
2018-08-01test: fix uninitialized port configurationRadu Nicolau
test_pmd_ring_pair_create_attach() uses an uninitialized struct rte_eth_conf object Fixes: 51f567129c94 ("app/test: add pmd_ring") Cc: stable@dpdk.org Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2018-08-01test: add fbarray autotest to scriptAnatoly Burakov
Fbarray autotests were added, but the script command was missing. Add it, so that fbarray autotest can be executed as part of autotest script. Fixes: 7985860c18af ("test/fbarray: add autotests") Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-31test: update autotest listJananee Parthasarathy
Autotest is enhanced with additional test cases being added to autotest_data.py Removed non existing PCI autotest. Cc: stable@dpdk.org Signed-off-by: Reshma Pattan <reshma.pattan@intel.com> Signed-off-by: Jananee Parthasarathy <jananeex.m.parthasarathy@intel.com> Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-31test: parallelize unit testsAnatoly Burakov
Now that everything else is in place, we can run unit tests in a different fashion to what they were running as before. Previously, we had all autotests as part of groups (largely obtained through trial and error) to ensure parallel execution while still limiting amounts of memory used by those tests. This is no longer necessary, and as of previous commit, all tests are now in the same group (still broken into two categories). They still run one-by-one though. Fix this by initializing child processes in multiprocessing Pool initialization, and putting all tests on the queue, so that tests are executed by the first idle worker. Tests are also affinitized to different NUMA nodes using taskset in a round-robin fashion, to prevent over-exhausting memory on any given NUMA node. Non-parallel tests are executed in similar fashion, but on a separate queue which will have only one pool worker, ensuring non-parallel execution. Support for FreeBSD is also added to ensure that on FreeBSD, all tests are run sequentially even for the parallel section. Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-31test: remove autotest groupingAnatoly Burakov
Previously, all autotests were grouped into (seemingly arbitrary) groups. The goal was to run all tests in parallel (so that autotest finishes faster), but we couldn't just do it willy-nilly because DPDK couldn't allocate and free hugepages on-demand, so we had to find autotest groupings that could work memory-wise and still be fast enough to not hold up shorter tests. The inflexibility of memory subsystem has now been fixed for 18.05, so grouping autotests is no longer necessary. Thus, this commit moves all autotests into two groups - parallel(izable) autotests, and non-arallel(izable) autotests (typically performance tests). Note that this particular commit makes running autotests dog slow because while the tests are now in a single group, the test function itself hasn't changed much, so all autotests are now run one-by-one, starting and stopping the DPDK test application. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-31test: improve filteringAnatoly Burakov
Improve code for filtering test groups. Also, move reading binary symbols into filtering stage, so that tests that are meant to be skipped are never attempted to be executed in the first place. Before running tests, print out any tests that were skipped because they weren't compiled. Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-31test: print autotest categoriesAnatoly Burakov
Help visually identify parallel vs. non-parallel autotests. Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-31test: make autotest runner python 2/3 compliantAnatoly Burakov
Autotest runner was still using python 2-style print syntax. Fix it by importing print function from the future, and fix the calls to be python-3 style. Fixes: 54ca545dce4b ("make python scripts python2/3 compliant") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-31test: fix code on reportAnatoly Burakov
There are no reports defined for any test, so this codepath was never triggered, but it's still wrong because it's referencing variables that aren't there. Fix it by passing target into the test function, and reference correct log variable. Fixes: e2cc79b75d9f ("app: rework autotest.py") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-31test: fix result printingAnatoly Burakov
Previously, printing was done using tuple syntax, which caused output to appear as a tuple as opposed to being one string. Fix this by using addition operator instead. Fixes: 54ca545dce4b ("make python scripts python2/3 compliant") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-26test/hash: fix potential memory leakPablo de Lara
In the multiwriter test, if "found" array allocation failed, the memory of "keys" array, which was successfully allocated could not be freed, since by this time, tbl_multiwriter_test_params.keys was not set to this array, which is the pointer freed when finishing the test or when a failure happens. To solve this, tbl_multiwriter_test_params.keys is set to the "keys" address, just after allocating and filling the array. Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX") Cc: stable@dpdk.org Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-26test/hash: fix multiwriter with non consecutive coresPablo de Lara
When non consecutive cores are passed into the test application, the distribution of the keys that each thread needs to insert is not correct, since it assumes that there are no cores skipped between the master core and the worker core. Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX") Cc: stable@dpdk.org Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-26test/bonding: do not request CRC strip offloadFerruh Yigit
bonding PMD doesn't announce CRC STRIP offload support, don't request this offload in unit test otherwise unit test fails. Fixes: f52f1a65e461 ("ethdev: force offloading API rules") Cc: stable@dpdk.org Reported-by: Meijuan Zhao <meijuanx.zhao@intel.com> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-07-26test/flow_classify: fix return typesReshma Pattan
UTs should return either TEST_SUCCESS or TEST_FAILED only. They should not return 0, -1 and any other value. Fixes: 9c9befea4f ("test: add flow classify unit tests") CC: stable@dpdk.org Signed-off-by: Reshma Pattan <reshma.pattan@intel.com> Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-26test: fix file prefix discoveryAnatoly Burakov
Config file has moved, but the tests weren't updated to point to its new location. Update the code to find current prefix. Also, this function is duplicated across multiple tests, so move it into process.h and force compile failures for any attempts to use it on platforms other than Linux. Fixes: adf1d867361c ("eal: move runtime config file to new location") Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Reshma Pattan <reshma.pattan@intel.com>
2018-07-26test: fix EAL flags autotest on FreeBSDAnatoly Burakov
FreeBSD does not support running multiple primary processes concurrently, because all DPDK instances will allocate memory from the same place (memory provided by contigmem driver). While it is technically possible to launch a DPDK process using no-shconf switch, it will actually corrupt main process' for the above reason. Fix EAL flags autotest to not run primary processes unless both no-shconf and no-huge are specified. Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Tested-by: Changqing Wu <changqingx.wu@intel.com>
2018-07-24crypto/qat: support 8-byte 3DESFiona Trahe
Added extra case to support 8 byte key size for 3DES CBC. Also changed capabilities to reflect the change. Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com> Signed-off-by: Fiona Trahe <fiona.trahe@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-24crypto/openssl: support 8-byte 3DESMarko Kovacevic
Added extra case to support 8 byte key size for 3DES CBC. Also changed capabilities to reflect the change. Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-24crypto/aesni_mb: support 3DESMarko Kovacevic
Added support for 3DES cipher algorithm which will support 8, 16 and 24 byte keys, which also has been added in the v0.50 of the IPSec Multi-buffer lib. Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-24test/compress: limit segments in scatter-gatherFiona Trahe
Some PMDs may have a limitation on the number of segments in an SGL mbuf that they can process. Thefore, an upper limit is set to avoid having an indeterminate number of segments. Signed-off-by: Fiona Trahe <fiona.trahe@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-24test/compress: add scatter-gather testsPablo de Lara
Added Scatter-Gather test, which split input data into multi-segment mbufs and compresses/decompresses the data into also a multi-segment mbuf. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Lee Daly <lee.daly@intel.com>
2018-07-24test/compress: log device nameFiona Trahe
Print out name of device on which test is running at start of test suite. Signed-off-by: Fiona Trahe <fiona.trahe@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-24compress/qat: add empty driverFiona Trahe
Add Makefiles, meson files, and empty source files for compression PMD. Handle cases for building either symmetric crypto PMD or compression PMD or both and the common files both depend on. Signed-off-by: Fiona Trahe <fiona.trahe@intel.com> Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-07-13test/power: fix 32-bit buildPablo de Lara
Compilation issue: test/test/test_power_acpi_cpufreq.c:556:31: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘uint64_t {aka long long unsigned int}’ printf("ACPI: Capabilities %lx\n", caps.capabilities); ~~^ ~~~~~~~~~~~~~~~~~ %llx Fixes: 39e38d583075 ("test/power: add unit test for get capabilities API") Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Radu Nicolau <radu.nicolau@intel.com>
2018-07-13memzone: improve zero-length reserveAnatoly Burakov
Currently, reserving zero-length memzones is done by looking at malloc statistics, and reserving biggest sized element found in those statistics. This has two issues. First, there is a race condition. The heap is unlocked between the time we check stats, and the time we reserve malloc element for memzone. This may lead to inability to reserve the memzone we wanted to reserve, because another allocation might have taken place and biggest sized element may no longer be available. Second, the size returned by malloc statistics does not include any alignment information, which is worked around by being conservative and subtracting alignment length from the final result. This leads to fragmentation and reserving memzones that could have been bigger but aren't. Fix all of this by using earlier-introduced operation to reserve biggest possible malloc element. This, however, comes with a trade-off, because we can only lock one heap at a time. So, if we check the first available heap and find *any* element at all, that element will be considered "the biggest", even though other heaps might have bigger elements. We cannot know what other heaps have before we try and allocate it, and it is not a good idea to lock all of the heaps at the same time, so, we will just document this limitation and encourage users to reserve memzones with socket id properly set. Also, fixup unit tests to account for the new behavior. Fixes: fafcc11985a2 ("mem: rework memzone to be allocated by malloc") Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-13test/fbarray: add autotestsAnatoly Burakov
Introduce a suite of autotests to cover functionality of fbarray. This will check for invalid parameters, check API return values and errno codes, and will also do some basic functionality checks on the indexing code. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-12hash: add API to query the key countYipeng Wang
Add a new function, rte_hash_count, to return the number of keys that are currently stored in the hash table. Corresponding test functions are added into hash_test and hash_multiwriter test. Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-12test/hash: add test for read/write concurrencyYipeng Wang
This commits add a new test case for testing read/write concurrency. Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-12test/hash: update for read/write concurrency perfYipeng Wang
New code is added to support read-write concurrency for rte_hash. Due to the newly added code in critial path, the perf test is modified to show any performance impact. It is still a single-thread test. Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-12test/power: add unit test for get capabilities APIRadu Nicolau
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Acked-by: David Hunt <david.hunt@intel.com>
2018-07-12test/bpf: add test for external function callKonstantin Ananyev
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-07-12bpf: add extra information for external symbol definitionsKonstantin Ananyev
Extend struct rte_bpf_xsym with new fields to provide information about: - for variables - type and size - for functions - number of arguments and type/size of each argument and return value Such information would allow validate code to perform more extensive checking on input BPF program and catch misbehaving BPF code. That change would cause ABI/API breakage for librte_bpf. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-07-06test/event: add Rx adapter tests for interrupt driven queuesNikhil Rao
Add test for queue add and delete, the add/delete calls also switch queues between poll and interrupt mode. Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>