Commit Graph

23 Commits

Author SHA1 Message Date
Stephen Hemminger
2b5c68956f app/eventdev: remove unnecessary memset
The function rte_event_dev_info_get already zeros the info structure.
Therefore the test code doesn't need to do it.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-09-26 15:33:46 +02:00
Akhil Goyal
8f5b549502 app/eventdev: support asym ops for crypto adapter
Test eventdev app is updated to add new option for asymmetric
crypto ops for event crypto adapter.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
2022-06-01 16:26:34 +02:00
Pavan Nikhilesh
f0b68c0b2a app/eventdev: clean up worker state before exit
Event ports are configured to implicitly release the scheduler contexts
currently held in the next call to rte_event_dequeue_burst().
A worker core might still hold a scheduling context during exit, as the
next call to rte_event_dequeue_burst() is never made.
This might lead to deadlock based on the worker exit timing and when
there are very less number of flows.

Add clean up function to release any scheduling contexts held by the
worker by using RTE_EVENT_OP_RELEASE.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-17 16:43:12 +02:00
Pavan Nikhilesh
a734e7388d app/eventdev: simplify signal handling and teardown
Remove rte_*_dev calls from signal handler callback as signal handlers
are supposed to be light weight.

Split ethdev teardown into Rx and Tx sections, wait for
workers to finish processing after disabling Rx to allow workers
to complete processing currently held packets.

Verified SW event device on ARM64 using the following command:

./build/app/dpdk-test-eventdev -l 7-23 -s 0xf00 --vdev=event_sw0
 -a 0002:02:00.0 -- --prod_type_ethdev --nb_pkts=0 --verbose 2
 --test=pipeline_queue --stlist=o --wlcores 16-23

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-17 16:43:04 +02:00
Shijith Thotton
de2bc16e1b app/eventdev: add crypto producer mode
In crypto producer mode, producer core enqueues cryptodev with software
generated crypto ops and worker core dequeues crypto completion events
from the eventdev. Event crypto metadata used for above processing is
pre-populated in each crypto session.

Parameter --prod_type_cryptodev can be used to enable crypto producer
mode. Parameter --crypto_adptr_mode can be set to select the crypto
adapter mode, 0 for OP_NEW and 1 for OP_FORWARD.

This mode can be used to measure the performance of crypto adapter.

Example:
  ./dpdk-test-eventdev -l 0-2 -w <EVENTDEV> -w <CRYPTODEV> -- \
  --prod_type_cryptodev --crypto_adptr_mode 1 --test=perf_atq \
  --stlist=a --wlcores 1 --plcores 2

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
2022-02-24 08:58:43 +01:00
Thomas Monjalon
33011cb3df replace always-inline attributes
There is a macro __rte_always_inline, forcing functions to be inlined,
which is now used where appropriate for consistency.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2020-04-16 18:16:46 +02:00
Pavan Nikhilesh
f0959283ed app/eventdev: add option for global dequeue timeout
Add option to provide a global dequeue timeout that is used to create
the eventdev.
The dequeue timeout provided will be common across all the worker
ports. If the eventdev hardware supports power management through
dequeue timeout then this option can be used for verifying power
demands at various packet rates.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-04-02 03:11:08 +02:00
Pavan Nikhilesh
66b82db2ef app/eventdev: start event producers after eventdev
Start event producers after eventdev i.e. consumer is started as in some
architectures it might lead to undefined behaviour or events being
dropped.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2019-03-15 06:46:50 +01:00
Thomas Monjalon
43d162bc16 fix dpdk.org URLs
The DPDK website has a new URL scheme since June 2018.

Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: John McNamara <john.mcnamara@intel.com>
2018-11-26 20:19:24 +01:00
Thomas Monjalon
d9a42a69fe ethdev: deprecate port count function
Some DPDK applications wrongly assume these requirements:
    - no hotplug, i.e. ports are never detached
    - all allocated ports are available to the application

Such application iterates over ports by its own mean.
The most common pattern is to request the port count and
assume ports with index in the range [0..count[ can be used.

In order to fix this common mistake in all external applications,
the function rte_eth_dev_count is deprecated, while introducing
the new functions rte_eth_dev_count_avail and rte_eth_dev_count_total.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-04-18 00:48:41 +02:00
Pavan Nikhilesh
d008f20bce app/eventdev: add event timer adapter as a producer
Add event timer adapter as producer option that can be selected by
passing --prod_type_timerdev.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-04-16 11:11:06 +02:00
Pavan Nikhilesh
535c630c2d app/eventdev: fix port dequeue depth configuration
The port dequeue depth value has to be compared against the maximum
allowed dequeue depth reported by the event drivers.

Fixes: 3617aae53f ("app/eventdev: add event Rx adapter setup")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-01-31 07:18:57 +01:00
Pavan Nikhilesh
452cd797f0 app/eventdev: fix event device queue count
Fix the event device queue count reported when producer type is Rx
adapter for perfomance queue and atq test.

Fixes: 20eb154e04 ("app/testeventdev: add perf queue test")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
b0333c55df app/eventdev: add service core configuration
Add service core configuration for Rx adapter. The configuration picks
the least used service core to run the service on.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
3617aae53f app/eventdev: add event Rx adapter setup
Add functions to setup and configure Rx adapter based on the number of
ethdev ports setup.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
7f3daf3426 app/eventdev: add ethernet device tear down
Add ethernet device destroy functions to stop and close ethdev ports
if they are configured when prod_type_ethdev option is enabled.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
3fc8de4f8d app/eventdev: add ethernet device setup helpers
Add ethernet device setup functions to configure ethdev ports incase
prod_type_ethdev option is enabled.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
59f697e338 app/eventdev: modify setup to support ethdev
Modify app setup to accommodate event port and queue setup based on the
number of ethernet ports.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-01-19 16:09:56 +01:00
Jerin Jacob
53a3b7e8dd app: use SPDX tag for Cavium copyright files
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-09 16:19:01 +01:00
Pavan Nikhilesh
57305d794e app/testeventdev: use service cores
Use service cores for offloading event scheduling in case of
centralized scheduling instead of calling the schedule api directly.
This removes the dependency on dedicated scheduler core specified by
giving command line option --slcore.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-10-27 00:53:07 +02:00
Jerin Jacob
3abcd29f2d update Cavium Inc copyright headers
Replace the incorrect reference to "Cavium Networks", "Cavium Ltd"
company name with correct the "Cavium, Inc" company name in
copyright headers.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-07-08 17:43:49 +02:00
Jerin Jacob
1eb10ad8db app/testeventdev: add perf all types queue worker
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2017-07-07 09:35:35 +02:00
Jerin Jacob
e605024355 app/testeventdev: add perf all types queue test
This is a performance test case that aims at testing the following:
1. Measure the number of events can be processed in a second.
2. Measure the latency to forward an event.

The atq queue test functions as same as "perf_queue" test.
The difference is, it uses, "all type queue" scheme instead of separate
queues for each stage and thus reduces the number of queues required to
realize the use case and enables flow pinning as the event does not
move to the next queue.

Example command to run perf "all types queue" test:

sudo build/app/dpdk-test-eventdev --vdev=event_octeontx --\
--test=perf_atq --plcores=2 --wlcore=3 --stlist=p --nb_pkts=1000000000

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2017-07-07 09:35:24 +02:00