dpdk.git
6 years agodoc: update mrvl crypto guide
Tomasz Duszynski [Tue, 9 Jan 2018 09:08:48 +0000 (10:08 +0100)]
doc: update mrvl crypto guide

Update MRVL CRYPTO PMD documentation.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
6 years agocrypto/aesni_mb: support AES-CCM
Fan Zhang [Tue, 19 Dec 2017 15:34:30 +0000 (15:34 +0000)]
crypto/aesni_mb: support AES-CCM

Add support to AES-CCM, for 128-bit keys.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agosecurity: fix enum start value
Akhil Goyal [Wed, 13 Dec 2017 07:15:08 +0000 (12:45 +0530)]
security: fix enum start value

enum should be initialized with 1 so that unitialized(memset)
memory may not be treated as a valid enum value.

Fixes: c261d1431bd8 ("security: introduce security API and framework")
Cc: stable@dpdk.org
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
6 years agosecurity: fix pedantic compilation
Nélio Laranjeiro [Thu, 23 Nov 2017 10:02:39 +0000 (11:02 +0100)]
security: fix pedantic compilation

/x86_64-native-linuxapp-gcc/include/rte_security.h:229:8:
error: struct has no members [-Werror=pedantic]
  struct rte_security_macsec_xform {
         ^~~~~~~~~~~~~~~~~~~~~~~~~
/x86_64-native-linuxapp-gcc/include/rte_security.h:453:3:
error: struct has no members [-Werror=pedantic]
    struct {
    ^~~~~~

Fixes: c261d1431bd8 ("security: introduce security API and framework")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
6 years agocrypto: fix pedantic compilation
Nélio Laranjeiro [Thu, 23 Nov 2017 10:02:38 +0000 (11:02 +0100)]
crypto: fix pedantic compilation

/x86_64-native-linuxapp-gcc/include/rte_crypto.h:126:28:
error: ISO C forbids zero-size array ‘sym’ [-Werror=pedantic]
   struct rte_crypto_sym_op sym[0];
                            ^~~
Zero-size array is an extension to the language it cannot be replaced by a
empty size array i.e. [] because structure is inside a union.

Fixes: d2a4223c4c6d ("cryptodev: do not store pointer to op specific params")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agosecurity: fix device operation type
Nélio Laranjeiro [Thu, 23 Nov 2017 10:02:37 +0000 (11:02 +0100)]
security: fix device operation type

Device operation pointers should be constant to avoid any modification
while it is in use.

Fixes: c261d1431bd8 ("security: introduce security API and framework")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
6 years agodoc: update IPSec Multi-buffer lib versioning
Pablo de Lara [Tue, 19 Dec 2017 09:27:55 +0000 (09:27 +0000)]
doc: update IPSec Multi-buffer lib versioning

IPSec Multi-buffer library v0.48 has been released,
which includes, among other features, support for AES-CCM.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
6 years agoexamples/ipsec-secgw: fix usage of incorrect port
Anoob Joseph [Tue, 12 Dec 2017 08:32:25 +0000 (08:32 +0000)]
examples/ipsec-secgw: fix usage of incorrect port

When security offload is enabled, the packet should be forwarded on the
port configured in the SA. Security session will be configured on that
port only, and sending the packet on other ports could result in
unencrypted packets being sent out.

This would have performance improvements too, as the per packet LPM
lookup would be avoided for IPsec packets, in inline mode.

Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload")

Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
6 years agotest/crypto: fix missing include
Jerin Jacob [Tue, 28 Nov 2017 12:50:59 +0000 (18:20 +0530)]
test/crypto: fix missing include

time() is defined in time.h

Fixes: ffbe3be0d4 ("app/test: add libcrypto")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agocryptodev: extend sym session doxygen info
Billy O'Mahony [Mon, 27 Nov 2017 11:40:28 +0000 (11:40 +0000)]
cryptodev: extend sym session doxygen info

Signed-off-by: Billy O'Mahony <billy.o.mahony@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
6 years agodoc: fix typo in QAT quide
Billy O'Mahony [Mon, 27 Nov 2017 11:13:36 +0000 (11:13 +0000)]
doc: fix typo in QAT quide

Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices")
Cc: stable@dpdk.org
Signed-off-by: Billy O'Mahony <billy.o.mahony@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agodoc: fix format in OpenSSL installation guide
Andrea Grandi [Wed, 22 Nov 2017 18:03:12 +0000 (10:03 -0800)]
doc: fix format in OpenSSL installation guide

List of supported OpenSSL versions and code block with dependencies were
not properly formatted.

Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")
Cc: stable@dpdk.org
Signed-off-by: Andrea Grandi <andrea.grandi@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agodoc: fix lists of supported crypto algorithms
Andrea Grandi [Wed, 22 Nov 2017 18:03:11 +0000 (10:03 -0800)]
doc: fix lists of supported crypto algorithms

Add a missing space must before the first item of the list to display it
correctly in the User Guide.

Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")
Fixes: b79e4c00af0e ("cryptodev: use AES-GCM/CCM as AEAD algorithms")
Cc: stable@dpdk.org
Signed-off-by: Andrea Grandi <andrea.grandi@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agoeal: improve likely and unlikely macros
Aleksey Baulin [Sun, 19 Nov 2017 22:16:04 +0000 (01:16 +0300)]
eal: improve likely and unlikely macros

A warning is issued when using an argument to likely() or unlikely()
builtins which is evaluated to a pointer value, as __builtin_expect()
expects a 'long int' type for its first argument. With this fix
a pointer value is converted to an integer with the value of 0 or 1.

Signed-off-by: Aleksey Baulin <aleksey.baulin@gmail.com>
6 years agoeal/arm64: optimize memcpy
Herbert Guan [Fri, 19 Jan 2018 06:10:36 +0000 (14:10 +0800)]
eal/arm64: optimize memcpy

This patch provides an option to do rte_memcpy() using 'restrict'
qualifier, which can induce GCC to do optimizations by using more
efficient instructions, providing some performance gain over memcpy()
on some ARM64 platforms/enviroments.

The memory copy performance differs between different ARM64
platforms. And a more recent glibc (e.g. 2.23 or later)
can provide a better memcpy() performance compared to old glibc
versions. It's always suggested to use a more recent glibc if
possible, from which the entire system can get benefit. If for some
reason an old glibc has to be used, this patch is provided for an
alternative.

This implementation can improve memory copy on some ARM64
platforms, when an old glibc (e.g. 2.19, 2.17...) is being used.
It is disabled by default and needs "RTE_ARCH_ARM64_MEMCPY"
defined to activate. It's not always proving better performance
than memcpy() so users need to run DPDK unit test
"memcpy_perf_autotest" and customize parameters in "customization
section" in rte_memcpy_64.h for best performance.

Compiler version will also impact the rte_memcpy() performance.
It's observed on some platforms and with the same code, GCC 7.2.0
compiled binary can provide better performance than GCC 4.8.5. It's
suggested to use GCC 5.4.0 or later.

Signed-off-by: Herbert Guan <herbert.guan@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agobus/pci: forbid IOVA mode if IOMMU address width too small
Maxime Coquelin [Fri, 12 Jan 2018 10:22:20 +0000 (11:22 +0100)]
bus/pci: forbid IOVA mode if IOMMU address width too small

Intel VT-d supports different address widths for the IOVAs, from
39 bits to 56 bits.

While recent processors support at least 48 bits, VT-d emulation
currently only supports 39 bits. It makes DMA mapping to fail in this
case when using VA as IOVA mode, as user-space virtual addresses uses
up to 47 bits (see kernel's Documentation/x86/x86_64/mm.txt).

This patch parses VT-d CAP register value available in sysfs, and
forbid VA as IOVA mode if the GAW is 39 bits or unknown.

Fixes: f37dfab21c98 ("drivers/net: enable IOVA mode for Intel PMDs")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Chas Williams <chas3@att.com>
6 years agovfio: improve noiommu check error handling
Jonas Pfefferle [Tue, 31 Oct 2017 15:59:46 +0000 (16:59 +0100)]
vfio: improve noiommu check error handling

Kernels v4.4 and earlier does have vfio, but not
the noiommu mode, so the file does not exist.

Check and report errors on open/read in noiommu check.

Signed-off-by: Jonas Pfefferle <jpf@zurich.ibm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agohash: select fbk function at run-time
Elza Mathew [Mon, 6 Nov 2017 18:04:49 +0000 (10:04 -0800)]
hash: select fbk function at run-time

Compile-time function selection can potentially lead to
lower performance on generic builds done by distros.
Replaced compile time flag checks with run-time function
selection.

Signed-off-by: Elza Mathew <elza.mathew@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agohash: select cuckoo function at run-time
Elza Mathew [Mon, 6 Nov 2017 18:04:02 +0000 (10:04 -0800)]
hash: select cuckoo function at run-time

Compile-time function selection can potentially lead to
lower performance on generic builds done by distros.
Replaced compile time flag checks with run-time function
selection.

Signed-off-by: Elza Mathew <elza.mathew@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agomaintainers: update for ipsec-secgw
Akhil Goyal [Thu, 18 Jan 2018 11:20:47 +0000 (16:50 +0530)]
maintainers: update for ipsec-secgw

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agoevent/dpaa2: return correct number of event ports
Nipun Gupta [Wed, 3 Jan 2018 16:44:19 +0000 (22:14 +0530)]
event/dpaa2: return correct number of event ports

In the info get API we were returning number of event
ports as MAX number of LCORE's. After this change actual
number of event ports (i.e. number of DPIO's) is provided
in the info get API.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agodoc: add DPAA eventdev guide
Sunil Kumar Kori [Tue, 16 Jan 2018 20:44:03 +0000 (02:14 +0530)]
doc: add DPAA eventdev guide

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agoevent/dpaa: add enqueue/dequeue
Sunil Kumar Kori [Tue, 16 Jan 2018 20:44:02 +0000 (02:14 +0530)]
event/dpaa: add enqueue/dequeue

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agoevent/dpaa: add eth Rx adapter queue config
Sunil Kumar Kori [Tue, 16 Jan 2018 20:44:01 +0000 (02:14 +0530)]
event/dpaa: add eth Rx adapter queue config

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agoevent/dpaa: add port config get/set
Sunil Kumar Kori [Tue, 16 Jan 2018 20:44:00 +0000 (02:14 +0530)]
event/dpaa: add port config get/set

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agoevent/dpaa: add queue config get/set
Sunil Kumar Kori [Tue, 16 Jan 2018 20:43:59 +0000 (02:13 +0530)]
event/dpaa: add queue config get/set

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agoevent/dpaa: introduce PMD
Sunil Kumar Kori [Tue, 16 Jan 2018 20:43:58 +0000 (02:13 +0530)]
event/dpaa: introduce PMD

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/dpaa: support Rx queue configurations with eventdev
Sunil Kumar Kori [Tue, 16 Jan 2018 20:43:57 +0000 (02:13 +0530)]
net/dpaa: support Rx queue configurations with eventdev

Given ethernet Rx queues can be attached with event queue in
parallel or atomic mode. Patch imlmplements Rx queue
configuration, attachment/detachment with given event queue and their
corresponding callbacks to handle events from respective queues.

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agobus/dpaa: support dynamic logging
Sunil Kumar Kori [Tue, 16 Jan 2018 20:43:56 +0000 (02:13 +0530)]
bus/dpaa: support dynamic logging

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agobus/dpaa: support event dequeue and consumption
Sunil Kumar Kori [Tue, 16 Jan 2018 20:43:55 +0000 (02:13 +0530)]
bus/dpaa: support event dequeue and consumption

To receive events from given event port, corresponding
function needs to be added which receives events
from portal. Also added function to consume received
events based on entry index.

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agoconfig: enable compilation of DPAA eventdev PMD
Sunil Kumar Kori [Tue, 16 Jan 2018 20:43:54 +0000 (02:13 +0530)]
config: enable compilation of DPAA eventdev PMD

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/dpaa2: support atomic queues
Nipun Gupta [Wed, 17 Jan 2018 11:39:14 +0000 (17:09 +0530)]
net/dpaa2: support atomic queues

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agobus/fslmc: add flag to configure DCA in QBMAN multi Tx
Nipun Gupta [Wed, 17 Jan 2018 11:39:13 +0000 (17:09 +0530)]
bus/fslmc: add flag to configure DCA in QBMAN multi Tx

With the current QBMAN multi-tx API, we need to create separate
enqueue descriptors for each of the packet which is required to
be enqueued to the hardware, once we support Atomic Queues
(with DCA) in dpaa2 drivers. Creating enqueue descriptor for
each packet is costly and have significant performance impact.
This patch introduces a flag parameter in the QBMAN multi-tx API,
so that DCA configuration (and later on ORP/ODP for ordered queues)
can be passed using flags and be updated in the EQCR using this flag.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agoevent/dpaa2: have separate structure to hold dqrr entries
Nipun Gupta [Wed, 17 Jan 2018 11:39:12 +0000 (17:09 +0530)]
event/dpaa2: have separate structure to hold dqrr entries

This patch provides cleaner approach to store the DQRR entries,
which are yet to be consumed in case of atomic queues.

Also, this patch changes the storage of the DQRR entry index
into the mbuf->seqn instead of ev->opaque

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agoevent/dpaa2: use dqrr index to consume the DQRR entry
Nipun Gupta [Wed, 17 Jan 2018 11:39:11 +0000 (17:09 +0530)]
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>
6 years agobus/fslmc: introduce API to consume dqrr using index
Nipun Gupta [Wed, 17 Jan 2018 11:39:10 +0000 (17:09 +0530)]
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>
6 years agoevent/dpaa2: replace static with dynamic logging
Nipun Gupta [Wed, 17 Jan 2018 11:39:09 +0000 (17:09 +0530)]
event/dpaa2: replace static with dynamic logging

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agodoc: add eventdev apps changes in release notes
Pavan Nikhilesh [Tue, 16 Jan 2018 17:46:07 +0000 (23:16 +0530)]
doc: add eventdev apps changes in release notes

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agodoc: add pipeline atq test in testeventdev guide
Pavan Nikhilesh [Tue, 16 Jan 2018 17:46:06 +0000 (23:16 +0530)]
doc: add pipeline atq test in testeventdev guide

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agodoc: add pipeline queue test in testeventdev guide
Pavan Nikhilesh [Tue, 16 Jan 2018 17:46:05 +0000 (23:16 +0530)]
doc: add pipeline queue test in testeventdev guide

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agoapp/eventdev: add pipeline atq worker functions
Pavan Nikhilesh [Tue, 16 Jan 2018 17:46:04 +0000 (23:16 +0530)]
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>
6 years agoapp/eventdev: add pipeline atq test
Pavan Nikhilesh [Tue, 16 Jan 2018 17:46:03 +0000 (23:16 +0530)]
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>
6 years agoapp/eventdev: add pipeline queue worker functions
Pavan Nikhilesh [Tue, 16 Jan 2018 17:46:02 +0000 (23:16 +0530)]
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>
6 years agoapp/eventdev: add pipeline queue test
Pavan Nikhilesh [Tue, 16 Jan 2018 17:46:01 +0000 (23:16 +0530)]
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>
6 years agoapp/eventdev: launch pipeline lcores
Pavan Nikhilesh [Tue, 16 Jan 2018 17:46:00 +0000 (23:16 +0530)]
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>
6 years agoapp/eventdev: add Tx service setup
Pavan Nikhilesh [Tue, 16 Jan 2018 17:45:59 +0000 (23:15 +0530)]
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>
6 years agoapp/eventdev: add event port and Rx adapter setup
Pavan Nikhilesh [Tue, 16 Jan 2018 17:45:58 +0000 (23:15 +0530)]
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>
6 years agoapp/eventdev: add pipeline ethport setup and destroy
Pavan Nikhilesh [Tue, 16 Jan 2018 17:45:57 +0000 (23:15 +0530)]
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>
6 years agoapp/eventdev: add pipeline opt dump and check functions
Pavan Nikhilesh [Tue, 16 Jan 2018 17:45:56 +0000 (23:15 +0530)]
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>
6 years agoapp/eventdev: add mempool setup and destroy
Pavan Nikhilesh [Tue, 16 Jan 2018 17:45:55 +0000 (23:15 +0530)]
app/eventdev: add mempool setup and destroy

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agoapp/eventdev: add pipeline test setup and destroy
Pavan Nikhilesh [Tue, 16 Jan 2018 17:45:54 +0000 (23:15 +0530)]
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>
6 years agoapp/eventdev: add packet distribution logs
Pavan Nikhilesh [Tue, 16 Jan 2018 17:45:53 +0000 (23:15 +0530)]
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>
6 years agoexamples/eventdev: rename example
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:12 +0000 (16:40 +0530)]
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>
6 years agoexamples/eventdev: add mempool size configuration
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:11 +0000 (16:40 +0530)]
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>
6 years agoexamples/eventdev: add atq single stage pipeline worker
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:10 +0000 (16:40 +0530)]
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>
6 years agoexamples/eventdev: add single stage pipeline worker
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:09 +0000 (16:40 +0530)]
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>
6 years agoexamples/eventdev: add all type queue option
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:08 +0000 (16:40 +0530)]
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>
6 years agoexamples/eventdev: add burst for thread safe pipeline
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:07 +0000 (16:40 +0530)]
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>
6 years agoexamples/eventdev: add thread safe Tx worker pipeline
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:06 +0000 (16:40 +0530)]
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>
6 years agoexamples/eventdev: modify work cycles
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:05 +0000 (16:40 +0530)]
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>
6 years agoexamples/eventdev: add non burst mode generic worker
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:04 +0000 (16:40 +0530)]
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>
6 years agoexamples/eventdev: add ops to check cmdline args
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:03 +0000 (16:40 +0530)]
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>
6 years agoexamples/eventdev: add generic worker pipeline
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:02 +0000 (16:40 +0530)]
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>
6 years agoexamples/eventdev: add framework for caps based pipeline
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:01 +0000 (16:40 +0530)]
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>
6 years agoexamples/eventdev: move common data into pipeline common
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:00 +0000 (16:40 +0530)]
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>
6 years agoexamples/eventdev: support Rx adapter
Pavan Nikhilesh [Wed, 10 Jan 2018 11:09:59 +0000 (16:39 +0530)]
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>
6 years agotest/event: register selftests
Pavan Nikhilesh [Thu, 11 Jan 2018 10:21:55 +0000 (15:51 +0530)]
test/event: register selftests

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agoevent/sw: update selftest ops
Pavan Nikhilesh [Thu, 11 Jan 2018 10:21:54 +0000 (15:51 +0530)]
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>
6 years agoevent/sw: make test standalone
Pavan Nikhilesh [Thu, 11 Jan 2018 10:21:53 +0000 (15:51 +0530)]
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>
6 years agoevent/sw: move test to driver
Pavan Nikhilesh [Thu, 11 Jan 2018 10:21:52 +0000 (15:51 +0530)]
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>
6 years agoevent/octeontx: add selftest to device arguments
Pavan Nikhilesh [Thu, 11 Jan 2018 10:21:51 +0000 (15:51 +0530)]
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>
6 years agoevent/octeontx: update selftest ops
Pavan Nikhilesh [Thu, 11 Jan 2018 10:21:50 +0000 (15:51 +0530)]
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>
6 years agoevent/octeontx: make test standalone
Pavan Nikhilesh [Thu, 11 Jan 2018 10:21:49 +0000 (15:51 +0530)]
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>
6 years agoevent/octeontx: move test to driver
Pavan Nikhilesh [Thu, 11 Jan 2018 10:21:48 +0000 (15:51 +0530)]
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>
6 years agoeventdev: add API to perform self test
Pavan Nikhilesh [Thu, 11 Jan 2018 10:21:47 +0000 (15:51 +0530)]
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>
6 years agoeal: add test assert macros
Pavan Nikhilesh [Thu, 11 Jan 2018 10:21:46 +0000 (15:51 +0530)]
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>
6 years agoapp/eventdev: fix event device queue count
Pavan Nikhilesh [Thu, 28 Dec 2017 10:56:53 +0000 (16:26 +0530)]
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: 20eb154e0435 ("app/testeventdev: add perf queue test")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agoevent/sw: remove stale IQ references when reconfigured
Gage Eads [Tue, 9 Jan 2018 16:19:35 +0000 (10:19 -0600)]
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: dca926ca9faa ("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>
6 years agodoc: add eventdev OPDL PMD guide
Liang Ma [Tue, 9 Jan 2018 14:19:01 +0000 (14:19 +0000)]
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>
6 years agoevent/sw: apply new capability flags
Liang Ma [Tue, 9 Jan 2018 14:18:59 +0000 (14:18 +0000)]
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>
6 years agoevent/octeontx: apply new capability flags
Liang Ma [Tue, 9 Jan 2018 14:18:58 +0000 (14:18 +0000)]
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>
6 years agoevent/dpaa2: apply new capability flags
Liang Ma [Tue, 9 Jan 2018 14:18:57 +0000 (14:18 +0000)]
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>
6 years agoeventdev: extend capability flags
Liang Ma [Tue, 9 Jan 2018 14:18:56 +0000 (14:18 +0000)]
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>
6 years agoevent/opdl: add unit tests
Liang Ma [Tue, 9 Jan 2018 14:18:55 +0000 (14:18 +0000)]
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>
6 years agoevent/opdl: add enqueue/dequeue
Liang Ma [Tue, 9 Jan 2018 14:18:54 +0000 (14:18 +0000)]
event/opdl: add enqueue/dequeue

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
6 years agoevent/opdl: add event port config get/set
Liang Ma [Tue, 9 Jan 2018 14:18:53 +0000 (14:18 +0000)]
event/opdl: add event port config get/set

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
6 years agoevent/opdl: add event queue config get/set
Liang Ma [Tue, 9 Jan 2018 14:18:52 +0000 (14:18 +0000)]
event/opdl: add event queue config get/set

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
6 years agoevent/opdl: add PMD main body and helper function
Liang Ma [Tue, 9 Jan 2018 14:18:51 +0000 (14:18 +0000)]
event/opdl: add PMD main body and helper function

This commit adds a OPDL implementation of the eventdev API. The
implementation here is intended to enable the community to use
the OPDL infrastructure under eventdev API.

The main components of the implementation is three files:
  - opdl_evdev.c              Creation, configuration, etc
  - opdl_evdev_xstats.c       helper function to support stats collection
  - opdl_evdev.h              include the main data structure of opdl
                              device and all the function prototype
                              need to be exposed to support eventdev API.

  - opdl_evdev_init.c         implement all initailization helper function

This commit only adds the implementation, no existing DPDK files
are modified.

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
6 years agoevent/opdl: add OPDL ring infrastructure library
Liang Ma [Tue, 9 Jan 2018 14:18:50 +0000 (14:18 +0000)]
event/opdl: add OPDL ring infrastructure library

OPDL ring is the core infrastructure of OPDL PMD. OPDL ring library
provide the core data structure and core helper function set. The Ring
implements a single ring multi-port/stage pipelined packet distribution
mechanism. This mechanism has the following characteristics:

• No multiple queue cost, therefore, latency is significant reduced.
• Fixed dependencies between queue/ports is more suitable for complex.
  fixed pipelines of stateless packet processing (static pipeline).
• Has decentralized distribution (no scheduling core).
• Packets remain in order (no reorder core(s)).
* Update build system to enable compilation.

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
Reviewed-by: Seán Harte <seanbh@gmail.com>
6 years agoapp/eventdev: add service core configuration
Pavan Nikhilesh [Mon, 11 Dec 2017 15:13:45 +0000 (20:43 +0530)]
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>
6 years agoapp/eventdev: add event Rx adapter setup
Pavan Nikhilesh [Mon, 11 Dec 2017 15:13:44 +0000 (20:43 +0530)]
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>
6 years agoapp/eventdev: add ethernet device tear down
Pavan Nikhilesh [Mon, 11 Dec 2017 15:13:43 +0000 (20:43 +0530)]
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>
6 years agoapp/eventdev: add ethernet device setup helpers
Pavan Nikhilesh [Mon, 11 Dec 2017 15:13:42 +0000 (20:43 +0530)]
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>
6 years agoapp/eventdev: add pktmbuf pool for ethdev
Pavan Nikhilesh [Mon, 11 Dec 2017 15:13:41 +0000 (20:43 +0530)]
app/eventdev: add pktmbuf pool for ethdev

Add pktmbuf pool creation used when configuring ethernet device as event
producer.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agoapp/eventdev: modify setup to support ethdev
Pavan Nikhilesh [Mon, 11 Dec 2017 15:13:40 +0000 (20:43 +0530)]
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>
6 years agoapp/eventdev: add ethernet device producer option
Pavan Nikhilesh [Mon, 11 Dec 2017 15:13:39 +0000 (20:43 +0530)]
app/eventdev: add ethernet device producer option

Add command line option --prod_type_ethdev to specify that the events
are generated by ethernet device.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agoeventdev: use links map to unlink queues
Pavan Nikhilesh [Tue, 12 Dec 2017 18:58:09 +0000 (00:28 +0530)]
eventdev: use links map to unlink queues

The octeontx event device doesn't store the queues to port mapping as a
result it cannot return the exact number of queues unlinked from a port
when application wants to unlink all the queues mapped (supplies queues
param as NULL).

Using links_map we can determine the exact queues mapped to a specific
port and unlink them.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
6 years agoeventdev: fix doxygen comments
Pavan Nikhilesh [Sat, 9 Dec 2017 14:40:07 +0000 (20:10 +0530)]
eventdev: fix doxygen comments

Fix doxygen return values and indentation.

Fixes: 64103dbcd673 ("eventdev: add dev attribute get function")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
6 years agoevent/sw: simplify credit scheme
Gage Eads [Mon, 11 Dec 2017 17:56:32 +0000 (11:56 -0600)]
event/sw: simplify credit scheme

This commit modifies the sw PMD credit scheme such that credits are
consumed when enqueueing a NEW event and released when an event is
released -- typically, the beginning and end of a pipeline. Workers that
simply forward events do not interact with the credit pool.

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
6 years agoeventdev: add implicit release disable capability
Gage Eads [Mon, 11 Dec 2017 17:56:31 +0000 (11:56 -0600)]
eventdev: add implicit release disable capability

This commit introduces a capability for disabling the "implicit" release
functionality for a port, which prevents the eventdev PMD from issuing
outstanding releases for previously dequeued events when dequeuing a new
batch of events.

If a PMD does not support this capability, the application will receive an
error if it attempts to setup a port with implicit releases disabled.
Otherwise, if the port is configured with implicit releases disabled, the
application must release each dequeued event by invoking
rte_event_enqueue_burst() with RTE_EVENT_OP_RELEASE or
RTE_EVENT_OP_FORWARD.

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>