Load huge realloc_sections.ini file to check malloc/realloc
ability of cfgfile library.
Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This patch adds functional and performance tests for membership
library.
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
xmem_size and xmem_usage need to know the status of mempool flags,
so add 'flags' arg in _xmem_size/usage() api.
Following patch will make use of that.
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Extend port_id definition from uint8_t to uint16_t in lib and drivers
data structures, specifically rte_eth_dev_data. Modify the APIs,
drivers and app using port_id at the same time.
Fix some checkpatch issues from the original code and remove some
unnecessary cast operations.
release_17_11 and deprecation docs have been updated in this patch.
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This should be an comparison operation rather than an assignment
operation.
Fixes: 5e41ab250d ("app/test: unit tests for bonding mode 4")
Cc: stable@dpdk.org
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
The define RTE_RING_SZ_MASK is the maximum size supported by the
rte_ring. The size is checked at ring creation.
There is no reason today to mask the result of
rte_ring_sp_enqueue_burst() or rte_ring_sc_dequeue_burst() with this
value. The flag RTE_RING_QUOT_EXCEED was previously included in the
returned value but it was removed in
commit 77dd306427 ("ring: remove watermark support").
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
This patch fixes the dynamic log levels testing in logs_autotest.
Introduction of rte_log_set_level() in patch c1b5fa94a4 was done
with parameter RTE_LOG_EMERG which caused all RTE_LOG() calls an
early return due to all given levels were far below EMERG.
If first two logs supposed to show up on console, the initial log
level must be low (DEBUG). It is than changed above ERR when we test
if TESTAPP2 log type can be filtered by log type log level.
Fixes: c1b5fa94a4 ("eal: support dynamic log types")
Signed-off-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lcore_states store the state of the lcore. Fixing the invalid
dereference of lcore_states with service number
Unit test case service_lcore_start_stop fails with the above fix.
Service core was stopped without stopping the service.
This commit fixes the test by adding negative and positive cases of
stopping the service lcore before and after stopping the service
respectively
Fixes: 21698354c8 ("service: introduce service cores concept")
Fixes: f038a81e1c ("service: add unit tests")
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
This commit adds a new flag that the component (or "backend")
can use to indicate readyness. The service function callback
will not be called until the component sets itself as ready.
The use-case behind adding this feature is eg: a service that
requires configuration before it can start. Any service that
emulates an ethdev will have rte_eth_dev_configure() called,
and only after that the service will know how many queues/etc
to allocate. Once that configuration is complete, the service
marks itself as ready using rte_service_component_runstate_set().
This feature request results from prototyping services, and
requiring a flag in each service to note "internal" readyness.
Instead that logic is now lifted to the service library.
The unit tests have been updated to test the component runstate.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
This commit reworks the service_get_by_name() function to
accept an integer, and removes the service_get_by_id() function.
All functions now accept an integer argument representing the
service, so it is no longer required to expose the service_spec
pointers to the application.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
This commit reworks the unregister API to accept an integer.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
This commit reworks the statistics functions to use integer ids
for services instead of pointers. Passing UINT32_MAX to the dump
function prints all info, similar to passing NULL previously.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
This commit reworks the API to move from two separate start
and stop functions, to a "runstate" API which allows setting
the runstate. The is_running API is replaced with an function
to query the runstate. The runstate functions take a id value
for service. Unit tests and the eventdev sw pmd are updated.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
This commit reworks the service register function to accept
an extra parameter. The parameter is a uint32_t *, which when
provided will be set to the integer service_id that the newly
registered service is represented by.
This is useful for services that wish to validate settings at
a later point in time - they need to know their own service id.
This commit updates the eventdev sw pmd, as well as unit tests
to use the new register API.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
This commit updates the APIs exposed to map service cores and
services. The previous APIs required a pointer to a service,
and used two separate functions for enable and disable. The
new API uses an integer ID for the service and has a parameter
for map or unmap. Unit tests are updated and passing, and the
map file is updated to the new function names.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
This commit adds a macro to easily validate a service ID, and then
lookup the service pointer, or return a user-specified error code.
This macro will be heavily used in the following patches as it will
be ID based instead of pointer-based.
The probe_capability function is reworked to use an integer ID instead
of a pointer. Rework the service_get_name() function is updated to use
IDs. Unit tests are updated to keep things compiling after each commit.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Fixes: 7a364faef1 ("cryptodev: remove crypto device type enumeration")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Bonding devices name must start with "net_bonding" prefix.
Fixes: 9bf4901d1a ("bus/vdev: remove probe with driver name option")
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Drivers are looking by name of the device so change namespace to proper
one.
Fixes: 43b630244e ("app/test: add dynamic bonding RSS configuration")
Cc: stable@dpdk.org
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
When test case "test_balance_l23_tx_burst_ipv4_toggle_ip_addr" is
calling balance_l23_tx_burst(), the ip_addr instead of mac_addr
should be toggled according to the test name.
Fixes: 92073ef961 ("bond: unit tests")
Cc: stable@dpdk.org
Signed-off-by: Herbert Guan <herbert.guan@arm.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Declan Doherty <declan.doherty@intel.com>
There were double-free problems in some test cases, which will cause
a duplicated mbuf will be added into mempool. After double-free,
some new allocated mbuf will hold a same address and thus cause the
memory corruption.
Another minor issue is that in some test cases, allocated mbuf will
not be released after test case exits. Hopefully these leaked mbuf
will be released by the next test case in its setup phase when
stopping the virtual pmd ports, while this do is a memory leak of
the exited test case.
To fix above 2 issues, this patch will do:
1) Release virtual pmd ports' tx queue in the clean up function
remove_slaves_and_stop_bonded_device() of each test cases.
2) Do not release allocated mbufs for test bursts. These mbufs
will be released in remove_slaves_and_stop_bonded_device() when
test case exits.
Fixes: 92073ef961 ("bond: unit tests")
Signed-off-by: Herbert Guan <herbert.guan@arm.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Device name in device structure in virtual device used in
link_bonding_autotest is not set what causes segmentation fault when
rte_eth_dev_allocated is called.
Fixes: a1e7c17555 ("ethdev: use device name from device structure")
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
When calling rte_cryptodev_sym_session_init(),
if there was an error, it returned -1, instead
of returning the specific error code, which can
be valuable for the application for error handling.
Fixes: b3bbd9e5f2 ("cryptodev: support device independent sessions")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
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>
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: 681f540da5 ("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>
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: 1703e94ac5 ("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>
Session was NULL as test_crypto_session not initialised.
Fixes: b3bbd9e5f2 ("cryptodev: support device independent sessions")
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
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 bd279a7936.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
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>
Because accuracy of timing to the microsecond is not guaranteed
in rte_eal_alarm_set, this function will not be called before
the requested time, but may be called a period of time
afterwards which can not be calculated. In order to ensure
test alarm running success, this patch added the delay time
before check the flag.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Virtual device/driver probing done via name.
A new alternative method introduced to probe the device with providing
driver name in devargs as "driver=<driver_name>".
This patch removes alternative method and fixes virtual device usages
with proper device names.
Fixes: 87c3bf29c6 ("test: do not short-circuit null device creation")
Fixes: d39670086a ("eal: parse driver argument before probing drivers")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
rte_devargs now represents any device from any bus.
The related devtypes do not identify a bus anymore, only which scan
policy the device subscribes to.
The bus itself is identified by a bus handle previously introduced.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Remove the dependency of this subsystem upon bus specific device
representation.
Devargs only validates that a device declaration is correct and handled
by a bus. The device interpretation is done afterward within the bus.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Replace the incorrect reference to "Cavium Networks", "Cavium Ltd"
company name with correct the "Cavium, Inc" company name in
copyright headers.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Add some basic tests for the event ring functions. Not everything needs
testing as there is so much code re-use from the rte_ring code.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
The session mempool pointer is needed in each queue pair,
if session-less operations are being handled.
Therefore, the API is changed to accept this parameter,
as the session mempool is created outside the
device configuration function, similar to what ethdev
does with the rx queues.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Change crypto device's session management to make it
device independent and simplify architecture when session
is intended to be used on more than one device.
Sessions private data is agnostic to underlying device
by adding an indirection in the sessions private data
using the crypto driver identifier.
A single session can contain indirections to multiple device types.
New function rte_cryptodev_sym_session_init has been created,
to initialize the driver private session data per driver to be
used on a same session, and rte_cryptodev_sym_session_clear
to clear this data before calling rte_cryptodev_sym_session_free.
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Instead of creating the session mempool while configuring
the crypto device, apps will create the mempool themselves.
This way, it gives flexibility to the user to have a single
mempool for all devices (as long as the objects are big
enough to contain the biggest private session size) or
separate mempools for different drivers.
Also, since the mempool is now created outside the
device configuration function, now it needs to be passed
through this function, which will be eventually passed
when setting up the queue pairs, as ethernet devices do.
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Remove crypto device driver name string definitions from librte_cryptodev,
which avoid to library changes every time a new crypto driver was added.
The driver name is predefined internaly in the each PMD.
The applications could use the crypto device driver names based on
options with the driver name string provided in command line.
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Changes device type identification to be based on a unique
driver id replacing the current device type enumeration, which needed
library changes every time a new crypto driver was added.
The driver id is assigned dynamically during driver registration using
the new macro RTE_PMD_REGISTER_CRYPTO_DRIVER which returns a unique
uint8_t identifier for that driver. New APIs are also introduced
to allow retrieval of the driver id using the driver name.
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
QAT, OpenSSL and DPAA2 PMDs support 192-bit and 256-bit key sizes
for AES-GCM, apart from 128-bit keys. Therefore, these tests that were
only used by AES-NI MB PMD are extended to these other two PMDs.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Added AES GCM tests for 192-bit keys, now that AES GCM PMD
supports it.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
AES-GCM tests are used for AES-NI MB, OpenSSL,
QAT and DPAA2_SEC PMDs, so they are not specific to the first one.
Therefore, _mb_ prefix can be removed.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>