History log of /dpdk/app/test/test_distributor.c (Results 1 – 25 of 30)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2, v22.03-rc1
# 3c60274c 26-Jan-2022 Jie Zhou <[email protected]>

test: skip unsupported tests on Windows

Skip tests which are not yet supported for Windows:
- The libraries that tests depend on are not enabled on Windows yet
- The tests can compile but with issue

test: skip unsupported tests on Windows

Skip tests which are not yet supported for Windows:
- The libraries that tests depend on are not enabled on Windows yet
- The tests can compile but with issue still under investigation
* test_func_reentrancy:
Windows EAL has no protection against repeated calls.
* test_lcores:
Execution enters an infinite loops, requires investigation.
* test_rcu_qsbr_perf:
Execution hangs on Windows, requires investigation.

Signed-off-by: Jie Zhou <[email protected]>
Signed-off-by: Dmitry Kozlyuk <[email protected]>
Acked-by: Tyler Retzlaff <[email protected]>

show more ...


Revision tags: v21.11, v21.11-rc4, v21.11-rc3, v21.11-rc2, v21.11-rc1, v21.08, v21.08-rc4, v21.08-rc3, v21.08-rc2, v21.08-rc1, v21.05, v21.05-rc4, v21.05-rc3, v21.05-rc2, v21.05-rc1, v21.02, v21.02-rc4, v21.02-rc3, v21.02-rc2, v21.02-rc1
# 95bb2477 19-Jan-2021 Lukasz Wojciechowski <[email protected]>

test/distributor: fix return buffer queue overload

The distributor library implementation uses a cyclic queue to store
packets returned from workers. These packets can be later collected
with rte_di

test/distributor: fix return buffer queue overload

The distributor library implementation uses a cyclic queue to store
packets returned from workers. These packets can be later collected
with rte_distributor_returned_pkts() call.
However the queue has limited capacity. It is able to contain only
127 packets (RTE_DISTRIB_RETURNS_MASK).

Big burst tests sent 1024 packets in 32 packets bursts without waiting
until they are processed by the distributor. In case when tests were
run with big number of worker threads, it happened that more than
127 packets were returned from workers and put into cyclic queue.
This caused packets to be dropped by the queue, making them impossible
to be collected later with rte_distributor_returned_pkts() calls.
However the test waited for all packets to be returned infinitely.

This patch fixes the big burst test by not allowing more than
queue capacity packets to be processed at the same time, making
impossible to drop any packets.
It also cleans up duplicated code in the same test.

Bugzilla ID: 612
Fixes: c0de0eb82e40 ("distributor: switch over to new API")
Cc: [email protected]

Signed-off-by: Lukasz Wojciechowski <[email protected]>
Tested-by: David Marchand <[email protected]>
Reviewed-by: David Hunt <[email protected]>

show more ...


Revision tags: v20.11, v20.11-rc5, v20.11-rc4, v20.11-rc3, v20.11-rc2
# 6e109693 26-Oct-2020 Thomas Monjalon <[email protected]>

test/distributor: switch sequence to dynamic mbuf field

The test used the deprecated mbuf field udata64.
It is moved to a dynamic field in order to allow removal of udata64.

Signed-off-by: Thomas M

test/distributor: switch sequence to dynamic mbuf field

The test used the deprecated mbuf field udata64.
It is moved to a dynamic field in order to allow removal of udata64.

Signed-off-by: Thomas Monjalon <[email protected]>
Acked-by: Lukasz Wojciechowski <[email protected]>
Tested-by: Lukasz Wojciechowski <[email protected]>

show more ...


Revision tags: v20.11-rc1
# cb056611 15-Oct-2020 Stephen Hemminger <[email protected]>

eal: rename lcore master and slave

Replace master lcore with main lcore and
replace slave lcore with worker lcore.

Keep the old functions and macros but mark them as deprecated
for this release.

T

eal: rename lcore master and slave

Replace master lcore with main lcore and
replace slave lcore with worker lcore.

Keep the old functions and macros but mark them as deprecated
for this release.

The "--master-lcore" command line option is also deprecated
and any usage will print a warning and use "--main-lcore"
as replacement.

Signed-off-by: Stephen Hemminger <[email protected]>
Acked-by: Anatoly Burakov <[email protected]>

show more ...


# 0e8704a4 08-Sep-2020 Sarosh Arif <[email protected]>

test/distributor: fix mbuf leak on failure

rte_mempool_get_bulk is used to get bufs/many_bufs from the pool,
but at some locations when test fails the bufs/many_bufs are
not returned back to the poo

test/distributor: fix mbuf leak on failure

rte_mempool_get_bulk is used to get bufs/many_bufs from the pool,
but at some locations when test fails the bufs/many_bufs are
not returned back to the pool.
Due to this, multiple executions of distributor_autotest gives the
following error message: Error getting mbufs from pool.
To resolve this issue rte_mempool_put_bulk is used whenever the test
fails and returns.

Fixes: c3eabff124e6 ("distributor: add unit tests")
Cc: [email protected]

Signed-off-by: Sarosh Arif <[email protected]>
Acked-by: Lukasz Wojciechowski <[email protected]>
Reviewed-by: David Hunt <[email protected]>

show more ...


# f72bff0e 17-Oct-2020 Lukasz Wojciechowski <[email protected]>

test/distributor: fix quitting workers in burst mode

Sending number of packets equal to number of workers isn't enough
to stop all workers in burst version of distributor as more than
one packet can

test/distributor: fix quitting workers in burst mode

Sending number of packets equal to number of workers isn't enough
to stop all workers in burst version of distributor as more than
one packet can be matched and consumed by a single worker. This way
some of workers might not be awaken from rte_distributor_get_pkt().

This patch fixes it by sending packets one by one. Each sent packet
causes exactly one worker to quit.

Fixes: 775003ad2f96 ("distributor: add new burst-capable library")
Cc: [email protected]

Signed-off-by: Lukasz Wojciechowski <[email protected]>
Reviewed-by: Honnappa Nagarahalli <[email protected]>

show more ...


# e1f1400c 17-Oct-2020 Lukasz Wojciechowski <[email protected]>

test/distributor: ensure all packets are delivered

In all distributor tests there is a chance that tests
will send packets to distributor with rte_distributor_process()
before workers are started an

test/distributor: ensure all packets are delivered

In all distributor tests there is a chance that tests
will send packets to distributor with rte_distributor_process()
before workers are started and requested for packets.

This patch ensures that all packets are delivered to workers
by calling rte_distributor_process() in loop until number
of successfully processed packets reaches required by test.
Change is applied to every first call in test case.

Cc: [email protected]

Signed-off-by: Lukasz Wojciechowski <[email protected]>
Acked-by: David Hunt <[email protected]>

show more ...


# 3c57ec00 17-Oct-2020 Lukasz Wojciechowski <[email protected]>

test/distributor: add test with packets marking

All of the former tests analyzed only statistics
of packets processed by all workers.
The new test verifies also if packets are processed
on workers a

test/distributor: add test with packets marking

All of the former tests analyzed only statistics
of packets processed by all workers.
The new test verifies also if packets are processed
on workers as expected.
Every packets processed by the worker is marked
and analyzed after it is returned to distributor.

This test allows finding issues in matching algorithms.

Signed-off-by: Lukasz Wojciechowski <[email protected]>
Acked-by: David Hunt <[email protected]>

show more ...


# 92e69743 17-Oct-2020 Lukasz Wojciechowski <[email protected]>

test/distributor: fix race conditions on shutdown

Instead of making delays in test code and waiting
for worker hopefully to reach proper states,
synchronize worker shutdown test cases with spin lock

test/distributor: fix race conditions on shutdown

Instead of making delays in test code and waiting
for worker hopefully to reach proper states,
synchronize worker shutdown test cases with spin lock
on atomic variable.

Fixes: c0de0eb82e40 ("distributor: switch over to new API")
Cc: [email protected]

Signed-off-by: Lukasz Wojciechowski <[email protected]>
Acked-by: David Hunt <[email protected]>

show more ...


# 79c5e12a 17-Oct-2020 Lukasz Wojciechowski <[email protected]>

test/distributor: collect return mbufs

During quit_workers function distributor's main core processes
some packets to wake up pending worker cores so they can quit.
As quit_workers acts also as a cl

test/distributor: collect return mbufs

During quit_workers function distributor's main core processes
some packets to wake up pending worker cores so they can quit.
As quit_workers acts also as a cleanup procedure for next test
case it should also collect these packets returned by workers'
handlers, so the cyclic buffer with returned packets
in distributor remains empty.

Fixes: c3eabff124e6 ("distributor: add unit tests")
Fixes: c0de0eb82e40 ("distributor: switch over to new API")
Cc: [email protected]

Signed-off-by: Lukasz Wojciechowski <[email protected]>
Acked-by: David Hunt <[email protected]>

show more ...


# 2dfdfcb4 17-Oct-2020 Lukasz Wojciechowski <[email protected]>

test/distributor: fix lcores statistics

Statistics of handled packets are cleared and read on main lcore,
while they are increased in workers handlers on different lcores.

Without synchronization o

test/distributor: fix lcores statistics

Statistics of handled packets are cleared and read on main lcore,
while they are increased in workers handlers on different lcores.

Without synchronization occasionally showed invalid values.
This patch uses atomic mechanisms to synchronize.
Relaxed memory model is used.

Fixes: c3eabff124e6 ("distributor: add unit tests")
Cc: [email protected]

Signed-off-by: Lukasz Wojciechowski <[email protected]>
Acked-by: David Hunt <[email protected]>
Reviewed-by: Honnappa Nagarahalli <[email protected]>

show more ...


# 13b13100 17-Oct-2020 Lukasz Wojciechowski <[email protected]>

test/distributor: fix freeing mbufs

Sanity tests with mbuf alloc and shutdown tests assume that
mbufs passed to worker cores are freed in handlers.
Such packets should not be returned to the distrib

test/distributor: fix freeing mbufs

Sanity tests with mbuf alloc and shutdown tests assume that
mbufs passed to worker cores are freed in handlers.
Such packets should not be returned to the distributor's main
core. The only packets that should be returned are the packets
send after completion of the tests in quit_workers function.

This patch stops returning mbufs to distributor's core.
In case of shutdown tests it is impossible to determine
how worker and distributor threads would synchronize.
Packets used by tests should be freed and packets used during
quit_workers() shouldn't. That's why returning mbufs to mempool
is moved to test procedure run on distributor thread
from worker threads.

Additionally this patch cleans up unused variables.

Fixes: c0de0eb82e40 ("distributor: switch over to new API")
Cc: [email protected]

Signed-off-by: Lukasz Wojciechowski <[email protected]>
Acked-by: David Hunt <[email protected]>

show more ...


# cf669d69 17-Oct-2020 Lukasz Wojciechowski <[email protected]>

test/distributor: fix shutdown of busy worker

The sanity test with worker shutdown delegates all bufs
to be processed by a single lcore worker, then it freezes
one of the lcore workers and continues

test/distributor: fix shutdown of busy worker

The sanity test with worker shutdown delegates all bufs
to be processed by a single lcore worker, then it freezes
one of the lcore workers and continues to send more bufs.
The freezed core shuts down first by calling
rte_distributor_return_pkt().

The test intention is to verify if packets assigned to
the shut down lcore will be reassigned to another worker.

However the shutdown core was not always the one, that was
processing packets. The lcore processing mbufs might be different
every time test is launched. This is caused by keeping the value
of wkr static variable in rte_distributor_process() function
between running test cases.

Test freezed always lcore with 0 id. The patch stores the id
of worker that is processing the data in zero_idx global atomic
variable. This way the freezed lcore is always the proper one.

Fixes: c3eabff124e6 ("distributor: add unit tests")
Cc: [email protected]

Signed-off-by: Lukasz Wojciechowski <[email protected]>
Tested-by: David Hunt <[email protected]>

show more ...


# 6bd951b4 17-Oct-2020 Lukasz Wojciechowski <[email protected]>

distributor: fix buffer use after free

rte_distributor_request_pkt and rte_distributor_get_pkt dereferenced
oldpkt parameter when in RTE_DIST_ALG_SINGLE even if number
of returned buffers from worke

distributor: fix buffer use after free

rte_distributor_request_pkt and rte_distributor_get_pkt dereferenced
oldpkt parameter when in RTE_DIST_ALG_SINGLE even if number
of returned buffers from worker to distributor was 0.

This patch passes NULL to the legacy API when number of returned
buffers is 0. This allows passing NULL as oldpkt parameter.

Distributor tests are also updated passing NULL as oldpkt and
0 as number of returned packets, where packets are not returned.

Fixes: 775003ad2f96 ("distributor: add new burst-capable library")
Cc: [email protected]

Signed-off-by: Lukasz Wojciechowski <[email protected]>
Acked-by: David Hunt <[email protected]>

show more ...


Revision tags: v20.08, v20.08-rc4, v20.08-rc3, v20.08-rc2, v20.08-rc1, v20.05, v20.05-rc4, v20.05-rc3, v20.05-rc2, v20.05-rc1, v20.02, v20.02-rc4, v20.02-rc3, v20.02-rc2, v20.02-rc1, v19.11, v19.11-rc4, v19.11-rc3, v19.11-rc2, v19.11-rc1
# 0a82b96e 15-Oct-2019 Ruifeng Wang <[email protected]>

test/distributor: fix spurious failure

Sanity test could spuriously fail with reporting flush count error.
It was caused by worker stat coherent issue between distributor and
worker thread.
Fix this

test/distributor: fix spurious failure

Sanity test could spuriously fail with reporting flush count error.
It was caused by worker stat coherent issue between distributor and
worker thread.
Fix this issue by using atomic operations to update worker stat.

Fixes: c3eabff124e6 ("distributor: add unit tests")
Cc: [email protected]

Signed-off-by: Ruifeng Wang <[email protected]>
Reviewed-by: Gavin Hu <[email protected]>
Acked-by: David Hunt <[email protected]>

show more ...


Revision tags: v19.08, v19.08-rc4, v19.08-rc3, v19.08-rc2, v19.08-rc1
# c275ded1 05-Jul-2019 Harman Kalra <[email protected]>

test/distributor: fix flush with worker shutdown

On restarting worker 0 after shutdown, packets handled by
worker 0 must be incremented only when a packet is received by
it.

Fixes: c3eabff124e6 ("d

test/distributor: fix flush with worker shutdown

On restarting worker 0 after shutdown, packets handled by
worker 0 must be incremented only when a packet is received by
it.

Fixes: c3eabff124e6 ("distributor: add unit tests")
Cc: [email protected]

Signed-off-by: Harman Kalra <[email protected]>
Acked-by: David Hunt <[email protected]>

show more ...


Revision tags: v19.05, v19.05-rc4, v19.05-rc3, v19.05-rc2
# bb79646a 08-Apr-2019 Phil Yang <[email protected]>

test/distributor: replace sync with atomic builtins

'__sync' built-in functions are deprecated, should use the '__atomic'
built-in instead. the sync built-in functions are full barriers, while
atomi

test/distributor: replace sync with atomic builtins

'__sync' built-in functions are deprecated, should use the '__atomic'
built-in instead. the sync built-in functions are full barriers, while
atomic built-in functions offer less restrictive one-way barriers,
which help performance.

Here is the example test result on TX2:
sudo ./arm64-armv8a-linuxapp-gcc/app/test -l 112-139 \
-n 4 --socket-mem=1024,1024 -- -i
RTE>>distributor_perf_autotest

*** distributor_perf_autotest without this patch ***
==== Cache line switch test ===
Time for 33554432 iterations = 1519202730 ticks
Ticks per iteration = 45

*** distributor_perf_autotest with this patch ***
==== Cache line switch test ===
Time for 33554432 iterations = 1251715496 ticks
Ticks per iteration = 37

Less ticks needed for the cache line switch test. It got 17% of
performance improvement.

Signed-off-by: Phil Yang <[email protected]>
Reviewed-by: Gavin Hu <[email protected]>
Reviewed-by: Ruifeng Wang <[email protected]>
Reviewed-by: Joyce Kong <[email protected]>
Reviewed-by: Dharmik Thakkar <[email protected]>
Reviewed-by: Honnappa Nagarahalli <[email protected]>

show more ...


# e0f4a0ed 15-Jun-2019 David Marchand <[email protected]>

test: skip tests when missing requirements

Let's mark as skipped the tests when they are missing some requirements
like a number of used cores or specific hardware availability, like
compress, crypt

test: skip tests when missing requirements

Let's mark as skipped the tests when they are missing some requirements
like a number of used cores or specific hardware availability, like
compress, crypto or eventdev devices.

Signed-off-by: David Marchand <[email protected]>

show more ...


Revision tags: v19.05-rc1
# 7ab07702 14-Feb-2019 Pallantla Poornima <[email protected]>

test/distributor: replace sprintf with strlcpy

sprintf function is not secure as it doesn't check the length of string.
replaced sprintf with strlcpy.

Fixes: f74df2c57e ("test/distributor: test sin

test/distributor: replace sprintf with strlcpy

sprintf function is not secure as it doesn't check the length of string.
replaced sprintf with strlcpy.

Fixes: f74df2c57e ("test/distributor: test single and burst API")
Cc: [email protected]

Signed-off-by: Pallantla Poornima <[email protected]>
Acked-by: David Hunt <[email protected]>

show more ...


# a9de470c 26-Feb-2019 Bruce Richardson <[email protected]>

test: move to app directory

Since all other apps have been moved to the "app" folder, the autotest app
remains alone in the test folder. Rather than having an entire top-level
folder for this, we ca

test: move to app directory

Since all other apps have been moved to the "app" folder, the autotest app
remains alone in the test folder. Rather than having an entire top-level
folder for this, we can move it back to where it all started in early
versions of DPDK - the "app/" folder.

This move has a couple of advantages:
* This reduces clutter at the top level of the project, due to one less
folder.
* It eliminates the separate build task necessary for building the
autotests using make "make test-build" which means that developers are
less likely to miss something in their own compilation tests
* It re-aligns the final location of the test binary in the app folder when
building with make with it's location in the source tree.

For meson builds, the autotest app is different from the other apps in that
it needs a series of different test cases defined for it for use by "meson
test". Therefore, it does not get built as part of the main loop in the
app folder, but gets built separately at the end.

Signed-off-by: Bruce Richardson <[email protected]>

show more ...


Revision tags: v19.02, v19.02-rc4, v19.02-rc3, v19.02-rc2, v19.02-rc1, v18.11, v18.11-rc5, v18.11-rc4, v18.11-rc3, v18.11-rc2, v18.11-rc1, v18.08, v18.08-rc3, v18.08-rc2, v18.08-rc1, v18.05, v18.05-rc6, v18.05-rc5, v18.05-rc4, v18.05-rc3, v18.05-rc2, v18.05-rc1, v18.02, v18.02-rc4, v18.02-rc3, v18.02-rc2, v18.02-rc1, v17.11, v17.11-rc4, v17.11-rc3, v17.11-rc2, v17.11-rc1, v17.08, v17.08-rc4, v17.08-rc3, v17.08-rc2, v17.08-rc1, v17.05, v17.05-rc4, v17.05-rc3, v17.05-rc2, v17.05-rc1, v17.02, v17.02-rc3, v17.02-rc2, v17.02-rc1, v16.11, v16.11-rc3, v16.11-rc2, v16.11-rc1, v16.07, v16.07-rc5, v16.07-rc4, v16.07-rc3
# 26e09db6 13-Jul-2016 Thomas Monjalon <[email protected]>

app/test: rework command registration

The tests are registered with their command name by adding a structure
to a list. The structure of each test was declared in each test file
and passed to the re

app/test: rework command registration

The tests are registered with their command name by adding a structure
to a list. The structure of each test was declared in each test file
and passed to the register macro.
This rework generate the structure inside the register macro.

Signed-off-by: Thomas Monjalon <[email protected]>
Reviewed-by: Jan Viktorin <[email protected]>

show more ...


Revision tags: v16.07-rc2, v16.07-rc1, v16.04, v16.04-rc4, v16.04-rc3, v16.04-rc2, v16.04-rc1, v2.2.0, v2.2.0-rc4, v2.2.0-rc3, v2.2.0-rc2, v2.2.0-rc1, v2.1.0, v2.1.0-rc4, v2.1.0-rc3, v2.1.0-rc2, v2.1.0-rc1
# 824cb29c 29-Apr-2015 Konstantin Ananyev <[email protected]>

apps: fix default mbuf size

Latest mbuf changes (priv_size addition and related fixes)
exposed small problem with testpmd and few other sample apps:
when mbuf size is exaclty 2KB or less, that cause

apps: fix default mbuf size

Latest mbuf changes (priv_size addition and related fixes)
exposed small problem with testpmd and few other sample apps:
when mbuf size is exaclty 2KB or less, that causes
ixgbe PMD to select scattered RX even for configs with 'normal'
max packet length (max_rx_pkt_len == ETHER_MAX_LEN).
To overcome that problem and unify the code, new macro was created
to represent recommended minimal buffer length for mbuf.
When appropriate, samples are updated to use that macro.

Fixes: dfb03bbe2b ("app/testpmd: use standard functions to initialize
mbufs and mbuf pool")

Signed-off-by: Konstantin Ananyev <[email protected]>
Acked-by: Olivier Matz <[email protected]>

show more ...


# 13501503 23-Apr-2015 Bruce Richardson <[email protected]>

distributor: remove inclusion of mbuf header

The distributor header file includes the mbuf header file, but it does not
need to do so as it only uses pointers to the struct rte_mbuf type, and
does n

distributor: remove inclusion of mbuf header

The distributor header file includes the mbuf header file, but it does not
need to do so as it only uses pointers to the struct rte_mbuf type, and
does not use any of the mbuf internals, nor any of the mbuf functions or
macros. Therefore the inclusion is unnecessary, and can be replaced by a
forward declaration of the mbuf type.

Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Olivier Matz <[email protected]>

show more ...


# ea0c20ea 22-Apr-2015 Olivier Matz <[email protected]>

apps: use helper to create mbuf pools

When it's possible, use the new helper to create the mbuf pools.
Most of the patch is trivial, except for the following files that
have some specifics (indirect

apps: use helper to create mbuf pools

When it's possible, use the new helper to create the mbuf pools.
Most of the patch is trivial, except for the following files that
have some specifics (indirect mbufs):
- ip_fragmentation
- ip_pipeline
- ipv4_multicast
- vhost

Signed-off-by: Olivier Matz <[email protected]>
Acked-by: Neil Horman <[email protected]>
Acked-by: Konstantin Ananyev <[email protected]>

show more ...


Revision tags: v2.0.0, v2.0.0-rc3, v2.0.0-rc2, v2.0.0-rc1, v1.8.0, v1.8.0-rc6, v1.8.0-rc5, v1.8.0-rc4, v1.8.0-rc3, v1.8.0-rc2
# 9f2e99d1 10-Nov-2014 Qinglai Xiao <[email protected]>

mbuf: add usr alias for hash

This field is added for librte_distributor. User of librte_distributor
is advocated to set value of mbuf->hash.usr before calling
rte_distributor_process. The value of u

mbuf: add usr alias for hash

This field is added for librte_distributor. User of librte_distributor
is advocated to set value of mbuf->hash.usr before calling
rte_distributor_process. The value of usr is the tag which stands as
identifier of flow.

Signed-off-by: Qinglai Xiao <[email protected]>
Acked-by: Bruce Richardson <[email protected]>

show more ...


12