Jan Blunck [Sun, 9 Jul 2017 09:44:16 +0000 (05:44 -0400)]
crypto/scheduler: fix build with old gcc
Seen with gcc 4.9.2:
drivers/crypto/scheduler/scheduler_multicore.c:286:2: error:
'for' loop initial declarations are only allowed in C99 or C11 mode
for (uint16_t i = 0; i < sched_ctx->nb_wc; i++)
^
Fixes:
4c07e0552f0a ("crypto/scheduler: add multicore scheduling mode")
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:33 +0000 (02:04 +0200)]
devargs: introduce new parsing helper
Introduce a more versatile helper to parse device strings. This
helper expects a generic rte_devargs structure as storage in order not
to require API changes in the future, should this structure be
updated.
The old equivalent function is thus being deprecated, as its API does
not allow to accompany rte_devargs evolutions.
A deprecation notice is issued.
This new helper will parse bus information as well as device name and
device parameters. It does not allocate an rte_devargs structure and
expects one to be given as input.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:32 +0000 (02:04 +0200)]
devargs: make device types generic
rte_devargs now represents any device from any bus.
The related devtypes do not identify a bus anymore, only which scan
policy the device subscribes to.
The bus itself is identified by a bus handle previously introduced.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:31 +0000 (02:04 +0200)]
net/virtio: remove device type reference
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:30 +0000 (02:04 +0200)]
devargs: make device representation generic
Remove the dependency of this subsystem upon bus specific device
representation.
Devargs only validates that a device declaration is correct and handled
by a bus. The device interpretation is done afterward within the bus.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:29 +0000 (02:04 +0200)]
devargs: parse bus policies
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:28 +0000 (02:04 +0200)]
bus: introduce scan policies
Scan policies describe the way a bus should scan the system to search
for possible devices.
Three flags are introduced:
RTE_BUS_SCAN_UNDEFINED: Configuration is irrelevant for this bus
RTE_BUS_SCAN_WHITELIST: Scanning should be limited to declared devices
RTE_BUS_SCAN_BLACKLIST: Scanning should exclude only declared devices
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:27 +0000 (02:04 +0200)]
eal: move kernel driver enum out of PCI header
Device kernel module is a device attribute.
It is used in generic device structures and must not be tied to a bus.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Thomas Monjalon [Fri, 7 Jul 2017 00:04:26 +0000 (02:04 +0200)]
examples/ethtool: include PCI header directly
In devargs rework, rte_pci.h won't be included by rte_ethdev.h
(via rte_devargs.h) anymore.
rte_ethtool_get_drvinfo() could use rte_devargs.name instead of
creating equivalent bus specific name.
For now, it is workarounded by just including rte_pci.h.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:25 +0000 (02:04 +0200)]
test: include PCI header directly
In devargs rework, rte_pci.h won't be included
via rte_devargs.h anymore.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:24 +0000 (02:04 +0200)]
app/testpmd: include PCI header directly
In devargs rework, rte_pci.h won't be included
via rte_devargs.h anymore.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:23 +0000 (02:04 +0200)]
net/sfc: include PCI header directly
In devargs rework, rte_pci.h won't be included
via rte_devargs.h anymore.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:22 +0000 (02:04 +0200)]
net/ixgbe: include PCI header directly
In devargs rework, rte_pci.h won't be included
via rte_devargs.h anymore.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:21 +0000 (02:04 +0200)]
net/e1000: include PCI header directly
In devargs rework, rte_pci.h won't be included
via rte_devargs.h anymore.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:20 +0000 (02:04 +0200)]
net/mlx5: include PCI header directly
In devargs rework, rte_pci.h won't be included
via rte_devargs.h anymore.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:19 +0000 (02:04 +0200)]
net/bnxt: include PCI header directly
In devargs rework, rte_pci.h won't be included
via rte_devargs.h anymore.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:18 +0000 (02:04 +0200)]
net/bonding: include PCI header directly
In devargs rework, rte_pci.h won't be included
via rte_devargs.h anymore.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:03:12 +0000 (02:03 +0200)]
devargs: parse bus info
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:03:11 +0000 (02:03 +0200)]
bus: add helper to find a bus from a device name
Find which bus should be able to parse this device name into an internal
device representation.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:03:10 +0000 (02:03 +0200)]
bus/pci: implement parse bus operation
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:03:09 +0000 (02:03 +0200)]
bus/vdev: implement parse bus operation
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:03:08 +0000 (02:03 +0200)]
bus: introduce parsing functionality
This operation can be used either to validate that a device
representation can be understood by a bus, as well as store the resulting
specialized device representation in any format determined by the bus.
Implementing this function allows EAL initialization routines to infer
which bus should handle a device. This is used as a way to respect
backward compatibility.
This API will disappear once this compatibility is not enforced anymore.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Thomas Monjalon [Fri, 7 Jul 2017 00:03:07 +0000 (02:03 +0200)]
bus: fix driver registration
The bus name was stored with embedded double quotes.
Indeed the bus name is given with a string in a macro,
which is not used elsewhere.
These macros are useless because the buses are drivers,
so they must not have any API for the application writer.
The registration can be done with a hardcoded value without quotes.
There is another (small) benefit of not using macros for driver names:
it is to have a meaningful constructor function name.
For instance, it was businitfn_PCI_BUS_NAME instead of businitfn_pci.
The bus registration macro is also changed to use
the new RTE_INIT_PRIO macro, similar to RTE_INIT used for other drivers.
The priority is the highest (101) in order to be sure that the bus driver
is registered before its device drivers.
Fixes:
0fd1a0eaae19 ("pci: add bus driver")
Fixes:
fea892e35f21 ("bus/vdev: use standard bus registration")
Fixes:
7e7df6d0a41d ("bus/fslmc: introduce fsl-mc bus driver")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Stephen Hemminger [Thu, 6 Jul 2017 15:28:12 +0000 (08:28 -0700)]
pci: fix spelling in comment
Minor spelling error in comment.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Thu, 6 Jul 2017 15:28:10 +0000 (08:28 -0700)]
bus: simplify finding starting point
A separate boolean variable is not necessary when searching for
starting point in find_device. Just use the passed argument
as its own flag value.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Mike Stolarchuk [Fri, 7 Jul 2017 05:54:25 +0000 (06:54 +0100)]
hash: fix lock release on add
When adding items to a hash table with multiple threads,
there is an spinlock used to prevent data corruption
(unless Transactional Memory is supported).
If there is a failure, the spinlock should be released,
but there were cases where that was not happening.
Fixes:
be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX")
Cc: stable@dpdk.org
Signed-off-by: Mike Stolarchuk <mike.stolarchuk@bigswitch.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Roman Zhukov [Thu, 25 May 2017 15:57:54 +0000 (16:57 +0100)]
examples: adjust Rx and Tx descriptors to device limits
Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Roman Zhukov [Thu, 25 May 2017 15:57:53 +0000 (16:57 +0100)]
ethdev: add function to adjust number of descriptors
Check that numbers of Rx and Tx descriptors satisfy descriptors limits
from the Ethernet device information, otherwise adjust them to boundaries.
Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Qi Zhang [Thu, 6 Jul 2017 06:32:19 +0000 (02:32 -0400)]
ethdev: fix documentation for fuzzy match
Fix document for fuzzy match and GRE
Fixes:
a3a2e2c8f7de ("ethdev: add fuzzy match in flow API")
Fixes:
7cd048321d1d ("ethdev: add MPLS and GRE flow API items")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:08:31 +0000 (02:08 +0200)]
ethdev: add flow rule copy function
This allows PMDs and applications to save flow rules in their generic
format for later processing. This is useful when rules cannot be applied
immediately, such as when the device is not properly initialized.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Jerin Jacob [Sat, 8 Jul 2017 13:57:53 +0000 (19:27 +0530)]
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>
Jerin Jacob [Tue, 4 Jul 2017 04:53:27 +0000 (10:23 +0530)]
doc: add perf all types queue test in eventdev test guide
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:26 +0000 (10:23 +0530)]
doc: add perf queue test in eventdev test guide
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:25 +0000 (10:23 +0530)]
doc: add order all types queue test in eventdev test guide
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:24 +0000 (10:23 +0530)]
doc: add order queue test in eventdev test guide
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Guduri Prathyusha [Tue, 4 Jul 2017 04:53:23 +0000 (10:23 +0530)]
doc: describe the new eventdev test application
Add documentation to describe usage of eventdev test application and
supported command line arguments.
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:22 +0000 (10:23 +0530)]
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>
Jerin Jacob [Tue, 4 Jul 2017 04:53:21 +0000 (10:23 +0530)]
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>
Jerin Jacob [Tue, 4 Jul 2017 04:53:20 +0000 (10:23 +0530)]
app/testeventdev: add perf queue worker functions
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:19 +0000 (10:23 +0530)]
app/testeventdev: add perf 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 perf queue test configures the eventdev with Q queues and P ports,
where Q is nb_producers * nb_stages and P is nb_workers + nb_producers.
The user can choose the number of workers, the number of producers and
number of stages through the --wlcores , --plcores and the --stlist
application command line arguments respectively.
The producer(s) injects the events to eventdev based the
first stage sched 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
terminates when it reaches the last stage in the pipeline.
On event termination, application increments the number events
processed and print periodically in one second to get the
number of events processed in one second.
When --fwd_latency command line option selected, the application
inserts the timestamp in the event on the first stage and then
on termination, it updates the number of cycles to forward
a packet. The application uses this value to compute the average
latency to a forward packet.
Example command to run perf queue test:
sudo build/app/dpdk-test-eventdev --vdev=event_sw0 -- --test=perf_queue\
--slcore=1 --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>
Jerin Jacob [Tue, 4 Jul 2017 04:53:18 +0000 (10:23 +0530)]
app/testeventdev: launch perf lcores
The event producer and master lcore's test termination and
the logic to print the mpps and latency are common for the
queue and all types queue test.
Move them as the common function.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:17 +0000 (10:23 +0530)]
app/testeventdev: add perf port setup
Setup one port per worker and link to all queues and setup
N producer ports to inject the events.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:16 +0000 (10:23 +0530)]
app/testeventdev: add perf opt dump and check functions
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:15 +0000 (10:23 +0530)]
app/testeventdev: add perf basic functions
add functions to create mempool, destroy mempool and print the test result.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:14 +0000 (10:23 +0530)]
app/testeventdev: add perf test setup and destroy
perf test has the queue and all types queue variants.
Introduce test_perf_common* to share the common code between those tests.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:13 +0000 (10:23 +0530)]
app/testeventdev: add order all types queue test
This test verifies the same aspects of order_queue test,
The difference is the number of queues used, this test
operates on a single "all types queue"(atq) instead of two
different queues for ordered and atomic.
Example command to run order all types queue test:
sudo build/app/dpdk-test-eventdev --vdev=event_octeontx --\
--test=order_atq --plcores 1 --wlcores 2,3
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:12 +0000 (10:23 +0530)]
app/testeventdev: add order queue worker functions
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:11 +0000 (10:23 +0530)]
app/testeventdev: add order queue test
The order queue test configures the eventdev with two queues
and an event producer to inject the events to q0(ordered) queue.
Both q0(ordered) and q1(atomic) are linked to all the workers.
The event producer maintains a sequence number per flow and
injects the events to the ordered queue.
The worker receives the events from ordered queue and
forwards to atomic queue. Since the events from an ordered queue can
be processed in parallel on the different workers, the
ingress order of events might have changed on the downsteam
atomic queue enqueue. On enqueue to the atomic queue, the eventdev PMD
driver reorders the event to the original ingress order
i.e producer ingress order).
When the event is dequeued from the atomic queue by the worker,
this test verifies the expected
sequence number of associated event per flow by comparing
the free running expected sequence number per flow.
Example command to run order queue test:
sudo build/app/dpdk-test-eventdev --vdev=event_sw0 --\
--test=order_queue --plcores 1 --wlcores 2,3
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:10 +0000 (10:23 +0530)]
app/testeventdev: launch order lcores
The event producer and master lcore's test end and
failure detection logic are common for the queue and
all types queue test.Move them as the common function.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:09 +0000 (10:23 +0530)]
app/testeventdev: add order port setup
Setup one port per worker and link to all queues and setup
one producer port to inject the events.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:08 +0000 (10:23 +0530)]
app/testeventdev: add order basic functions
add functions to create mempool, destroy mempool,
dump the options, check the options and print the test result.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:07 +0000 (10:23 +0530)]
app/testeventdev: add order test setup and destroy
order test has the queue and all types queue variants. Introduce
test_order_common* to share the common code between those tests.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:06 +0000 (10:23 +0530)]
app/testeventdev: add signal handler
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:05 +0000 (10:23 +0530)]
app/testeventdev: invoke the test ops
This patch retrieves the test ops from the given test case name and
invokes the registered test ops callbacks in order and
print the test result.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Guduri Prathyusha [Tue, 4 Jul 2017 04:53:04 +0000 (10:23 +0530)]
app/testeventdev: update options through command line
Add an infrastructure for updating the options through
application specific command line arguments.
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:03 +0000 (10:23 +0530)]
app/testeventdev: add helper functions to dump options
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:02 +0000 (10:23 +0530)]
app/testeventdev: add helper functions to check options
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:01 +0000 (10:23 +0530)]
app/testeventdev: define the test options
Define the test options that used across all test cases and
fill the default values for the same.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:53:00 +0000 (10:23 +0530)]
app/testeventdev: add common helper functions
adding common helper functions that used in test framework and
in all the test cases.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Guduri Prathyusha [Tue, 4 Jul 2017 04:52:59 +0000 (10:22 +0530)]
app/testeventdev: add string parsing helpers
Add a couple of help functions that will allow parsing many types of
input parameters, i.e.: bool, 16, 32, 64 bits, hex and list of cores etc.
Derived from examples/ip_pipeline/parser.h
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:52:58 +0000 (10:22 +0530)]
app/testeventdev: add registration framework
adding routines to register and retrieve eventdev test cases.
The RTE_INIT based constructor approach has been taken to simplify the test
case registration.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:52:57 +0000 (10:22 +0530)]
app/testeventdev: define test ops
In order to extend the test framework to realize different use cases,
The ops with function pointer callback scheme has been chosen.
This patch defines the callbacks for each test case.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Jul 2017 04:52:56 +0000 (10:22 +0530)]
app/testeventdev: introduce dpdk-test-eventdev app
The dpdk-test-eventdev tool is a Data Plane Development Kit (DPDK)
application that allows exercising various eventdev use cases. This
application has a generic framework to add new eventdev based test cases
to verify functionality and measure the performance parameters of DPDK
eventdev devices.
This patch adds the skeleton of the dpdk-test-eventdev application.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Harry van Haaren [Thu, 6 Jul 2017 14:35:16 +0000 (15:35 +0100)]
doc: add eventdev library to programmers guide
This commit adds an entry in the programmers guide
explaining the eventdev library.
The rte_event struct, queues and ports are explained.
An API walktrough of a simple two stage atomic pipeline
provides the reader with a step by step overview of the
expected usage of the Eventdev API.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Harry van Haaren [Thu, 6 Jul 2017 14:35:15 +0000 (15:35 +0100)]
doc: add SW eventdev pipeline to sample app guide
Add a new entry in the sample app user-guides,
which details the working of the eventdev_pipeline_sw.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Harry van Haaren [Thu, 6 Jul 2017 14:35:14 +0000 (15:35 +0100)]
examples/eventdev_pipeline_sw_pmd: add sample app
This commit adds a sample app for the eventdev library.
The app has been tested with DPDK 17.05-rc2, hence this
release (or later) is recommended.
The sample app showcases a pipeline processing use-case,
with event scheduling and processing defined per stage.
The application receives traffic as normal, with each
packet traversing the pipeline. Once the packet has
been processed by each of the pipeline stages, it is
transmitted again.
The app provides a framework to utilize cores for a single
role or multiple roles. Examples of roles are the RX core,
TX core, Scheduling core (in the case of the event/sw PMD),
and worker cores.
Various flags are available to configure numbers of stages,
cycles of work at each stage, type of scheduling, number of
worker cores, queue depths etc. For a full explaination,
please refer to the documentation.
Signed-off-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Bruce Richardson [Fri, 30 Jun 2017 15:06:21 +0000 (16:06 +0100)]
event/sw: change worker rings to standard event rings
Now that we have a standard event ring implementation for passing events
core-to-core, use that in place of the custom event rings in the software
eventdev.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Bruce Richardson [Fri, 30 Jun 2017 15:06:20 +0000 (16:06 +0100)]
test/eventdev: add auto-tests for event ring functions
Add some basic tests for the event ring functions. Not everything needs
testing as there is so much code re-use from the rte_ring code.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Bruce Richardson [Fri, 30 Jun 2017 15:06:19 +0000 (16:06 +0100)]
eventdev: add ring structure for events
Add in a new rte_event_ring structure type and functions to allow events to
be passed core to core. This is needed because the standard rte_ring type
only works on pointers, while for events, we want to copy the entire, 16B
events themselves - not just pointers to them. The code makes extensive use
of the functions already defined in rte_ring.h
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Bruce Richardson [Fri, 30 Jun 2017 15:06:18 +0000 (16:06 +0100)]
test/ring: add unit tests for exact size rings
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Bruce Richardson [Fri, 30 Jun 2017 15:06:17 +0000 (16:06 +0100)]
ring: allow non power-of-2 sizes
The rte_rings traditionally have only supported having ring sizes as powers
of 2, with the actual usable space being the size - 1. In some cases, for
example, with an eventdev where we want to precisely control queue depths
for latency, we need to allow ring sizes which are not powers of two so we
add in an additional ring capacity value to allow that. For existing rings,
this value will be size-1, i.e. the same as the mask, but if the new
EXACT_SZ flag is passed on ring creation, the ring will have exactly the
usable space requested, although the underlying memory size may be bigger.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Jerin Jacob [Thu, 29 Jun 2017 14:19:56 +0000 (19:49 +0530)]
event/octeontx: add enqueue fwd op variant
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Thu, 29 Jun 2017 14:19:55 +0000 (19:49 +0530)]
event/octeontx: add enqueue new op variant
OCTEONTX can have optimized handling of events if the PMD
knows it is a producer pattern in advance and it can support
burst mode if all the events has op == RTE_EVENT_OP_NEW.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Thu, 29 Jun 2017 14:19:54 +0000 (19:49 +0530)]
eventdev: introduce specialized enqueue forward op variant
Introducing the rte_event_enqueue_new_burst() for enabling the
PMD, an optimization opportunity to optimize if all the events in
the enqueue burst has the op type of RTE_EVENT_OP_FORWARD.
If a PMD does not have any optimization opportunity
for this operation then the PMD can choose the generic enqueue
burst PMD callback as the fallback.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Thu, 29 Jun 2017 14:19:53 +0000 (19:49 +0530)]
eventdev: introduce specialized enqueue new op variant
Introducing the rte_event_enqueue_new_burst() for enabling the
PMD, an optimization opportunity to optimize if all the events in
the enqueue burst has the op type of RTE_EVENT_OP_NEW.
If a PMD does not have any optimization opportunity
for this operation then the PMD can choose the generic enqueue
burst PMD callback as the fallback.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Thu, 29 Jun 2017 14:19:52 +0000 (19:49 +0530)]
eventdev: introduce helper function for enqueue burst
Introducing a helper function to avoid duplicating
common enqueue burst code when introducing
enqueue burst variants.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Nipun Gupta [Fri, 30 Jun 2017 08:54:35 +0000 (14:24 +0530)]
doc: add NXP DPAA2 eventdev guide
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Nipun Gupta [Fri, 30 Jun 2017 08:54:34 +0000 (14:24 +0530)]
event/dpaa2: handle timeout using interrupts in dequeue
This patch adds support for interrupt handling on the event port.
These interrupts facilitates managing of timeout ticks in the
event dequeue functions.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Nipun Gupta [Fri, 30 Jun 2017 08:54:33 +0000 (14:24 +0530)]
bus/fslmc: enable portal interrupt handling
Eventdev requires portal interrupts to handle timeout in the
event dequeue. This patch provides mechanism to enable the
portal interrupts.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Nipun Gupta [Fri, 30 Jun 2017 08:54:32 +0000 (14:24 +0530)]
bus/fslmc: add interrupt enabling routine
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Nipun Gupta [Fri, 30 Jun 2017 08:54:31 +0000 (14:24 +0530)]
event/dpaa2: add enqueue and dequeue functionality
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Nipun Gupta [Fri, 30 Jun 2017 08:54:30 +0000 (14:24 +0530)]
bus/fslmc: change argument to const to avoid warning
qbman_get_dqrr_idx() API is required with constant dqrr entry
in the eventdev driver. Also, this routine is not updating the
dqrr. So, this patch updates its input argument to a const type.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Nipun Gupta [Fri, 30 Jun 2017 08:54:29 +0000 (14:24 +0530)]
bus/fslmc: add callback per queue to enable
Dequeue from event device needs to process the event on
the basis of the hardware queue from which it is dequeued.
A callback is added into dpaa2_queue structure, to enable
event dequeue functionality to call that processing routine.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Nipun Gupta [Fri, 30 Jun 2017 08:54:28 +0000 (14:24 +0530)]
bus/fslmc: support enqueue with multiple descriptors
This patch adds the QBMAN API which support multiple enqueue
descriptors.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Nipun Gupta [Fri, 30 Jun 2017 08:54:27 +0000 (14:24 +0530)]
event/dpaa2: add configuration functions
This patch adds all the configuration API's for DPAA2 eventdev
including device config, start, stop & port and queue
related API's
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Nipun Gupta [Fri, 30 Jun 2017 08:54:26 +0000 (14:24 +0530)]
bus/fslmc: support static dequeue from portal
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Nipun Gupta [Fri, 30 Jun 2017 08:54:25 +0000 (14:24 +0530)]
event/dpaa2: initialize device
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Nipun Gupta [Fri, 30 Jun 2017 08:54:24 +0000 (14:24 +0530)]
bus/fslmc: adding cpu support in stashing config
Stashing can also be configured by other drivers (for instance
event driver) passing cpu_id as an argument. This change
facilitates the same.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Nipun Gupta [Fri, 30 Jun 2017 08:54:23 +0000 (14:24 +0530)]
bus/fslmc: register dpci as dpaa2 device for bus scan
Registering dpci as dpaa2 type device handling initialization,
allocation and freeing of the device
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Nipun Gupta [Fri, 30 Jun 2017 08:54:22 +0000 (14:24 +0530)]
bus/fslmc: adding basic dpci support
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Nipun Gupta [Fri, 30 Jun 2017 08:54:21 +0000 (14:24 +0530)]
event/dpaa2: register dpcon as dpaa2 device for bus scan
Registering dpcon as dpaa2 type device handling initialization,
allocation and freeing of the device
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Hemant Agrawal [Fri, 30 Jun 2017 08:54:20 +0000 (14:24 +0530)]
bus/fslmc: export qbman dqrr funcs for eventdev usages
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Nipun Gupta [Fri, 30 Jun 2017 08:54:19 +0000 (14:24 +0530)]
bus/fslmc: add basic dpcon support
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Nipun Gupta [Fri, 30 Jun 2017 08:54:18 +0000 (14:24 +0530)]
bus/fslmc: integrate dpio and dpbp to object framework
This patch removes the existing static call for dpio and dpbp
create and add them to object registration framework.
This patch also changes the vfio mc object processing to use
the framework.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Hemant Agrawal [Fri, 30 Jun 2017 08:54:17 +0000 (14:24 +0530)]
bus/fslmc: generic framework for mc object creation
There are muliple help mc object, which are not an independent
device, but they are required for dpaa2 based devices.
This framework allows registration and handling of all such
mc devices.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Nipun Gupta [Fri, 30 Jun 2017 08:54:16 +0000 (14:24 +0530)]
event/dpaa2: add basic build infrastructure
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Hemant Agrawal [Fri, 30 Jun 2017 08:54:15 +0000 (14:24 +0530)]
drivers: add bus dependency for eventdev
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Kirill Rybalchenko [Wed, 14 Jun 2017 08:44:33 +0000 (09:44 +0100)]
app/crypto-perf: wait for cores launched by app
After test is finished the main thread waits only for lcores
where runners were started because, in case of using the
multicore scheduler, more cores are launched that do not need
to be waited for.
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fiona Trahe [Mon, 3 Jul 2017 15:24:27 +0000 (16:24 +0100)]
crypto/qat: fix possible out-of-bounds
Out-of-bounds access possible if ctx.qat_cipher_alg has invalid value.
This should never happen at this point on data path, but fix for safety.
Coverity issue: 143458, 143465
Fixes:
d18ab45f7654 ("crypto/qat: support DOCSIS BPI mode")
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Pablo de Lara [Wed, 5 Jul 2017 05:26:20 +0000 (06:26 +0100)]
doc: add new crypto session information
Modified cryptodev library section in Programmer's Guide,
with the recent changes in the crypto sessions.
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: John McNamara <john.mcnamara@intel.com>