Commit Graph

14883 Commits

Author SHA1 Message Date
Nikhil Rao
a3bbf2e097 eventdev: add eth Tx adapter implementation
This patch implements the Tx adapter APIs by invoking the
corresponding eventdev PMD callbacks and also provides
the common rte_service function based implementation when
the eventdev PMD support is absent.

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
2018-10-01 16:51:13 +02:00
Nikhil Rao
c662a950f4 eventdev: add caps API and PMD callbacks for eth Tx adapter
The caps API allows the application to query if the transmit
stage is implemented in the eventdev PMD or uses the common
rte_service function. The PMD callbacks support the
eventdev PMD implementation of the adapter.

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:50:54 +02:00
Nikhil Rao
c9bf83947e eventdev: add eth Tx adapter APIs
The ethernet Tx adapter abstracts the transmit stage of an
event driven packet processing application. The transmit
stage may be implemented with eventdev PMD support or use a
rte_service function implemented in the adapter. These APIs
provide a common configuration and control interface and
an transmit API for the eventdev PMD implementation.

The transmit port is specified using mbuf::port. The transmit
queue is specified using the rte_event_eth_tx_adapter_txq_set()
function.

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:49:41 +02:00
Pavan Nikhilesh
6fe63a3d7c test/event: check burst mode capability
Enqueue, dequeue depths are only valid for event devs that have burst
mode capability. Check event dev capability before testing depth
boundary.

Fixes: f8f9d233ea ("test/eventdev: add unit tests")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:49:24 +02:00
Harry van Haaren
1638261a69 event/sw: add unit test for unlinks in progress
This commit adds a unit test that checks the behaviour
of the unlinks_in_progress() function, ensuring that the
returned values are the number of unlinks requested,
until the scheduler runs and "acks" the requests, after
which the count should be zero again.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-10-01 16:49:10 +02:00
Harry van Haaren
bd5ac24fea event/sw: implement unlinks in progress function
This commit adds a counter to each port, which counts the
number of unlinks that have been performed. When the scheduler
thread starts its scheduling routine, it "acks" all unlinks that
have been requested, and the application is gauranteed that no
more events will be scheduled to the port from the unlinked queue.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-10-01 16:48:57 +02:00
Harry van Haaren
e279bbe4b2 event: add function for reading unlink in progress
This commit introduces a new function in the eventdev API,
which allows applications to read the number of unlink requests
in progress on a particular port of an eventdev instance.

This information allows applications to verify when no more packets
from a particular queue (or any queue) will arrive at a port.
The application could decide to stop polling, or put the core into
a sleep state if it wishes, as it is ensured that no new packets
will arrive at a particular port anymore if all queues are unlinked.

Suggested-by: Matias Elo <matias.elo@nokia.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:48:38 +02:00
Harry van Haaren
733fc6ca0b event/sw: fix cq index check for unlink usecases
This commit fixes the cq index checks when unlinking
ports/queues while the scheduler core is running.
Previously, the == comparison could be "skipped" if
in particular corner cases. With the check being changed
to >= this is resolved as the cq idx gets reset to zero.

Bugzilla ID: 60
Fixes: 617995dfc5 ("event/sw: add scheduling logic")
Cc: stable@dpdk.org

Suggested-by: Matias Elo <matias.elo@nokia.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-10-01 16:48:24 +02:00
Nikhil Rao
97428d7b8e test/event: remove eth Rx adapter vdev workaround
eth Rx adapter has been updated to support hotplugged
devices, devices created after adapter creation can now be
added to the adapter.

Update the adapter_multi_eth_add_del
test case to create the adapter as part of test setup
instead of creating it after creating vdevs.

Fixes: 2a9c83ae3b ("test/eventdev: add multi-ports test")
Cc: stable@dpdk.org

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:48:11 +02:00
Nikhil Rao
d7b5f102c4 eventdev: fix eth Rx adapter hotplug incompatibility
Use RTE_MAX_ETHPORTS instead of rte_eth_dev_count_total()
when allocating eth Rx adapter's per-eth device data structure
to account for hotplugged devices.

Fixes: 9c38b704d2 ("eventdev: add eth Rx adapter implementation")
Cc: stable@dpdk.org

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:47:56 +02:00
Hemant Agrawal
4ab57b042e event/dpaa2: affine portal at runtime during I/O
This patch restructure the code to have the QBMAN portal
affliated at run time for per lcore basis.
The device cleanup is also improved.

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-10-01 16:47:41 +02:00
Hemant Agrawal
9943f56e35 event/dpaa2: support max event port value
dev_info->max_event_ports shall be number of available cores.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-10-01 16:47:27 +02:00
Hemant Agrawal
5d024f0f86 event/dpaa2: enchance timeout handling
This patch enhances:
1. Configure the dequeue time out value as per the given
method or per dequeue, global or default.
2. The timeout values were being mixed as ns or ms timeouts,
Now the values are stored as ns and scale is in ms.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-10-01 16:47:12 +02:00
Hemant Agrawal
047188552b event/dpaa2: rename info structure
This is to keep the dpaa2 driver aligned with dpaa driver.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-10-01 16:46:57 +02:00
Hemant Agrawal
be0c42bfa8 event/dpaa2: fix mbuf assignment in atomic processing
Fixes: 7b6edb640b ("event/dpaa2: have separate structure to hold dqrr entries")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-10-01 16:46:43 +02:00
Mattias Rönnblom
46ea5781be event/dsw: add documentation
The DSW event device is documented in DPDK Programmer's Guide.

The MAINTAINERS file and the 18.11 release notes are updated.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:46:30 +02:00
Mattias Rönnblom
f3c5899bb9 event/dsw: implement xstats counters
The DSW event device now implements the 'xstats' interface and a
number of port- and device-level counters.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
2018-10-01 16:46:17 +02:00
Mattias Rönnblom
4ba0dcaa42 event/dsw: sort events on dequeue
With this patch, the DSW event device will (optionally) sort the event
burst before giving it to the application. The sorting will primarily
be on queue id, and secondary on flow id.

The sorting is an attempt to optimize data and instruction cache usage
for the application, at the cost of additional event device overhead.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
2018-10-01 16:46:03 +02:00
Mattias Rönnblom
f6257b22e7 event/dsw: add load balancing
The DSW event device will now attempt to migrate (move) flows between
ports in order to balance the load.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
2018-10-01 16:45:50 +02:00
Mattias Rönnblom
2b7bc6a5b2 event/dsw: add port load measurements
The DSW event device port now attempts to estimate its load (i.e. how
busy it is). This is required for load balancing to work (although
load balancing is not included in this patch), and may also be useful
for debugging purposes.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
2018-10-01 16:45:37 +02:00
Mattias Rönnblom
1c8e3caa3b event/dsw: add event scheduling and device start/stop
With this patch, the DSW event device can be started and stopped,
and also supports scheduling events between ports.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:45:23 +02:00
Mattias Rönnblom
0cb8b0a03e event/dsw: support linking/unlinking ports
Added support for linking and unlinking ports to queues in a DSW event
device.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:45:10 +02:00
Mattias Rönnblom
236acd0dc5 event/dsw: add port configuration
Allow port setup and release in the DSW event device.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:44:56 +02:00
Mattias Rönnblom
4540ee9c68 event/dsw: add device and queue configuration
Allow queue- and device-level configuration for and retrieval of
contextual information from a DSW event device.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:44:42 +02:00
Mattias Rönnblom
46a186b1f0 event/dsw: add device registration and build system
This patch contains the Meson and GNU Make build system extensions
required for the Distributed Event Device, and also the initialization
code for the driver itself.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:44:14 +02:00
Jerin Jacob
0ad9a8d391 doc: fix eventdev shared library version
The below change set suppose to bump the eventdev shared library version.
It missed updating the version number so fixing it now.

Fixes: 3810ae4357 ("eventdev: add interrupt driven queues to Rx adapter")
Cc: stable@dpdk.org

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:43:21 +02:00
Thomas Monjalon
ff37ca5d37 devtools: use a common prefix for temporary files
Some temporary files were generated in /tmp, others in the current
directory, and none was "dpdk prefixed".

All these files have a common path prefix now: $TMPDIR/dpdk.
TMPDIR is /tmp by default.

Note: the previous use of mktemp, with a template but without -t,
was generating a file in the current directory.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-10-01 23:51:45 +02:00
Thomas Monjalon
8f3ea0a03d devtools: fix printing subject of checked patch
If checkpatches.sh is not run with verbose option (-v),
the patch subject is printed as headline of errors only
if there is an error reported by checkpatch.pl, not with other checks.
The headline is moved to a function which is called after each check
if there is an error and if it has not already be printed.

One more addition, in verbose mode, checkpatch.pl is now announced
as done for other checks.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2018-10-01 23:46:50 +02:00
Arnon Warshavsky
42f4d724ec devtools: move awk script ckecking forbidden tokens
The awk code previously read inline in checkpatches.sh
was using -d which is a bash option,
while bash is not the default shell in all distributions.
Now moved to be read from a separate file.

Signed-off-by: Arnon Warshavsky <arnon@qwilt.com>
Acked-by: Andrzej Ostruszka <amo@semihalf.com>
2018-10-01 23:40:45 +02:00
Fiona Trahe
738ad7b42b test/crypto: fix number of queue pairs
Some of the tests use a QAT-specific value (2) for
maximum nr of queue pairs to create valid/invalid test cases.
This has accidentally worked ok as default max_qps for all PMDs
is larger. It is incorrect however and would fail if a device
had a max lower than the QAT value.
Instead use the value returned by the PMD in the
rte_cryptodev_get_info query, this value is stored in the ts_params.

Fixes: 202d375c60 ("app/test: add cryptodev unit and performance tests")
Cc: stable@dpdk.org

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-27 13:41:05 +02:00
Fiona Trahe
78c5ea9132 compress/qat: remove unnecessary assignment
Same variable was assigned twice, remove one.

Fixes: 6a7ea14819 ("compress/qat: add xform processing")
Cc: stable@dpdk.org

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-09-27 13:40:22 +02:00
Fiona Trahe
7586c57873 compress/qat: fix checksum on decompression
Checksum was always 0 on QAT decompression due to
incorrect use of union variable.

Fixes: 6a7ea14819 ("compress/qat: add xform processing")
Cc: stable@dpdk.org

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-09-27 13:40:22 +02:00
Anoob Joseph
0ad08d3c29 doc: add cryptodev features
Adding 3DES-ECB & AES-XTS to the list of ciphers supported

Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 14:32:07 +02:00
Hemant Agrawal
05b12700cd crypto/dpaa_sec: support null algos for protocol offload
NULL cipher and NULL auth support is added.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:18:38 +02:00
Hemant Agrawal
e117c18a1d crypto/dpaa2_sec: restructure session management
Code for session create is restructured to make scalable to
support different algorithms.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:18:38 +02:00
Hemant Agrawal
547a4d40e7 crypto/dpaa2_sec: support out of place protocol offload
OOP support for look aside protocol support is added.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:18:38 +02:00
Akhil Goyal
db60e550d5 crypto/dpaa2_sec: enable sequence no rollover
With this patch sequence number will be rolled over and
SEC block will ignore the sequence number overflow error.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:18:38 +02:00
Akhil Goyal
79fde9d00c crypto/dpaa_sec: enable sequence no rollover
With this patch sequence number will be rolled over and
SEC block will ignore the sequence number overflow error.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:18:38 +02:00
Hemant Agrawal
551a42a993 crypto/dpaa_sec: reduce number of qp per device
In dpaa_sec, there are unlimited queues, but in order
to match the DPDK handling of queue pairs, rx side queues
are still unlimited, but the application will see only limited
qp (tx queues) from dpaa_sec hw.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:18:38 +02:00
Akhil Goyal
9198b2c227 crypto/dpaa_sec: do not attach session for non-matching qp
if session->qp != qp to be enqueued, it should show an error and
not try to re-attach another qp.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:18:38 +02:00
Akhil Goyal
3b617ee775 crypto/dpaa_sec: add lock before Rx HW queue attach
This is to safeguard as the session config can be done from multi-threads.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:18:38 +02:00
Akhil Goyal
b0894102cb crypto/dpaa: reset session before init
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:20:26 +02:00
Hemant Agrawal
3373a36ba7 crypto/dpaa: update the flib RTA
hw flib code is updated as per the latest set of APIs and macros

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:18:38 +02:00
Pablo de Lara
ceb8639387 crypto/aesni_gcm: support all truncated digest sizes
The full digest size of GCM/GMAC algorithms is 16 bytes.
However, it is sometimes truncated to a smaller size (such as in IPSec).
This commit allows a user to generate a digest of any size
up to the full size.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-09-26 12:43:57 +02:00
Pablo de Lara
c7c29f1058 crypto/aesni_gcm: remove unneeded J0 calculation
When IV size is 12, padding to 16 bytes is required
and the LSB must be set to 1, according to the spec.
However, the Multi-buffer library is already doing this,
so it is not necessary to do it in the PMD.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-09-26 12:43:57 +02:00
Pablo de Lara
d0fe8c48a4 crypto/aesni_mb: support large HMAC key sizes
Add support for SHAx-HMAC key sizes larger than the block size.
For these sizes, the input key is digested with the non-HMAC
version of the algorithm and used as the key.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-09-26 12:45:13 +02:00
Pablo de Lara
035ecca5ea crypto/aesni_mb: support all truncated CMAC digest sizes
The full digest size of CMAC algorithm is 16 bytes.
However, it is sometimes truncated to a smaller size (such as in IPSec).
This commit allows a user to generate a digest of any size
up to the full size.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-09-26 12:45:05 +02:00
Pablo de Lara
16a3558e0b crypto/aesni_mb: fix truncated digest size for CMAC
The truncated digest size for AES-CMAC is 12 and not 16,
as the Multi-buffer library can output both 12 and 16 bytes.

Fixes: 6491dbbece ("crypto/aesni_mb: support AES CMAC")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-09-26 12:44:57 +02:00
Pablo de Lara
c4c0c312a8 crypto/aesni_mb: check for invalid digest size
When creating a crypto session, check if
ther requested digest size is supported for
AES-XCBC-MAC and AES-CCM.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-09-26 12:44:51 +02:00
Pablo de Lara
763c24917d crypto/aesni_mb: support all truncated HMAC digest sizes
HMAC algorithms (MD5 and SHAx) have different full digest sizes.
However, they are often truncated to a smaller size (such as in IPSec).
This commit allows a user to generate a digest of any size
up to the full size.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-09-26 12:43:57 +02:00