#
f665790a |
| 13-Dec-2023 |
David Marchand <david.marchand@redhat.com> |
drivers: remove redundant newline from logs
Fix places where two newline characters may be logged.
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Chengwen
drivers: remove redundant newline from logs
Fix places where two newline characters may be logged.
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com>
show more ...
|
#
a04322f6 |
| 28-Jul-2022 |
David Marchand <david.marchand@redhat.com> |
bus: hide bus object
Make rte_bus opaque for non internal users. This will make extending this object possible without breaking the ABI.
Introduce a new driver header and move rte_bus definition an
bus: hide bus object
Make rte_bus opaque for non internal users. This will make extending this object possible without breaking the ABI.
Introduce a new driver header and move rte_bus definition and helpers. Update drivers and library to use the internal header.
Some applications may have been dereferencing rte_bus objects, mark this object's accessors as stable.
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|
#
770ebc06 |
| 28-Jul-2022 |
David Marchand <david.marchand@redhat.com> |
bus: move IOVA definition from header
iova enum definition does not need to be defined as part of the bus API. Move it to rte_eal.h. With this step, rte_eal.h does not depend on rte_bus.h and rte_de
bus: move IOVA definition from header
iova enum definition does not need to be defined as part of the bus API. Move it to rte_eal.h. With this step, rte_eal.h does not depend on rte_bus.h and rte_dev.h. Fix existing code that was relying on these implicit inclusions.
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|
#
64051bb1 |
| 13-Apr-2021 |
Xueming Li <xuemingl@nvidia.com> |
devargs: unify scratch buffer storage
In current design, legacy parser rte_devargs_parse() saved scratch buffer to devargs.args while new parser rte_devargs_layers_parse() saved to devargs.data. Cod
devargs: unify scratch buffer storage
In current design, legacy parser rte_devargs_parse() saved scratch buffer to devargs.args while new parser rte_devargs_layers_parse() saved to devargs.data. Code using devargs had to know the difference and cleaned up memory accordingly - error prone.
This patch unifies scratch buffer to data field, introduces rte_devargs_reset() function to wrap the memory clean up logic.
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Ray Kinsella <mdr@ashroe.eu> Reviewed-by: Gaetan Rivet <grive@u256.net>
show more ...
|
#
75b66dec |
| 06-Jun-2019 |
Ilya Maximets <i.maximets@samsung.com> |
eal: fix positive error codes from probe/remove
According to API, 'rte_dev_probe()' and 'rte_dev_remove()' must return 0 or negative error code. Bus code returns positive values if device wasn't rec
eal: fix positive error codes from probe/remove
According to API, 'rte_dev_probe()' and 'rte_dev_remove()' must return 0 or negative error code. Bus code returns positive values if device wasn't recognized by any driver, so the result of 'bus->plug/unplug()' must be converted. 'local_dev_probe()' and 'local_dev_remove()' also has their internal API, so the conversion should be done there.
Positive on remove means that device not found by driver. Positive on probe means that there are no suitable buses/drivers, i.e. device is not supported.
Users of these API fixed to provide a good example by respecting DPDK API. This also will allow to catch such issues in the future.
Fixes: a3ee360f4440 ("eal: add hotplug add/remove device") Fixes: 244d5130719c ("eal: enable hotplug on multi-process") Cc: stable@dpdk.org
Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
show more ...
|
#
6723c0fc |
| 03-Apr-2019 |
Bruce Richardson <bruce.richardson@intel.com> |
replace snprintf with strlcpy
Do a global replace of snprintf(..."%s",...) with strlcpy, adding in the rte_string_fns.h header if needed. The function changes in this patch were auto-generated via
replace snprintf with strlcpy
Do a global replace of snprintf(..."%s",...) with strlcpy, adding in the rte_string_fns.h header if needed. The function changes in this patch were auto-generated via command:
spatch --sp-file devtools/cocci/strlcpy.cocci --dir . --in-place
and then the files edited using awk to add in the missing header:
gawk -i inplace '/include <rte_/ && ! seen { \ print "#include <rte_string_fns.h>"; seen=1} {print}'
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|
#
2f4b9983 |
| 18-Mar-2019 |
Raslan Darawsheh <rasland@mellanox.com> |
net/failsafe: replace sub-device pointer with port id
In multiprocess context, the pointer to sub-device is shared between processes. Previously, it was a pointer to per process eth_dev so it's need
net/failsafe: replace sub-device pointer with port id
In multiprocess context, the pointer to sub-device is shared between processes. Previously, it was a pointer to per process eth_dev so it's needed to replace this dependency.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Signed-off-by: Raslan Darawsheh <rasland@mellanox.com> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
show more ...
|
#
fa7bb47a |
| 18-Mar-2019 |
Raslan Darawsheh <rasland@mellanox.com> |
net/failsafe: change back-reference from sub-device
In multiprocess context, the sub-device structure is shared between processes. The reference to the failsafe device was a per process pointer. It'
net/failsafe: change back-reference from sub-device
In multiprocess context, the sub-device structure is shared between processes. The reference to the failsafe device was a per process pointer. It's changed to port id which is the same for all processes.
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
show more ...
|
#
911462eb |
| 07-Sep-2018 |
Thomas Monjalon <thomas@monjalon.net> |
eal: simplify parameters of hotplug functions
All information about a device to probe can be grouped in a common string, which is what we usually call devargs. An application should not have to pars
eal: simplify parameters of hotplug functions
All information about a device to probe can be grouped in a common string, which is what we usually call devargs. An application should not have to parse this string before calling the EAL probe function. And the syntax could evolve to be more complex and support matching multiple devices in one string. That's why the bus name and device name should be removed from rte_eal_hotplug_add(). Instead of changing this function, a simpler one is added and used in the old one, which may be deprecated later.
When removing a device, we already know its rte_device handle which can be directly passed as parameter of rte_eal_hotplug_remove(). If the rte_device is not known, it can be retrieved with the devargs, by iterating in the device list (future RTE_DEV_FOREACH()). Similarly to the probing case, a new function is added and used in the old one, which may be deprecated later. The new function is used in failsafe, because the replacement is easy.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
a23bc2c4 |
| 11-Jul-2018 |
Gaetan Rivet <gaetan.rivet@6wind.com> |
devargs: add non-variadic parsing function
rte_devargs_parse becomes non-variadic, rte_devargs_parsef becomes the variadic version, to be used to compose device strings.
Signed-off-by: Gaetan Rivet
devargs: add non-variadic parsing function
rte_devargs_parse becomes non-variadic, rte_devargs_parsef becomes the variadic version, to be used to compose device strings.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
show more ...
|
#
7fda13d3 |
| 10-May-2018 |
Matan Azrad <matan@mellanox.com> |
net/failsafe: fix sub-device ownership race
There is time between the sub-device port probing by the sub-device PMD to the sub-device port ownership taking by a fail-safe port.
In this time, the po
net/failsafe: fix sub-device ownership race
There is time between the sub-device port probing by the sub-device PMD to the sub-device port ownership taking by a fail-safe port.
In this time, the port is available for the application usage. For example, the port will be exposed to the applications which use RTE_ETH_FOREACH_DEV iterator.
Thus, ownership unaware applications may manage the port in this time what may cause a lot of problematic behaviors in the fail-safe sub-device initialization.
Register to the ethdev NEW event to take the sub-device port ownership before it becomes exposed to the application.
Fixes: a46f8d584eb8 ("net/failsafe: add fail-safe PMD") Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
19581426 |
| 10-May-2018 |
Thomas Monjalon <thomas@monjalon.net> |
net/failsafe: fix sub-device visibility
The iterator function rte_eth_find_next_owned_by(), used by the iterator macro RTE_ETH_FOREACH_DEV_OWNED_BY, are ignoring the devices which are neither ATTACH
net/failsafe: fix sub-device visibility
The iterator function rte_eth_find_next_owned_by(), used by the iterator macro RTE_ETH_FOREACH_DEV_OWNED_BY, are ignoring the devices which are neither ATTACHED nor REMOVED. Thus sub-devices, having the state DEFERRED, cannot be seen with the ethdev iterator. The state RTE_ETH_DEV_DEFERRED can be replaced by RTE_ETH_DEV_ATTACHED + owner.
Fixes: dcd0c9c32b8d ("net/failsafe: use ownership mechanism for slaves") Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Matan Azrad <matan@mellanox.com> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
8e6c3b79 |
| 23-Apr-2018 |
Gaetan Rivet <gaetan.rivet@6wind.com> |
devargs: use proper namespace prefix
rte_eal_devargs is useless, rte_devargs is sufficient.
Only experimental functions are changed for now.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com> Ac
devargs: use proper namespace prefix
rte_eal_devargs is useless, rte_devargs is sufficient.
Only experimental functions are changed for now.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
show more ...
|
#
9e6b5ea9 |
| 23-Apr-2018 |
Gaetan Rivet <gaetan.rivet@6wind.com> |
devargs: make parsing variadic
rte_eal_devargs_parse can be used by EAL subsystems, drivers, applications alike.
Device parameters may be presented with different structure each time; as a single d
devargs: make parsing variadic
rte_eal_devargs_parse can be used by EAL subsystems, drivers, applications alike.
Device parameters may be presented with different structure each time; as a single declaration string or several strings each describing different parts of the declaration.
To simplify the use of this parsing facility, its parameters are made variadic.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
show more ...
|
#
5feecc57 |
| 20-Mar-2018 |
Shahaf Shuler <shahafs@mellanox.com> |
align SPDX Mellanox copyrights
Aligning Mellanox SPDX copyrights to a single format. In addition replace to SPDX licence files which were missed.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
align SPDX Mellanox copyrights
Aligning Mellanox SPDX copyrights to a single format. In addition replace to SPDX licence files which were missed.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
show more ...
|
#
9df324ad |
| 01-Feb-2018 |
Gaetan Rivet <gaetan.rivet@6wind.com> |
net/failsafe: fix error string after ownership call
Ownership API returns a negative value, strerror expects a valid errno value, thus positive.
Coverity issue: 260401 Fixes: dcd0c9c32b8d ("net/fai
net/failsafe: fix error string after ownership call
Ownership API returns a negative value, strerror expects a valid errno value, thus positive.
Coverity issue: 260401 Fixes: dcd0c9c32b8d ("net/failsafe: use ownership mechanism for slaves")
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
show more ...
|
#
009c327c |
| 29-Jan-2018 |
Olivier Matz <olivier.matz@6wind.com> |
net/failsafe: use SPDX tags in 6WIND copyrighted files
Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Thomas Monjalon <thomas@
net/failsafe: use SPDX tags in 6WIND copyrighted files
Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
show more ...
|
#
dcd0c9c3 |
| 22-Jan-2018 |
Matan Azrad <matan@mellanox.com> |
net/failsafe: use ownership mechanism for slaves
Fail-safe PMD sub devices management is based on ethdev port mechanism. So, the sub-devices management structures are exposed to other DPDK entities
net/failsafe: use ownership mechanism for slaves
Fail-safe PMD sub devices management is based on ethdev port mechanism. So, the sub-devices management structures are exposed to other DPDK entities which may use them in parallel to fail-safe PMD.
Use the new port ownership mechanism to avoid multiple managments of fail-safe PMD sub-devices.
Signed-off-by: Matan Azrad <matan@mellanox.com> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
show more ...
|
#
53a2d53f |
| 18-Jan-2018 |
Matan Azrad <matan@mellanox.com> |
net/failsafe: add probed device capture
Previous fail-safe code didn't support probed sub-devices capture and failed when it tried to probe them.
Skip fail-safe sub-device probing when it already w
net/failsafe: add probed device capture
Previous fail-safe code didn't support probed sub-devices capture and failed when it tried to probe them.
Skip fail-safe sub-device probing when it already was probed.
Signed-off-by: Matan Azrad <matan@mellanox.com> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
show more ...
|
#
b8f4fa41 |
| 19-Oct-2017 |
Raslan Darawsheh <rasland@mellanox.com> |
net/failsafe: fix PCI devices init
When trying to attach a port as a sub-device, the ethdev port was compared with devargs. In the case of a PCI device, the name in devargs is the PCI address. And s
net/failsafe: fix PCI devices init
When trying to attach a port as a sub-device, the ethdev port was compared with devargs. In the case of a PCI device, the name in devargs is the PCI address. And since DPDK 17.08, the devargs name of the underlying device was used to match an ethdev port: a1e7c17555e8 ("ethdev: use device name from device structure")
But the recent commit 72e3efb149cc has reverted this wrong matching to use the ethdev port name as identifier of the port. It impacts functions like rte_eth_dev_allocated() used in failsafe for matching ports with given devargs. The fix is to search for matching devargs in underlying device of all ethdev ports. If many ports match the same PCI device, only the first one is matched.
This limitation was already present in previous implementation of rte_eth_dev_allocated(), and must be adressed later with a better devargs syntax.
Fixes: 72e3efb149cc ("ethdev: revert use port name from device structure") Cc: stable@dpdk.org
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
show more ...
|
#
6969a22b |
| 29-Aug-2017 |
Raslan Darawsheh <rasland@mellanox.com> |
net/failsafe: fix failsafe bus uninit return value
fs_bus_uninit is always returning 0 no matter what was the status of each sub device bus_uninit value.
Fixes: a46f8d584eb8 ("net/failsafe: add fai
net/failsafe: fix failsafe bus uninit return value
fs_bus_uninit is always returning 0 no matter what was the status of each sub device bus_uninit value.
Fixes: a46f8d584eb8 ("net/failsafe: add fail-safe PMD") Cc: stable@dpdk.org
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
show more ...
|
#
598fb8ae |
| 18-Jul-2017 |
Gaetan Rivet <gaetan.rivet@6wind.com> |
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 recollecti
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>
show more ...
|
#
b737a1ee |
| 18-Jul-2017 |
Gaetan Rivet <gaetan.rivet@6wind.com> |
net/failsafe: support flow API
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com> Acked-by: Olga Shern <olgas@mellanox.com>
|
#
ebea83f8 |
| 18-Jul-2017 |
Gaetan Rivet <gaetan.rivet@6wind.com> |
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 configuratio
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>
show more ...
|
#
a46f8d58 |
| 18-Jul-2017 |
Gaetan Rivet <gaetan.rivet@6wind.com> |
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 suppo
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>
show more ...
|