Commit Graph

11475 Commits

Author SHA1 Message Date
Nipun Gupta
7c9e094fe5 event/dpaa2: use dqrr index to consume the DQRR entry
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-19 16:09:56 +01:00
Nipun Gupta
4170dbe266 bus/fslmc: introduce API to consume dqrr using index
A new API qbman_swp_dqrr_idx_consume is defined which takes
input as DQRR index to consume corresponding DQRR entry.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-19 16:09:56 +01:00
Nipun Gupta
72654f090a event/dpaa2: replace static with dynamic logging
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
e51a391919 doc: add eventdev apps changes in release notes
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
d1b46daf74 doc: add pipeline atq test in testeventdev guide
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
ba9de463ab doc: add pipeline queue test in testeventdev guide
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
7a310364de app/eventdev: add pipeline atq worker functions
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
6bf570a991 app/eventdev: add pipeline atq test
This is a pipeline test case that aims at testing the following with
``all types queue`` eventdev scheme.
1. Measure the end-to-end performance of an event dev with a ethernet dev.
2. Maintain packet ordering from Rx to Tx.

The atq queue test functions as same as ``pipeline_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.

Note: The --prod_type_ethdev is mandatory for running the application.

Example command to run pipeline atq test:
sudo build/app/dpdk-test-eventdev -c 0xf -s 0x8 --vdev=event_sw0 -- \
--test=pipeline_atq --wlcore=1 --prod_type_ethdev --stlist=ao

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
314bcf58ca app/eventdev: add pipeline queue worker functions
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
d60b418503 app/eventdev: add pipeline queue test
This is a pipeline queue test case that aims at testing the following:
1. Measure the end-to-end performance of an event dev with a ethernet dev.
2. Maintain packet ordering from Rx to Tx.

The pipeline queue test configures the eventdev with Q queues and P ports,
where Q is (nb_ethdev * nb_stages) + nb_ethdev and P is nb_workers.

The user can choose the number of workers and number of stages through the
--wlcores and the --stlist application command line arguments respectively.
The probed ethernet devices act as producer(s) for this application.

The ethdevs are configured as event Rx adapters that enables them to
injects events to eventdev based the first stage schedule type list
requested by the user through --stlist the command line argument.

Based on the number of stages to process(selected through --stlist),
the application forwards the event to next upstream queue and when it
reaches last stage in the pipeline if the event type is ATOMIC it is
enqueued onto ethdev Tx queue else to maintain ordering the event type is
set to ATOMIC and enqueued onto the last stage queue.
On packet Tx, application increments the number events processed and print
periodically in one second to get the number of events processed in one
second.

Note: The --prod_type_ethdev is mandatory for running the application.

Example command to run pipeline queue test:
sudo build/app/dpdk-test-eventdev -c 0xf -s 0x8 --vdev=event_sw0 -- \
--test=pipeline_queue --wlcore=1 --prod_type_ethdev --stlist=ao

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
d4c003f504 app/eventdev: launch pipeline lcores
The event master lcore's test termination and the logic to print the mpps
are common for the queue and all types queue test.

Move them as the common function.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
f853a0110d app/eventdev: add Tx service setup
Setup one port event port for Tx and link the respective event queue.
Register the Tx function as a service to be called from a service core.
The Tx function dequeues the events from the event queue and transmits
the packet to its respective ethernet port.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
385cefd91e app/eventdev: add event port and Rx adapter setup
Setup one port per worker and link to all queues and setup producer port
based on Rx adapter capabilities.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
76f98e02ac app/eventdev: add pipeline ethport setup and destroy
Add common ethdev port setup and destroy along with event dev destroy.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
38f842bc39 app/eventdev: add pipeline opt dump and check functions
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
e4131b792c app/eventdev: add mempool setup and destroy
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
61e9524ae0 app/eventdev: add pipeline test setup and destroy
Pipeline test has the queue and all types queue variants.
Introduce test_pipeline_common* to share the common code between those
tests.

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
6b1a14a83a app/eventdev: add packet distribution logs
Add logs for packet distribution across worker cores to be printed
along with the test results.

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
6d239dd529 examples/eventdev: rename example
Rename eventdev_pipeline_sw_pmd to eventdev_pipeline as it is no longer
specific underlying event device.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
d8b69cbad0 examples/eventdev: add mempool size configuration
Add option to configure the mempool size at run time instead of
hardcoding it to 16384 * num_ports.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
c7fcf3207a examples/eventdev: add atq single stage pipeline worker
Add optimized eventdev pipeline when ethdev supports thread safe Tx,
number of configured stages is one and all type queue option is enabled.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
6df5657b3f examples/eventdev: add single stage pipeline worker
Add optimized eventdev pipeline when ethdev supports thread safe Tx
and number of configured stages is one.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
afbfb75492 examples/eventdev: add all type queue option
Added configurable option to make queue type as all type queues i.e.
RTE_EVENT_QUEUE_CFG_ALL_TYPES based on event dev capability
RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES.

This can be enabled by supplying '-a' as a cmdline argument.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
c47f70e17d examples/eventdev: add burst for thread safe pipeline
Add burst mode worker pipeline when Tx is multi thread safe.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
fa8054c8c8 examples/eventdev: add thread safe Tx worker pipeline
Add worker pipeline when Tx is multi thread safe.
Probe Ethernet dev capabilities and select it it is supported.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
849b2adc57 examples/eventdev: modify work cycles
The current work cycles function exchanges source and destination mac
address and also pauses the core for the given cycles.
This patch splits the function into two parts i.e. exchange mac and
pause the cores. The pause cores function is invoked at every stage
where as exchange mac is invoked when packet is transmitted.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
52548a6df5 examples/eventdev: add non burst mode generic worker
Currently, worker uses burst dequeue and burst enqueue to forward events.
Add a non burst mode based on the event dev capabilities.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
ace2f9a705 examples/eventdev: add ops to check cmdline args
Each eventdev pipeline needs to allow different cmdline args combination
based on pipeline type.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
81fb40f95c examples/eventdev: add generic worker pipeline
Rename existing pipeline as generic worker pipeline.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
5a45f32179 examples/eventdev: add framework for caps based pipeline
Add framework to support capability based pipeline.
Based on the capability of event device and probed ethernet devices the
optimal pipeline configuration can be chosen.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
3d1b33e44a examples/eventdev: move common data into pipeline common
Move common structures and functions into pipeline_common.h so that they
can be used by different kinds of pipelines.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
84dde5de10 examples/eventdev: support Rx adapter
Use event Rx adapter for packets Rx instead of explicit producer logic.
Use service run iter function for granular control instead of using
dedicated service lcore.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
123d67c73b test/event: register selftests
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
561c5c7b7f event/sw: update selftest ops
Update software eventdev ops to invoke selftest when application invokes
`rte_event_dev_selftest`.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
5e6eb5ccd7 event/sw: make test standalone
Modify test_eventdev_sw to be standalone selftest independent of test
framework.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
85fb515b73 event/sw: move test to driver
Move software eventdev specific test (test_eventdev_sw) to
driver/event/sw/.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
3516327e00 event/octeontx: add selftest to device arguments
Add selftest as a device argument that can be enabled by suppling
'self_test=1' as a vdev parameter

	--vdev="event_octeontx,self_test=1"

The selftest is run after vdev creation is successfully
complete.

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
c54b786602 event/octeontx: update selftest ops
Update octeontx eventdev ops to invoke selftest when application
invokes `rte_event_dev_selftest`.

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
daeda14c20 event/octeontx: make test standalone
Modify test_eventdev_octeontx to be standalone selftest independent of
test framework.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
50fb749a39 event/octeontx: move test to driver
Move octeontx eventdev specific test (test_eventdev_octeontx.c) to
driver/event/octeontx.

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
a1501cd138 eventdev: add API to perform self test
Add API to perform self test on the underlying event device driver.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
5afc521eac eal: add test assert macros
Adding common test assertion macros for unit testing.
Replaced common macros in test/test.h with new RTE_TEST_ASSERT_* macros.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-01-19 16:09:56 +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
Gage Eads
4521900526 event/sw: remove stale IQ references when reconfigured
This commit fixes a bug in which, when the sw PMD is reconfigured, it would
leave stale IQ chunk pointers in each queue's IQ structure. Now, the PMD
initializes all IQs at eventdev start time and releases all IQ chunk
pointers at eventdev stop time (which has the consequence that any events
in a queue when the eventdev is stopped will be lost). This approach should
be resilient to any reconfiguration done between the stop and start, such
as adding or removing queues.

This commit also fixes two potential issues in iq_chunk.h. iq_init()
now initializes the IQ's count field to 0, and iq_dequeue_burst() sets
iq->head to the appropriate next pointer.

Fixes: dca926ca9f ("event/sw: use dynamically-sized IQs")

Reported-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Signed-off-by: Gage Eads <gage.eads@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-01-19 16:09:56 +01:00
Liang Ma
c7aa67f5a9 doc: add eventdev OPDL PMD guide
Add the description about opdl pmd

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-01-19 16:09:56 +01:00
Liang Ma
285aa4405f event/sw: apply new capability flags
Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
2018-01-19 16:09:56 +01:00
Liang Ma
8301714765 event/octeontx: apply new capability flags
Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
2018-01-19 16:09:56 +01:00
Liang Ma
8f4a294c23 event/dpaa2: apply new capability flags
Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
2018-01-19 16:09:56 +01:00
Liang Ma
29653a7bfe eventdev: extend capability flags
add new capability flags to express the opdl PMD limitations.

RTE_EVENT_DEV_CAP_NONSEQ_MODE

Event device is capable of operating in none sequential mode. The path
of the event is not necessary to be sequential. Application can change
the path of event at runtime. If the flag is not set, then event each event
will follow a path from queue 0 to queue 1 to queue 2 etc. If the flag is
set, events may be sent to queues in any order. If the flag is not set, the
eventdev will return an error when the application enqueues an event for a
qid which is not the next in the sequence.

RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK

Event device is capable of configuring the queue/port link at runtime.
If the flag is not set, the eventdev queue/port link is only can be
configured during  initialization.

RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT

Event device is capable of setting up the link between multiple queue
with single port. If the flag is not set, the eventdev can only map a
single queue to each port or map a single queue to many port.

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-01-19 16:09:56 +01:00
Liang Ma
d548ef513c event/opdl: add unit tests
This commit adds unit test inside the OPDL PMD. There is a PMd parameter
"self_test" can be used to triger the test when vdev bus probe opdl device

  e.g.

  sudo ./app/test --vdev="event_opdl0,self_test=1"

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
2018-01-19 16:09:56 +01:00