Commit Graph

421 Commits

Author SHA1 Message Date
Pallantla Poornima
3bb0383889 test: disable alarm autotest in FreeBSD
Disabled the alarm_autotest UT in FreeBSD
Interrupts are not supported in FreeBSD.
Alarm API depends on interrupts, so disabled alarm test on FreeBSD.

Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
2018-10-29 03:29:20 +01:00
Ilya Maximets
a51639cc72 eal: add nanosleep based delay function
Add a new rte_delay_us_sleep() function that uses nanosleep().
This function can be used by applications to not implement
their own nanosleep() based callback and by internal DPDK
code if CPU non-blocking delay needed.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-26 22:14:06 +02:00
Thomas Monjalon
cc0579f233 kvargs: support list value
If a value contains a comma, rte_kvargs_tokenize() will split here.
In order to support list syntax [a,b] as value, an extra parsing of
the square brackets is added.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-10-26 22:14:06 +02:00
Yipeng Wang
57660eba79 test/hash: add r/w concurrency to autotest
Add read-write concurrency test to meson and autotest
file.

Fixes: 0eb3726ebc ("test/hash: add test for read/write concurrency")
Cc: stable@dpdk.org

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
2018-10-26 22:14:17 +02:00
Yipeng Wang
3c518ca41f test/hash: remove hash scaling unit test
The hash scaling unit test is not really needed
any more since the multi-writer is supported now
inside the library and it is tested by multi-writer
unit test.

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-10-26 22:12:41 +02:00
Yipeng Wang
f25f5735c0 test/hash: add extendable table to r/w test
This commit improves the readwrite test to consider
extendable table feature.

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-10-26 22:03:06 +02:00
Yipeng Wang
fd368e1982 test/hash: test more corner cases
This commit improves the readwrite unit test to cover
more corner cases and reduces the testing time by
reducing the total key count.

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-10-26 22:02:40 +02:00
Yipeng Wang
49aea4ff76 test/hash: use jhash for multi-writer
With sequential key, the test will cover more corner
cases with jhash instead of crc hash, since jhash
generates more random hash pattern on sequential key.
It is useful for functional verification.

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
2018-10-26 22:01:43 +02:00
Naga Suresh Somarowthu
ee1caebc4d test/kni: check module dependency
Check the prerequisites to run the test
1.checked whether the rte_kni module is loaded, if not fail testcase
2.checked whether the rte_kni module is loaded with loop back mode,
  if not skip packet forwarding testcase and log
3.Disabled the test in freebsd as test is not supported

Fixes: 5233e5924a ("app/test: update kni")
Cc: stable@dpdk.org

Signed-off-by: Naga Suresh Somarowthu <naga.sureshx.somarowthu@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-26 19:53:14 +02:00
Dan Gora
c6fd54f28c kni: add function to set link state on kernel interface
Add a new API function to KNI, rte_kni_update_link() to allow DPDK
applications to update the link status for KNI network interfaces in
the linux kernel.

Signed-off-by: Dan Gora <dg@adax.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-26 19:46:15 +02:00
Dharmik Thakkar
c7eb0972e7 test/hash: add lock-free r/w concurrency
Unit tests to check for hash lookup and bulk-lookup perf
with lock-free enabled and with lock-free disabled.
Unit tests performed with readers running in parallel with writers.

Tests include:

- hash lookup on existing keys with:
  - hash add causing NO key-shifts of existing keys in the table

- hash lookup on existing keys likely to be on shift-path with:
  - hash add causing key-shifts of existing keys in the table

- hash lookup on existing keys NOT likely to be on shift-path with:
  - hash add causing key-shifts of existing keys in the table

- hash lookup on non-existing keys with:
  - hash add causing NO key-shifts of existing keys in the table
  - hash add causing key-shifts of existing keys in the table

- hash lookup on keys likely to be on shift-path with:
  - multiple writers causing key-shifts of existing keys in the table

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-10-26 12:50:43 +02:00
Honnappa Nagarahalli
9d033dac7d hash: support no free on delete
rte_hash_lookup_xxx APIs return the index of slot in
the key store. Application(reader) can use that index to reference
other data structures in its scope. Because of this, the
index should not be freed till the application completes
using the index.
RTE_HASH_EXTRA_FLAGS_NO_FREE_ON_DEL is introduced to support this.
When this flag is enabled rte_hash_del_xxx APIs do not free the
key-store index/internal memory associated with the deleted
entry. The new API rte_hash_free_key_with_position should be called
to free the key-store index/internal memory after calling
rte_hash_del_xxx APIs.

Suggested-by: Yipeng Wang <yipeng1.wang@intel.com>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-10-26 12:44:52 +02:00
Honnappa Nagarahalli
40f8e9c28c hash: separate multi-writer from r/w concurrency
RW concurrency is required with single writer and multiple reader
usecase as well. Hence, multi-writer should not be enabled by default when
RW concurrency is enabled.

Fixes: f2e3001b53 ("hash: support read/write concurrency")
Cc: stable@dpdk.org

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-10-26 12:43:52 +02:00
Yipeng Wang
6f4d0c7907 test/hash: add extendable bucket
This commit changes the current rte_hash unit test to
test the extendable table feature and performance.

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-10-26 01:04:33 +02:00
Yipeng Wang
5437d81dbb test/hash: add missing file in meson build
The test_hash_readwrite.c was not in the meson.build file. This
commit adds the missing test into the file.

Fixes: 0eb3726ebc ("test/hash: add test for read/write concurrency")
Cc: stable@dpdk.org

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-10-25 23:59:46 +02:00
Yipeng Wang
b2f1f3c021 test/hash: fix r/w test with non-consecutive cores
the multi-reader and multi-writer rte_hash unit test does not
work correctly with non-consecutive core ids. This commit
fixes the issue.

Fixes: 0eb3726ebc ("test/hash: add test for read/write concurrency")
Cc: stable@dpdk.org

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-10-25 23:59:01 +02:00
Yipeng Wang
0b75b8d404 test/hash: improve accuracy of perf test output
Edit the printf information when error happens to be more
accurate and informative.

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-10-25 23:58:25 +02:00
Yipeng Wang
b772a15eb8 test/hash: fix bucket size in perf test
The bucket size was changed from 4 to 8 but the corresponding
perf test was not changed accordingly.

In the test, the bucket size and number of buckets are used
to map to the underneath rte_hash structure. They are used
to test performance of two conditions: keys in primary
buckets only and keys in both primary and secondary buckets.

Although there is no functional issue with bucket size set
to 4, it mismatches the underneath rte_hash structure,
which may affect code readability and future extension.

Fixes: 58017c98ed ("hash: add vectorized comparison")
Cc: stable@dpdk.org

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
2018-10-25 23:58:12 +02:00
Dan Gora
51bc78a5a7 test: fix build of external memory test
There was a compilation error in test_external_mem.c:

  CC test_external_mem.o
test_external_mem.c: In function ‘test_external_mem’:
test_external_mem.c:375:2: error: ‘for’ loop initial declarations are
                           only allowed in C99 mode

  for (int i = 0; i < n_pages; i++) {
  ^
test_external_mem.c:375:2: note: use option -std=c99 or -std=gnu99 to
                           compile your code

Fixes: b270daa43b ("test: support external memory")

Signed-off-by: Dan Gora <dg@adax.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-10-23 11:36:00 +02:00
Anatoly Burakov
5d7b673d5f mk: build with _GNU_SOURCE defined by default
We use _GNU_SOURCE all over the place, but often times we miss
defining it, resulting in broken builds on musl. Rather than
fixing every library's and driver's and application's makefile,
fix it by simply defining _GNU_SOURCE by default for all
builds.

Remove all usages of _GNU_SOURCE in source files and makefiles,
and also fixup a couple of instances of using __USE_GNU instead
of _GNU_SOURCE.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-10-22 11:28:27 +02:00
Hemant Agrawal
a8dbd44d6b test/crypto: add CAAM JR validation cases
This patch adds the validation test cases for
CAAM JR driver

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-10-17 12:23:40 +02:00
Fan Zhang
0e9f8507af crypto/aesni_mb: support AES-GCM algorithm
This patch updates the current AESNI-MB PMD with added AES-GCM
algorithm support. The patch includes the necessary changes
to the code including the capability update, control and data
patch changes for the AES-GCM algorithm support.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
2018-10-17 12:23:40 +02:00
Tomasz Cel
91c1daa4e1 crypto/qat: support AES-CMAC
This patch add AES-CMAC support. CMAC is a keyed hash function
that is based on a symmetric key block cipher. It is One-Key
CBC MAC improvement over XCBC-MAC. RFC 4493. NIST SP 800-38B.

Signed-off-by: Tomasz Cel <tomaszx.cel@intel.com>
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2018-10-17 12:23:40 +02:00
Ankur Dwivedi
2cbe227c02 test/crypto: add OCTEON TX unit tests
Adding validation tests for OCTEON TX crypto device.

Signed-off-by: Ankur Dwivedi <ankur.dwivedi@caviumnetworks.com>
Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Signed-off-by: Murthy NSSR <nidadavolu.murthy@caviumnetworks.com>
Signed-off-by: Nithin Dabilpuram <nithin.dabilpuram@caviumnetworks.com>
Signed-off-by: Ragothaman Jayaraman <rjayaraman@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Tejasree Kondoj <kondoj.tejasree@caviumnetworks.com>
2018-10-17 12:20:06 +02:00
Vivek Sharma
bed70e5deb eal: use correct data type for bitmap slab operations
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: de3cfa2c98 ("sched: initial import")
Fixes: 693f715da4 ("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-08 17:51:24 +02:00
Anatoly Burakov
b270daa43b test: support external memory
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-11 11:56:55 +02:00
Anatoly Burakov
5282bb1c36 mem: allow memseg lists to be marked as external
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-11 10:24:29 +02:00
Igor Ryzhov
edd2fafbc0 kni: allocate memory dynamically for each device
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-02 17:57:00 +02:00
Nikhil Rao
9b4631be9d test/event: fix Rx adapter intr test for skeleton PMD
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: d65856999d ("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-01 16:54:47 +02:00
Nikhil Rao
83294c6169 test/event: fix eth Rx adapter test for skeleton PMD
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: ec36d881f5 ("eventdev: add implicit release disable capability")
Fixes: 2a9c83ae3b ("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-01 16:54:32 +02:00
Nikhil Rao
475425186f eventdev: fix port id argument in Rx adapter caps
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: c2189c907d ("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-01 16:53:13 +02:00
Nikhil Rao
025825eab8 test/event: fix RSS config for eth Rx adapter
Remove RSS config as it is not required. The hardcoded RSS
configuration also generates an error on NICs that don't support
it.

Fixes: 8863a1fbfc ("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-01 16:53:00 +02:00
Nikhil Rao
de3466e3a4 test/event: add adapter tests to meson build
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-01 16:52:34 +02:00
Nikhil Rao
6298ec1bf8 test/event: fix build for timer adapter
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: d1f3385d00 ("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-01 16:52:21 +02:00
Nikhil Rao
46cf97e4bb eventdev: add test for eth Tx adapter
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-01 16:51:41 +02:00
Pavan Nikhilesh
6fe63a3d7c test/event: check burst mode capability
Enqueue, dequeue depths are only valid for event devs that have burst
mode capability. Check event dev capability before testing depth
boundary.

Fixes: f8f9d233ea ("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-01 16:49:24 +02:00
Nikhil Rao
97428d7b8e test/event: remove eth Rx adapter vdev workaround
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: 2a9c83ae3b ("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-01 16:48:11 +02:00
Fiona Trahe
738ad7b42b test/crypto: fix number of queue pairs
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: 202d375c60 ("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-27 13:41:05 +02:00
Ferruh Yigit
323e7b667f ethdev: make default behavior CRC strip on Rx
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-14 20:08:41 +02:00
Konstantin Ananyev
5394547798 acl: forbid rule with priority zero
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: dc276b5780 ("acl: new library")
Cc: stable@dpdk.org

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-09-16 11:53:25 +02:00
Reshma Pattan
336464c9b1 test: remove CRC offload for bonding slave
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-01 16:36:04 +02:00
Radu Nicolau
f592915946 test: fix uninitialized port configuration
test_pmd_ring_pair_create_attach() uses an uninitialized
struct rte_eth_conf object

Fixes: 51f567129c ("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-01 16:36:04 +02:00
Anatoly Burakov
876b3d4c35 test: add fbarray autotest to script
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: 7985860c18 ("test/fbarray: add autotests")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-08-01 15:58:40 +02:00
Jananee Parthasarathy
9eabcb6824 test: update autotest list
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-31 16:37:52 +02:00
Anatoly Burakov
22dcd9a4d9 test: parallelize unit tests
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-31 16:37:18 +02:00
Anatoly Burakov
82dc85c4e6 test: remove autotest grouping
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-31 16:37:12 +02:00
Anatoly Burakov
71d97e03d8 test: improve filtering
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-31 16:36:36 +02:00
Anatoly Burakov
b48188f417 test: print autotest categories
Help visually identify parallel vs. non-parallel autotests.

Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-31 16:35:19 +02:00
Anatoly Burakov
3efeed3db3 test: make autotest runner python 2/3 compliant
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: 54ca545dce ("make python scripts python2/3 compliant")
Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-31 16:34:38 +02:00
Anatoly Burakov
5a6feec6c8 test: fix code on report
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: e2cc79b75d ("app: rework autotest.py")
Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-31 16:33:19 +02:00