Adrien Mazarguil [Mon, 10 Jul 2017 12:09:36 +0000 (14:09 +0200)]
app/testpmd: fix token matching in flow command
While matching user input against a token name or any other fixed string,
comparison stops at the end of user input if shorter (e.g. "foo" matches
token name "foobar").
Although the unintended consequence of this behavior allows users to
abbreviate command names and various parameters yet generate valid
commands, the parser was not designed to support this and does not prevent
ambiguous tokens.
For instance, entering "i" for a pattern item matches "ipv4", "ipv6" and
"icmp" then defaults to one of them in an unspecified manner.
Prevent this behavior by taking the length of fixed strings into account.
Fixes:
19c90af6285c ("app/testpmd: add flow command")
Fixes:
5ac3502ed1be ("app/testpmd: add flow query command")
Fixes:
abc3d81aca1b ("app/testpmd: add item raw to flow command")
Fixes:
05d34c6e9d2c ("app/testpmd: add queue actions to flow command")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Adrien Mazarguil [Mon, 10 Jul 2017 12:09:35 +0000 (14:09 +0200)]
cmdline: fix dynamic tokens interface
Support for dynamic tokens was added in order to implement the flow command
in testpmd, for which static tokens were not versatile enough due to the
large number of possible parameter combinations.
However, due to its reliance on a temporary array to store dynamic tokens,
this interface suffers from various limitations that need to be addressed
in order to implement more commands in the future:
- The maximum number of dynamic tokens is determined at compilation time
(CMDLINE_PARSE_DYNAMIC_TOKENS). The larger this value, the more stack
space is wasted (one pointer per potential token, i.e. 1kB of stack space
on 64-bit architectures with the default value).
- This temporary array is actually a cache in which entries already present
are not regenerated. This behavior is not documented, which makes dynamic
tokens practically unusable by applications as they do not know which
token is current.
- The cache does not really reduce the number of function calls needed to
retrieve tokens, it was mainly deemed useful to provide context about
other tokens to the generator callback.
- Like testpmd, most users will likely use repeated pointers to a fixed
token header structure (cmdline_token_hdr_t), with internal context-aware
callbacks that do not need to look at other entries; knowing the index of
the current token is enough.
Getting rid of the temporary array and properly documenting usage of the
token generator callback greatly simplifies this interface.
Fixes:
4fffc05a2b2c ("cmdline: support dynamic tokens")
Fixes:
19c90af6285c ("app/testpmd: add flow command")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Adrien Mazarguil [Mon, 10 Jul 2017 12:09:34 +0000 (14:09 +0200)]
cmdline: fix dynamic tokens initialization
To avoid redundant calls to the token-generating function and provide it
with helpful context, a temporary fixed-size array allocated on the stack
of cmdline_parse() and cmdline_complete() keeps the address of preceding
tokens for the command instance being processed (cmdline_parse_inst_t).
Like the static tokens array in cmdline_parse_inst_t, it must be
NULL-terminated, however this is not properly enforced as it is initialized
once at the beginning of each function and a NULL terminator is never
appended once replaced with generated tokens.
When several commands rely on dynamic tokens, subsequent ones inherit an
already initialized array whose tokens are not regenerated, which causes
various issues such as mixed and repeated tokens from the first command.
Enforcing NULL termination of the dynamic tokens array and reinitializing
its first entry at each iteration solves these issues. Doing so is also
less expensive than a full memset() at each iteration.
Fixes:
4fffc05a2b2c ("cmdline: support dynamic tokens")
Cc: stable@dpdk.org
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Gaetan Rivet [Thu, 20 Jul 2017 12:27:53 +0000 (14:27 +0200)]
net/failsafe: fix build on FreeBSD 10 with GCC 4.8
ctype.h is not compilable in BSD 10 on GCC 4.8 in C11 mode.
CC failsafe.o
In file included from /usr/include/_ctype.h:94:0,
from /usr/include/ctype.h:46,
from /root/dpdk.org/build/include/rte_common.h:50,
from /root/dpdk.org/build/include/rte_memory.h:57,
from /root/dpdk.org/build/include/rte_malloc.h:45,
from /root/dpdk.org/drivers/net/failsafe/failsafe.c:35:
/usr/include/runetype.h:92:22: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'const'
extern _Thread_local const _RuneLocale *_ThreadRuneLocale;
^
/usr/include/runetype.h: In function '__getCurrentRuneLocale':
/usr/include/runetype.h:96:6: error: '_ThreadRuneLocale' undeclareds
(first use in this function)
if (_ThreadRuneLocale)
^
The fix is to put GCC in gnu99 mode instead.
Fixes:
a46f8d584eb8 ("net/failsafe: add fail-safe PMD")
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Kuba Kozak [Wed, 19 Jul 2017 12:19:42 +0000 (14:19 +0200)]
examples/l2fwd-crypto: add option to update MAC address
This patch adds a new option to enable/disable the
MAC addresses updating done at forwarding time: --[no-]mac-updating
By default, MAC address updating remains enabled, to keep consistency
with previous usage.
Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Kirill Rybalchenko [Tue, 18 Jul 2017 10:35:38 +0000 (11:35 +0100)]
crypto/scheduler: fix multicore reordering
Operations can be dequeued from the reordering ring only after they
were dequeued from the crypto pmd with rte_cryptodev_dequeue_burst()
function. It is not correct to dequeue them when status just changed
from RTE_CRYPTO_OP_STATUS_NOT_PROCESSED to any other value, as the
operations still can be processed by crypto pmd internally.
Now multicore scheduler workers mark status of all dequeued from
crypto pmd operations with CRYPTO_OP_STATUS_BIT_COMPLETE bit set.
Scheduler will dequeue crypto operations from reordering ring only
when this status bit is set. Prior to put this operation to output
buffer, scheduler clears this bit, so the application gets
unmodified status from crypto pmd.
Fixes:
4c07e0552f0a ("crypto/scheduler: add multicore scheduling mode")
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Kirill Rybalchenko [Mon, 17 Jul 2017 15:25:00 +0000 (16:25 +0100)]
cryptodev: remove crypto operation status value
Crypto operation status RTE_CRYPTO_OP_STATUS_ENQUEUED is removed
from rte_crypto.h as it is not needed for crypto operation processing.
This status value is redundant to RTE_CRYPTO_OP_STATUS_NOT_PROCESSED value
and it was not intended to be part of public API.
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Pablo de Lara [Wed, 19 Jul 2017 04:59:02 +0000 (05:59 +0100)]
crypto/qat: fix session initialization
When creating a session, if there is a failure when
setting some of the parameters, QAT was not propagating
the error to the session initialization function.
Therefore, it was reporting a success, when it should
be report a failure.
Fixes:
b3bbd9e5f265 ("cryptodev: support device independent sessions")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Kirill Rybalchenko [Wed, 14 Jun 2017 08:44:04 +0000 (09:44 +0100)]
app/crypto-perf: stop crypto devices after test
Call of rte_cryptodev_stop() function from test destructors
is added.
Fixes:
f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Pablo de Lara [Tue, 18 Jul 2017 07:58:18 +0000 (08:58 +0100)]
examples/l2fwd-crypto: fix AEAD key setting
AEAD key was being set using the cipher key parameters,
instead of the AEAD key parameters.
Fixes:
2661f4fbe93d ("examples/l2fwd-crypto: add AEAD parameters")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Pablo de Lara [Tue, 18 Jul 2017 07:58:17 +0000 (08:58 +0100)]
examples/l2fwd-crypto: fix AEAD IV setting
IV was not being set for AEAD algorithms.
Fixes:
2661f4fbe93d ("examples/l2fwd-crypto: add AEAD parameters")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Pablo de Lara [Tue, 18 Jul 2017 07:58:16 +0000 (08:58 +0100)]
examples/l2fwd-crypto: fix digest length
Digest length was not being set when using authentication
algorithms.
Fixes:
2661f4fbe93d ("examples/l2fwd-crypto: add AEAD parameters")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Kirill Rybalchenko [Tue, 18 Jul 2017 11:32:25 +0000 (12:32 +0100)]
doc: extend info on multi-core scheduler
The corelist parameter for the multi-core scheduling mode
needed some extra explanation on how to use it.
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Pablo de Lara [Tue, 18 Jul 2017 01:41:15 +0000 (02:41 +0100)]
crypto/scheduler: fix strings not null terminated
Coverity issue: 143431
Fixes:
31439ee72b2c ("crypto/scheduler: add API implementations")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Pablo de Lara [Mon, 17 Jul 2017 08:29:53 +0000 (09:29 +0100)]
cryptodev: reorder auth transform
IV was positioned differently in authentication
transform structure, compared to the other two
transforms (cipher and AEAD).
To keep consistency, digest length is moved to
the end of the transform.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Pablo de Lara [Mon, 17 Jul 2017 08:29:52 +0000 (09:29 +0100)]
cryptodev: rename ADD field
Additional Authenticated Data (AAD) is called "aad" in most
places of cryptodev, but it was called "add_auth_data"
in the AEAD transform transform (aead_xform).
This field is renamed to "aad_length" in order to keep
consistency.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Pablo de Lara [Mon, 17 Jul 2017 08:29:51 +0000 (09:29 +0100)]
cryptodev: decrease key and digest sizes
Crypto keys and digests are not expected
to be big, so using a uint16_t to store
their lengths should be enough.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Arek Kusztal [Mon, 17 Jul 2017 16:57:15 +0000 (17:57 +0100)]
crypto/qat: fix handle device-agnostic session
Older generations of QuickAssist hardware
may not support all algorithms supported by newer
generations. When sessions were specific to the device
this only needed to be handled on session creation.
With device-agnostic sessions, a session created
for a newer device may get routed to an older device which
can't support it.
This patch adds an enum to define QAT device generations
and uses this to detect and handle the above case on the
data path.
It also renames the capabilities structures and #defines
to match the generation names and adds the generation
to the device table in the documentation.
Fixes:
b3bbd9e5f265 ("cryptodev: support device independent sessions")
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Pablo de Lara [Fri, 14 Jul 2017 06:48:47 +0000 (07:48 +0100)]
crypto/aesni_mb: fix zero burst dequeue
In the unlikely scenario that an application
calls rte_cryptodev_dequeue_burst with nb_ops = 0,
there was a job leak, as a job would be created
but would not be populated, as no operation is passed.
Fixes:
0f548b50a160 ("crypto/aesni_mb: process crypto op on dequeue")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Pablo de Lara [Fri, 14 Jul 2017 07:06:52 +0000 (08:06 +0100)]
cryptodev: fix KASUMI F9 expected parameters
For KASUMI F9 algorithm, COUNT, FRESH and DIRECTION
input values need to be contiguous with
the message, as described in the KASUMI and QAT PMD
documentation.
Before, the COUNT and FRESH values were set
as part of the AAD (now IV), but always set before
the beginning of the message.
Since now the IV is set after the crypto operation,
it is not possible to have these values in the
expected location.
Therefore, as these are required to be contiguous,
cryptodev API will expect these them to be passed
as a single buffer, already constructed, so
authentication IV parameters not needed anymore.
Fixes:
681f540da52b ("cryptodev: do not use AAD in wireless algorithms")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Pablo de Lara [Thu, 13 Jul 2017 05:36:50 +0000 (06:36 +0100)]
doc: extend installation section for SNOW3G/KASUMI
SNOW3G and KASUMI SW libraries encrypt buffers
assuming that they are padded to a specific block size.
This behaviour can be changed to avoid buffer overflow,
by modifying the Makefile of these libraries.
Therefore, the Installation section in the SNOW3G and
KASUMI documentation has been extended, to document
this case.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Pablo de Lara [Thu, 13 Jul 2017 05:36:49 +0000 (06:36 +0100)]
doc: add missing algorithm in limitations for QAT
For KASUMI, SNOW3G and ZUC algorithms, offsets and lengths
of the data to cipher or authenticate is provided in bits,
but QAT does not support non-byte aligned values,
although only KASUMI and SNOW3G were mentioned.
Fixes:
d9b7d5bbc845 ("crypto/qat: add ZUC EEA3/EIA3 capability")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Pablo de Lara [Thu, 13 Jul 2017 05:36:48 +0000 (06:36 +0100)]
doc: remove incorrect limitation on AESNI-MB PMD
AESNI MB PMD supports sessionless operations,
but the documentation was stating that only
operations with session were supported.
Fixes:
924e84f87306 ("aesni_mb: add driver for multi buffer based crypto")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Pablo de Lara [Thu, 13 Jul 2017 05:36:47 +0000 (06:36 +0100)]
doc: remove incorrect limitation on QAT PMD
QAT supports authentication only operations,
for any authentication algorithm (such as SHA1-HMAC),
as long as it is supported by QAT, so it means
that it is not necessary to create a chained operation
in order to use these algorithms.
Fixes:
1703e94ac5ce ("qat: add driver for QuickAssist devices")
CC: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Pablo de Lara [Thu, 13 Jul 2017 05:36:46 +0000 (06:36 +0100)]
doc: fix supported algorithm table for AESNI-GCM PMD
AESNI GCM PMD now supports 192-bit keys for AES-GCM,
so the supported algorithm table should be updated.
Fixes:
6f16aab09a91 ("crypto/aesni_gcm: migrate to Multi-buffer library")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Srisivasubramanian S [Fri, 14 Jul 2017 05:43:07 +0000 (11:13 +0530)]
test/crypto-perf: fix ARMv8 session creation
Session was NULL as test_crypto_session not initialised.
Fixes:
b3bbd9e5f265 ("cryptodev: support device independent sessions")
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Arek Kusztal [Fri, 14 Jul 2017 08:49:02 +0000 (09:49 +0100)]
crypto/qat: fix authentication offset and length for GMAC
Authentication length and offset need to be set like for any other
authentication algorithms as it no longer uses aad pointer
Fixes:
b79e4c00af0e ("cryptodev: use AES-GCM/CCM as AEAD algorithms")
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Pablo de Lara [Tue, 11 Jul 2017 06:30:43 +0000 (07:30 +0100)]
cryptodev: remove AAD size in auth capabilities
Additional Authenticated Data (AAD) was removed from the
authentication parameters, but still the supported size
was part of the authentication capabilities of a PMD.
Fixes:
4428eda8bb75 ("cryptodev: remove AAD from authentication structure")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Pablo de Lara [Thu, 13 Jul 2017 03:35:12 +0000 (04:35 +0100)]
crypto/aesni_mb: fix possible crypto job leak
When dequeueing operations from an AESNI-MB device,
crypto jobs are dequeued from the internal scheduler
in the Multi-buffer library.
If the number of jobs available to retrieve
are higher than the number of crypto operations
that are required, then an extra job is retrieved
(due to an incorrect conditional), but not used.
This leads to a job leak and the operation associated
to that job will not be ever dequeued.
Fixes:
0f548b50a160 ("crypto/aesni_mb: process crypto op on dequeue")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Akhil Goyal [Wed, 12 Jul 2017 15:12:40 +0000 (20:42 +0530)]
doc: add missing devices in test-crypto-perf
crypto_armv8, crypto_scheduler and crypto_dpaa2_sec
are added in the documentation
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Akhil Goyal [Wed, 12 Jul 2017 12:34:39 +0000 (18:04 +0530)]
crypto/dpaa2_sec: fix typo in PMD name
Comment for device name is corrected.
Also the name string is made similar to other pmds.
Fixes:
a3277ad47feb ("cryptodev: remove crypto device driver name")
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Akhil Goyal [Wed, 12 Jul 2017 12:34:41 +0000 (18:04 +0530)]
crypto/dpaa2_sec: fix free usage for dpsec
dpseci is allocated using rte_calloc() but it is freed
using free(). Fixing it to use rte_free()
Fixes:
e5cbdfc53765 ("crypto/dpaa2_sec: add basic operations")
Cc: stable@dpdk.org
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Arek Kusztal [Fri, 21 Apr 2017 08:11:30 +0000 (09:11 +0100)]
crypto/qat: fix NULL authentication hang
To avoid a possible HW problem when dealing with
NULL authentication case, the state sizes
in the request descriptor are set.
Fixes:
db0e952a5c01 ("crypto/qat: add NULL capability")
Cc: stable@dpdk.org
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Fan Zhang [Fri, 7 Jul 2017 05:17:30 +0000 (06:17 +0100)]
crypto/scheduler: fix slave name parsing
This patch fixes the incorrect index checking in parse_slave
function.
Fixes:
503e9c5afb38 ("crypto/scheduler: register as vdev driver")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Pablo de Lara [Fri, 7 Jul 2017 04:51:20 +0000 (05:51 +0100)]
doc: use new crypto driver names
Crypto driver names were changed in 16.11,
but some guides were still using the old ones
(which are still valid, only kept for compatibility
reasons).
To keep consistency and avoid confusion, all guides
should be using the same driver names.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Pablo de Lara [Fri, 7 Jul 2017 04:36:56 +0000 (05:36 +0100)]
doc: fix crypto scheduler command line examples
Sample command lines for crypto scheduler were not correct,
due to:
- Typo in "crypto_scheduler" driver name
- Multiple virtual devices require having unique names,
driver name + a suffix, otherwise, just a single device is
created.
Fixes:
d58a3f312545 ("crypto/scheduler: add documentation")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Arek Kusztal [Tue, 11 Jul 2017 13:35:35 +0000 (14:35 +0100)]
crypto/qat: remove unused ablkcipher
This commit removes unused ablkcipher struct and functions
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Harry van Haaren [Mon, 17 Jul 2017 16:09:47 +0000 (17:09 +0100)]
eventdev: fix memory realloc check in port config
This commit fixes the check to use the just reallocated
links_map variable, instead of stale dev->data->links_map.
Later the new variable is written to the dev->data->links_map,
so the stale-ness is only temporary.
Coverity issue: 143456
Fixes:
4f0804bbdfb9 ("eventdev: implement the northbound APIs")
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Nipun Gupta [Wed, 19 Jul 2017 14:18:32 +0000 (19:48 +0530)]
event/dpaa2: advertise burst mode capability
Burst mode capability flag was introduced in
73e6b8c9 for event drivers.
DPAA2 event driver supports burst mode so this patch adds this capability
flag in DPAA2 event driver
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Daniel Mrzyglod [Wed, 19 Jul 2017 14:54:02 +0000 (16:54 +0200)]
test/bonding: add test case for agg selection in mode4
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Daniel Mrzyglod [Wed, 19 Jul 2017 14:46:27 +0000 (16:46 +0200)]
app/testpmd: support different aggregation modes
This patch add support for different aggregator modes in similar manner
that is provided in linux kernel.
testpmd> set bonding agg_mode <port_id> <agg_name>
testpmd> show bonding config <port_id>
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Daniel Mrzyglod [Wed, 19 Jul 2017 14:31:17 +0000 (16:31 +0200)]
net/bonding: add other aggregator modes
This patch add support for setting additional aggregator modes for
IEEE802.3AD in similar manner that are supported in kernel mode.
This will add support for other manner:
stable - default mode taken from IEEE802.11AX this is default
aggregator mode
bandwidth - takes aggregator with highest bandwidth
count - takes aggregator with biggest number of slaves
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Jeff Guo [Wed, 19 Jul 2017 09:01:11 +0000 (17:01 +0800)]
net/i40e: fix VF add/del MAC
i40e VF close would stop the VF first, if VF already stopped this
result duplicate add/del MAC address which cause failure in executing
admin command.
Fix this by adding VF stop status check and sync up VF MAC address count
during add/del.
Fixes:
d42aaf30008b ("i40e: support port hotplug")
Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qiming Yang [Tue, 18 Jul 2017 02:28:34 +0000 (10:28 +0800)]
net/ixgbe: fix Rx/Tx queue interrupt for x550 devices
x550 devices don't map interrupt vector before enabling Rx/Tx queue
interrupt.
Because of this interrupt mode is not working for x550 devices.
Fixes:
d2e72774e58c ("ixgbe/base: support X550")
Cc: stable@dpdk.org
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
Wei Zhao [Wed, 19 Jul 2017 03:34:33 +0000 (11:34 +0800)]
net/ixgbe: add queue index check in filter
Add queue index check when create filter rule, or
filter with invalid queue id can be created successfully.
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Gaetan Rivet [Tue, 18 Jul 2017 12:48:22 +0000 (14:48 +0200)]
net/failsafe: support flow API isolation mode
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Tue, 18 Jul 2017 12:48:21 +0000 (14:48 +0200)]
net/failsafe: support link status change event
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Tue, 18 Jul 2017 12:48:20 +0000 (14:48 +0200)]
net/failsafe: support device removal
Listen to INTR_RMV events issued by slaves.
Add atomic flags on slave queues to detect use of slave bursts function.
If a removal is detected, set the recollection flag on this slave.
During a slave upkeep round, if its recollection flag is set and its
burst functions are not in use by any thread, remove that slave.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
Gaetan Rivet [Tue, 18 Jul 2017 12:48:19 +0000 (14:48 +0200)]
net/failsafe: add fast burst functions
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
Gaetan Rivet [Tue, 18 Jul 2017 12:48:18 +0000 (14:48 +0200)]
net/failsafe: support Rx offload capabilities
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
Gaetan Rivet [Tue, 18 Jul 2017 12:48:17 +0000 (14:48 +0200)]
net/failsafe: support flow API
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
Gaetan Rivet [Tue, 18 Jul 2017 12:48:16 +0000 (14:48 +0200)]
net/failsafe: add flexible device definition
Add the "exec" device type.
The parameters given to this type of device will be executed in a shell.
The output of this command is then used as a definition for a device.
That command can be re-interpreted if the related device is not
plugged-in. It allows for a device definition to react to system
changes (e.g. changing PCI bus for a given device).
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
Gaetan Rivet [Tue, 18 Jul 2017 12:48:15 +0000 (14:48 +0200)]
net/failsafe: add plug-in support
Periodically check for the existence of a device.
If a device has not been initialized and exists on the system, then it
is probed and configured.
The configuration process strives to synchronize the states between the
plugged-in sub-device and the fail-safe device.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
Gaetan Rivet [Tue, 18 Jul 2017 12:48:14 +0000 (14:48 +0200)]
net/failsafe: add fail-safe PMD
Introduce the fail-safe poll mode driver initialization and enable its
build infrastructure.
This PMD allows for applications to benefit from true hot-plugging
support without having to implement it.
It intercepts and manages Ethernet device removal events issued by
slave PMDs and re-initializes them transparently when brought back.
It also allows defining a contingency to the removal of a device, by
designating a fail-over device that will take on transmitting operations
if the preferred device is removed.
Applications only see a fail-safe instance, without caring for
underlying activity ensuring their continued operations.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
Gaetan Rivet [Tue, 18 Jul 2017 12:48:13 +0000 (14:48 +0200)]
ethdev: count devices consistently
Make the rte_eth_dev_count() return the number of available devices even
after some are detached by the hotplug API or put in a deferred state.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Gaetan Rivet [Tue, 18 Jul 2017 12:48:12 +0000 (14:48 +0200)]
ethdev: add deferred intermediate device state
This device state means that the device is managed externally, by
whichever party has set this state (PMD or application).
Note: this new device state is only an information. The related device
structure and operators are still valid and can be used normally.
It is however made private by device management helpers within ethdev,
making the device invisible to applications.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Qi Zhang [Tue, 18 Jul 2017 09:52:14 +0000 (05:52 -0400)]
doc: add known issue for i40e VF performance
VF performance is limited by the kernel PCI extended tag setting.
Update the document to explain the known issue and the workaround.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Tue, 18 Jul 2017 11:37:33 +0000 (19:37 +0800)]
net/ixgbe: fix IPv6 flow create limitation for x550
The x550 family does not support ipv6-other flow as well as
ipv4-other flow, so add this limitation.
Fixes:
7d629cacedee ("net/ixgbe: enable IPv6 for consistent API")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Wei Zhao [Tue, 18 Jul 2017 06:10:02 +0000 (14:10 +0800)]
net/ixgbe: support 82599ES SCTP packet drop action
82599ES can support SCTP packet drop action, but the
configuration is different from TCP or UDP packet, so
it need to rework some FDIR related code to adapt
drop action rule of SCTP packet.
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Beilei Xing [Tue, 18 Jul 2017 03:07:07 +0000 (11:07 +0800)]
net/i40e: fix ethertype filter for new FW
Previously SW workaround for GL_SWR_PRI_JOIN_MAP is added for X710
performance. As new FW version 6.0 supports ADQ,
value for GL_SWR_PRI_JOIN_MAP should be changed, otherwise
ehtertype filter will be impacted.
Fixes:
973273c7a4b7 ("i40e: workaround for X710 performance")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Raslan Darawsheh [Mon, 17 Jul 2017 09:00:20 +0000 (12:00 +0300)]
net/tap: remove Linux version check
Remove checks of Linux kernel version
in order to support kernel with backported features.
the expected behavior with a kernel that doesn't support flower
and other bits is the following:
-flow validate can return successfully
-flow create using the same rule fails.
Using the "remote" feature without kernel flower does not fail silently.
The TAP instance is not initialized if the requested parameters cannot
be satisfied.
it has been tested on an old kernel without required support:
PMD: Kernel refused TC filter rule creation (2): No such file or directory
PMD: tap0 failed to create implicit rules.
PMD: Can't set up remote feature: No such file of directory(2)
PMD: TAP Unable to initialize net_tap0
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
Qi Zhang [Mon, 17 Jul 2017 11:46:35 +0000 (19:46 +0800)]
net/ixgbe: fix drop action for signature match
Drop action is not supported by signature match, should return
error when try to create a signature match flow with drop action.
Fixes:
a948d33bc05a ("net/ixgbe: enable signature match for consistent API")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Hemant Agrawal [Mon, 17 Jul 2017 08:48:14 +0000 (14:18 +0530)]
net/dpaa2: support secondary process attach
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Beilei Xing [Mon, 17 Jul 2017 07:33:09 +0000 (15:33 +0800)]
net/i40e: fix virtchnl message response timeout
PF driver and VF driver communicated with each other by virtual
channel message. When VF sends message to PF to enable some
offload capability, PF should response if it is successful or not.
VIRTCHNL_OP_ENABLE_VLAN_STRIPPING is a new added message and the
old PF driver doesn’t support that. So no response is received by
DPDK VF. Then VF is blocked on this message and cannot roll back.
This patch clears pending command on VF side when the waiting duration
expires to avoid blocking following communication.
Fixes:
5f0b95d59a98 ("net/i40e: support VLAN stripping for VF")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Tiwei Bie [Mon, 17 Jul 2017 06:35:39 +0000 (14:35 +0800)]
net/virtio: refactor coding style in Rx
Make the code more readable. No functional change.
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Tiwei Bie [Mon, 17 Jul 2017 06:29:36 +0000 (14:29 +0800)]
net/ixgbe: remove an unnecessary goto
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Tiwei Bie [Mon, 17 Jul 2017 06:26:56 +0000 (14:26 +0800)]
net/i40e: remove an unnecessary goto
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Beilei Xing [Fri, 14 Jul 2017 06:51:36 +0000 (14:51 +0800)]
net/i40e: check invalid VF queue id for FDIR
There's only invalid queue id checking for PF when creating FDIR
rules, this patch adds checking invalid queue id for VF.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Jingjing Wu [Thu, 13 Jul 2017 09:43:23 +0000 (17:43 +0800)]
net/e1000: fix LSC interrupt
If LSC flag is changed to off at last device start, the
enable flag is not cleared in HW.
This patch fixes it.
Fixes:
c3cd3de0ab50 ("igb: enable Rx queue interrupts for PF")
Cc: stable@dpdk.org
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Jingjing Wu [Thu, 13 Jul 2017 09:43:22 +0000 (17:43 +0800)]
net/i40e: fix LSC interrupt
If LSC flag is changed to off at last device start, the
enable flag is not cleared in HW.
This patch fixes it.
Fixes:
f4668a33efe5 ("net/i40e: fix link status change interrupt")
Cc: stable@dpdk.org
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Jingjing Wu [Thu, 13 Jul 2017 09:43:21 +0000 (17:43 +0800)]
net/ixgbe: fix LSC interrupt
If LSC flag is changed to off at last device start, the
enable flag is not cleared in HW.
This patch fixes it.
Fixes:
0eb609239efd ("ixgbe: enable Rx queue interrupts for PF and VF")
Cc: stable@dpdk.org
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Yongseok Koh [Wed, 12 Jul 2017 22:09:54 +0000 (15:09 -0700)]
net/mlx5: change start pointer of compressed completion
On a host having 128B cacheline size, some devices insert 64B padding in
each completion entry to avoid partial cacheline write by HW. But, as the
padding is ahead of completion data, casting a completion entry to
compressed mini-completions must start from the middle of the completion.
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Jerin Jacob [Tue, 11 Jul 2017 13:54:26 +0000 (19:24 +0530)]
net/thunderx: update sq config register field
cq_limit field is added in cn88xx-pass2 and subsequent
versions. Reflect the change in the sq_config structure.
This change is backward compatible as the old pass versions
ignore this field.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Qi Zhang [Sun, 9 Jul 2017 19:54:58 +0000 (15:54 -0400)]
net/i40e: fix VF Tx bytes
Tx CRC size is not counted by VSI's stats register, so it is not necessary
excluded by driver.
Fixes:
98abce237ba7 ("net/i40e: fix VF statistics")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Rasesh Mody [Sat, 8 Jul 2017 18:31:51 +0000 (11:31 -0700)]
doc: update supported architectures for qede
Add support for x86-32 and armv8 architectures.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Ivan Malov [Sat, 8 Jul 2017 15:45:15 +0000 (16:45 +0100)]
net/sfc: support xstats retrieval by ID
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Remy Horton <remy.horton@intel.com>
Ivan Malov [Sat, 8 Jul 2017 15:16:55 +0000 (16:16 +0100)]
net/sfc: request MAC stats upload immediately on port start
If MAC stats refresh is arranged to be done by periodic DMA,
the first DMA transaction is unlikely to occur right on the
port start; if the user tries to get stats right after port
start and before the transaction occurs, bogus figures will
be collected; a one-off stats upload on port start is a fix
Fixes:
1caab2f1e684 ("net/sfc: add basic statistics")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Thomas Monjalon [Thu, 6 Jul 2017 15:47:50 +0000 (17:47 +0200)]
net/ring: add missing newlines in logs
Some logs are missing the newline character \n.
The logs using only one line can be checked with this command:
git grep 'RTE_LOG(.*".*[^n]"' drivers/net/ring/
Fixes:
61934c0956d4 ("ring: convert to use of PMD_REGISTER_DRIVER and fix linking")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Thomas Monjalon [Thu, 6 Jul 2017 15:28:48 +0000 (17:28 +0200)]
net/tap: add missing newlines in logs
Some logs are missing the newline character \n.
The logs using only line can be checked with this command:
git grep 'RTE_LOG(.*".*[^n]"' drivers/net/tap/
Fixes:
02f96a0a82d1 ("net/tap: add TUN/TAP device PMD")
Fixes:
268483dc2086 ("net/tap: add preliminary support for flow API")
Fixes:
2bc06869cd94 ("net/tap: add remote netdevice traffic capture")
Fixes:
bf7b7f437b49 ("net/tap: create netdevice during probing")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
Changpeng Liu [Thu, 20 Jul 2017 09:16:29 +0000 (17:16 +0800)]
examples/vhost_scsi: introduce a new sample app
vhost-user protocol is common to many virtio devices, such as
virtio_net/virtio_scsi/virtio_blk. Since DPDK vhost library
removed the NET specific data structures, the vhost library
is common to other virtio devices, such as virtio-scsi.
Here we introduce a simple memory based block device that
can be presented to Guest VM through vhost-user-scsi-pci
controller. Similar with vhost-net, the sample application
will process the I/Os sent via virt rings.
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Zhiyong Yang [Mon, 10 Jul 2017 08:06:48 +0000 (16:06 +0800)]
vhost: fix initialization
Exception handling is executed in the normal path and it will cause
vhost-user init failure.
Fixes:
d6983a70e259 ("vhost: check return of pthread calls")
Reported-by: Lei Yao <lei.a.yao@intel.com>
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Gaetan Rivet [Sat, 15 Jul 2017 17:59:27 +0000 (19:59 +0200)]
devargs: restore device type API
Revert "devargs: make device types generic"
This commit broke the rte_devargs API by changing the meaning of
the rte_devtype enum.
Restore the previous API, unit tests and function calls.
Introduce parallel enum that acts as translation between previous API
and current structures.
Restoring the previous API means that -w and -b are not usable anymore
with any bus having implemented the "parse" operation. Only PCI devices
can be used with -w and -b, virtual devices are declared using vdev.
This (partially) reverts commit
bd279a79366f50a4893fb84db91bbf64b56f9fb1.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Sat, 15 Jul 2017 17:56:42 +0000 (19:56 +0200)]
bus: remove useless plug parameter
The prior scan should link the relevant rte_devargs to the newly
allocated rte_device. As such, it is useless to pass device arguments to
the plug callback. Those arguments are available within the devargs
field of the rte_device structure.
Fixes:
7c8810f43f6e ("bus: introduce device plug/unplug")
Fixes:
00e62aae69c0 ("bus/pci: implement plug/unplug operations")
Fixes:
a3ee360f4440 ("eal: add hotplug add/remove device")
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Sat, 15 Jul 2017 17:56:41 +0000 (19:56 +0200)]
bus/pci: fix hotplug operations
The device handle is already known and does not have to be infered from
the PCI address. The relevant helpers are already available within the
PCI bus to avoid searching for a handle already known.
Additionally, rte_memcpy.h was erroneously included.
Fixes:
00e62aae69c0 ("bus/pci: implement plug/unplug operations")
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Sat, 15 Jul 2017 17:56:40 +0000 (19:56 +0200)]
bus/pci: fix generic driver pointer on probe error
The field is set but never resetted on error.
This marks the device as being attached while it is not, and forbid
further attempts to hotplug it.
Fixes:
7917d5f5ea46 ("pci: initialize generic driver pointer")
Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Sat, 15 Jul 2017 17:56:39 +0000 (19:56 +0200)]
bus/pci: use given name as generic name
When an application requests the use of a PCI device, it can currently
interchangeably use either the longform DomBDF format (0000:00:00.0) or
the shorter BDF format (00:00.0).
When a device is inserted via the hotplug API, it must first be scanned
and then will be identified by its name using `find_device`. The name of
the device must match the name given by the user to be found and then
probed.
A new function sets the expected name for a scanned PCI device. It was
previously generated from parsing the PCI address. This canonical name
is superseded when an rte_devargs exists describing the device. In such
case, the device takes the given name found within the rte_devargs.
As the rte_devargs is linked to the rte_pci_device during scanning, it
can be avoided during the probe. Additionally, this fixes the issue of
the rte_devargs lookup not being done within rte_pci_probe_one.
Fixes:
beec692c5157 ("eal: add name field to generic device")
Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Sat, 15 Jul 2017 17:56:38 +0000 (19:56 +0200)]
eal: fix hotplug add / remove
The hotplug API requires a few properties that were not previously
explicitly enforced:
- Idempotency, two consecutive scans should result in the same state.
- Upon returning, internal devices are now allocated and available
through the new `find_device` operator, meaning that they should be
identifiable.
The current rte_eal_hotplug_add implementation identifies devices by
their names, as it is readily available and easy to define.
The device name must be passed to the internal rte_device handle in
order to be available during scan, when it is then assigned to the
device. The current way of passing down this information from the device
declaration is through the global rte_devargs list.
Furthermore, the rte_device cannot take a bus-specific generated name,
as it is then not identifiable by the `find_device` operator. The device
must take the user-defined name. Ideally, an rte_device name should not
change during its existence.
This commit generates a new rte_devargs associated with the plugged
device and inserts it in the global rte_devargs list. It consequently
releases it upon device removal.
Fixes:
a3ee360f4440 ("eal: add hotplug add/remove device")
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Sat, 15 Jul 2017 17:56:37 +0000 (19:56 +0200)]
devargs: introduce insert function
Some buses will operate either in whitelist or blacklist mode.
This mode is currently passed down by the rte_eal_devargs_add function
with the devtype argument.
When inserting devices using the hotplug API, the implicit assumption is
that this device is being whitelisted, meaning that it is explicitly
requested by the application to be used. This can conflict with the
initial bus configuration.
While the rte_eal_devargs_add API is being deprecated soon, it cannot
be modified at the moment to accommodate this situation.
As such, this new experimental API offers a bare interface for inserting
rte_devargs without directly manipulating the global rte_devargs list.
This new function expects a fully-formed rte_devargs, previously parsed
and allocated.
It does not check whether the new rte_devargs is compatible with current
bus configuration, but will replace any eventual existing one for the same
device, allowing the hotplug operation to proceed. i.e. a previously
blacklisted device can be redefined as being whitelisted.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Sat, 15 Jul 2017 17:56:36 +0000 (19:56 +0200)]
devargs: introduce removal function
Hotplug support introduces the possibility of removing devices from the
system. Allocated resources must be freed.
Extend the rte_devargs API to allow freeing allocated resources.
This API is experimental and bound to change. It is currently designed
as a symetrical to rte_eal_devargs_add(), but the latter will evolve
shortly anyway.
Its DEVTYPE parameter is currently only used to specify scan policies,
and those will evolve in the next release. This evolution should
rationalize the rte_devargs API.
As such, the proposed API here is not the most convenient, but is
taylored to follow the current design and integrate easily with its main
use within rte_eal_hotplug_* functions.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Sat, 15 Jul 2017 17:56:35 +0000 (19:56 +0200)]
bus/vdev: implement plug operation
This method must be implemented to allow using a unified, generic API to
hotplug devices, including virtual ones.
VDEV devices actually exist unattached after performing a scan on the
rte_devargs list. As such it makes sense to be able to perform a device
hotplug afterward.
Finally, missing this generic interface forces the EAL to be dependent
on vdev-specific API, which hinders the plan of moving the vdev bus to
drivers/bus.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Rami Rosen [Wed, 19 Jul 2017 20:06:06 +0000 (23:06 +0300)]
jobstats: fix typo in doxygen comment
This patch fixes a trivial typo in rte_jobstats.h.
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Yong Wang [Tue, 18 Jul 2017 12:03:07 +0000 (08:03 -0400)]
doc: fix metrics example
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Remy Horton <remy.horton@intel.com>
Remy Horton [Tue, 18 Jul 2017 09:43:47 +0000 (10:43 +0100)]
metrics: fix name string termination
The public API (struct rte_metric_name) includes the NULL terminator
byte in RTE_METRICS_MAX_NAME_LENGTH but the library itself internally
excludes it. This makes it possible for an application to receive an
unterminated name string. Fix be enforcing the NULL termination of all
name strings to the length that the public API expects.
Fixes:
349950ddb9c5 ("metrics: add information metrics library")
Cc: stable@dpdk.org
Signed-off-by: Remy Horton <remy.horton@intel.com>
Cian Ferriter [Fri, 7 Jul 2017 14:17:40 +0000 (15:17 +0100)]
mbuf: fix VXLAN port in comment
IANA assigns a destination port of 4789 for the VXLAN in the Service
Name and Transport Protocol Port Number Registry. This is mentioned in
RFC 7348.
Fixes:
f295a00a2b44 ("mbuf: add definitions of unified packet types")
Cc: stable@dpdk.org
Signed-off-by: Cian Ferriter <cian.ferriter@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Harry van Haaren [Mon, 17 Jul 2017 15:21:54 +0000 (16:21 +0100)]
service: add -S corelist option
This commit allows the -S (captial 's') to be used to indicate
a corelist for Services. This is a "nice to have" patch, and does
not modify any of the service core functionality.
Suggested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Suggested-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Hemant Agrawal [Mon, 17 Jul 2017 08:43:10 +0000 (14:13 +0530)]
bus/fslmc: remove workaround for smmu mapping
This is not required any more for A72 based dpaa2 systems.
(A57 based platform is not in production anymore)
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Jerin Jacob [Mon, 10 Jul 2017 16:59:46 +0000 (22:29 +0530)]
ethdev: introduce lock-free Tx queue capability
Introducing the DEV_TX_OFFLOAD_MT_LOCKFREE TX capability flag.
if a PMD advertises DEV_TX_OFFLOAD_MT_LOCKFREE capable, multiple threads
can invoke rte_eth_tx_burst() concurrently on the same tx queue without
SW lock. This PMD feature will be useful in the following use cases and
found in the OCTEON family of NPUs.
1) Remove explicit spinlock in some applications where lcores
to TX queues are not mapped 1:1.
example: OVS has such instance
https://github.com/openvswitch/ovs/blob/master/lib/netdev-dpdk.c#L299
https://github.com/openvswitch/ovs/blob/master/lib/netdev-dpdk.c#L1859
See the the usage of tx_lock spinlock.
2) In the eventdev use case, avoid dedicating a separate TX core for
transmitting and thus enables more scaling as all workers can
send the packets.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Harry van Haaren [Tue, 11 Jul 2017 14:19:31 +0000 (15:19 +0100)]
event/sw: add service capability
This commit shows how easy it is to enable a specific
DPDK component with a service callback, in order to get
CPU cycles for it.
The beauty of this method is that the service is unaware
of how much CPU time it is getting - the application can
decide how to split and slice cores and map them to the
registered services.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Harry van Haaren [Tue, 11 Jul 2017 14:19:30 +0000 (15:19 +0100)]
service: add unit tests
Add a bunch of unit tests, to ensure that the service
core functions are operating as expected.
As part of these tests a dummy service is registered which
allows identifying if a service callback has been invoked
by using the CPU tick counter. This allows identifying if
functions to start and stop service lcores are actually having
effect.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Harry van Haaren [Tue, 11 Jul 2017 14:19:29 +0000 (15:19 +0100)]
service: add coremask option -s
Add logic for parsing a coremask from EAL, which allows
the application to be unaware of the cores being taken from
its coremask.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>