|
Revision tags: v24.11, v24.11-rc4, v24.11-rc3, v24.11-rc2, v24.11-rc1 |
|
| #
5e46b176 |
| 11-Oct-2024 |
Dariusz Sosnowski <dsosnowski@nvidia.com> |
ethdev: add restore flags as driver callback
Before this patch, ethdev layer assumed that all drivers require that it has to forcefully restore:
- MAC addresses - promiscuous mode setting - all mul
ethdev: add restore flags as driver callback
Before this patch, ethdev layer assumed that all drivers require that it has to forcefully restore:
- MAC addresses - promiscuous mode setting - all multicast mode setting
upon rte_eth_dev_start().
This patch introduces a new callback to eth_dev_ops - get_restore_flags(). Drivers implementing this callback can explicitly enable/disable certain parts of config restore procedure.
In order to minimize the changes to all the drivers and preserve the current behavior, it is assumed that if this callback is not defined, all configuration should be restored.
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com> Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
show more ...
|
|
Revision tags: v24.07, v24.07-rc4, v24.07-rc3 |
|
| #
ed34d87d |
| 22-Jul-2024 |
Bruce Richardson <bruce.richardson@intel.com> |
ethdev: fix device init without socket-local memory
When allocating memory for an ethdev, the rte_malloc_socket call used only allocates memory on the NUMA node/socket local to the device. This mean
ethdev: fix device init without socket-local memory
When allocating memory for an ethdev, the rte_malloc_socket call used only allocates memory on the NUMA node/socket local to the device. This means that even if the user wanted to, they could never use a remote NIC without also having memory on that NIC's socket.
For example, if we change examples/skeleton/basicfwd.c to have SOCKET_ID_ANY as the socket_id parameter for Rx and Tx rings, we should be able to run the app cross-numa e.g. as below, where the two PCI devices are on socket 1, and core 1 is on socket 0:
./build/examples/dpdk-skeleton -l 1 --legacy-mem --socket-mem=1024,0 \ -a a8:00.0 -a b8:00.0
This fails however, with the error:
ETHDEV: failed to allocate private data PCI_BUS: Requested device 0000:a8:00.0 cannot be used
We can remove this restriction by doing a fallback call to general rte_malloc after a call to rte_malloc_socket fails. This should be safe to do because the later ethdev calls to setup Rx/Tx queues all take a socket_id parameter, which can be used by applications to enforce the requirement for local-only memory for a device, if so desired. [If device-local memory is present it will be used as before, while if not present the rte_eth_dev_configure call will now pass, but the subsequent queue setup calls requesting local memory will fail].
Fixes: e489007a411c ("ethdev: add generic create/destroy ethdev APIs") Fixes: dcd5c8112bc3 ("ethdev: add PCI driver helpers") Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Signed-off-by: Padraig Connolly <padraig.j.connolly@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
show more ...
|
|
Revision tags: v24.07-rc2, v24.07-rc1, v24.03, v24.03-rc4, v24.03-rc3 |
|
| #
aa2f2d33 |
| 11-Mar-2024 |
Thierry Herbelot <thierry.herbelot@6wind.com> |
ethdev: fix representor devargs initialization
rte_eth_devargs_parse() stops initialising eth_devargs variable to zero, which causes regression in ixgbe PCI probe.
Restore the memset for fix.
As t
ethdev: fix representor devargs initialization
rte_eth_devargs_parse() stops initialising eth_devargs variable to zero, which causes regression in ixgbe PCI probe.
Restore the memset for fix.
As the listed commit introduces a new argument: nb_da, the memset takes it into account.
Fixes: 9a9eb104edf6 ("ethdev: parse multiple representor devargs")
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com> Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
show more ...
|
|
Revision tags: v24.03-rc2 |
|
| #
9c0c704a |
| 27-Feb-2024 |
Harman Kalra <hkalra@marvell.com> |
ethdev: fix multiple representor devargs parsing
Fixing uninitialized value access.
Coverity issue: 414934 Fixes: 9a9eb104edf6 ("ethdev: parse multiple representor devargs")
Signed-off-by: Harman
ethdev: fix multiple representor devargs parsing
Fixing uninitialized value access.
Coverity issue: 414934 Fixes: 9a9eb104edf6 ("ethdev: parse multiple representor devargs")
Signed-off-by: Harman Kalra <hkalra@marvell.com> Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
show more ...
|
|
Revision tags: v24.03-rc1 |
|
| #
537bfdda |
| 06-Feb-2024 |
Dariusz Sosnowski <dsosnowski@nvidia.com> |
ethdev: rework fast path async flow API
This patch reworks the async flow API functions called in data path, to reduce the overhead during flow operations at the library level. Main source of the ov
ethdev: rework fast path async flow API
This patch reworks the async flow API functions called in data path, to reduce the overhead during flow operations at the library level. Main source of the overhead was indirection and checks done while ethdev library was fetching rte_flow_ops from a given driver.
This patch introduces rte_flow_fp_ops struct which holds callbacks to driver's implementation of fast path async flow API functions. Each driver implementing these functions must populate flow_fp_ops field inside rte_eth_dev structure with a reference to its own implementation. By default, ethdev library provides dummy callbacks with implementations returning ENOSYS. Such design provides a few assumptions:
- rte_flow_fp_ops struct for given port is always available. - Each callback is either: - Default provided by library. - Set up by driver.
As a result, no checks for availability of the implementation are needed at library level in data path. Any library-level validation checks in async flow API are compiled if and only if RTE_FLOW_DEBUG macro is defined.
This design was based on changes in ethdev library introduced in [1].
These changes apply only to the following API functions:
- rte_flow_async_create() - rte_flow_async_create_by_index() - rte_flow_async_actions_update() - rte_flow_async_destroy() - rte_flow_push() - rte_flow_pull() - rte_flow_async_action_handle_create() - rte_flow_async_action_handle_destroy() - rte_flow_async_action_handle_update() - rte_flow_async_action_handle_query() - rte_flow_async_action_handle_query_update() - rte_flow_async_action_list_handle_create() - rte_flow_async_action_list_handle_destroy() - rte_flow_async_action_list_handle_query_update()
This patch also adjusts the mlx5 PMD to the introduced flow API changes.
[1] commit c87d435a4d79 ("ethdev: copy fast-path API into separate structure")
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com> Acked-by: Ori Kam <orika@nvidia.com> Acked-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
show more ...
|
| #
9a9eb104 |
| 01-Feb-2024 |
Harman Kalra <hkalra@marvell.com> |
ethdev: parse multiple representor devargs
Adding support for parsing multiple representor devargs strings passed to a PCI BDF. There may be scenario where port representors for various PFs or VFs u
ethdev: parse multiple representor devargs
Adding support for parsing multiple representor devargs strings passed to a PCI BDF. There may be scenario where port representors for various PFs or VFs under PFs are required and all these are representor ports shall be backed by single pci device. In such case port representors can be created using devargs string: <PCI BDF>,representor=[pf[0-1],pf2vf[1,2-3],[4-5]]
Adding new eth devargs parsing test cases which can demonstrate valid and invalid usage of devargs patterns.
Signed-off-by: Harman Kalra <hkalra@marvell.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
show more ...
|
| #
08966fe7 |
| 13-Feb-2024 |
Tyler Retzlaff <roretzla@linux.microsoft.com> |
use C11 alignof
Replace use of __alignof__(e) (resp. __alignof__(T) with C11 alignof(typeof(e)) (resp. alignof(T)) to improve portability between toolchains.
Signed-off-by: Tyler Retzlaff <roretzla
use C11 alignof
Replace use of __alignof__(e) (resp. __alignof__(T) with C11 alignof(typeof(e)) (resp. alignof(T)) to improve portability between toolchains.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> Acked-by: Anoob Joseph <anoobj@marvell.com> Acked-by: Volodymyr Fialko <vfialko@marvell.com> Acked-by: Akhil Goyal <gakhil@marvell.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
show more ...
|
| #
0e21c7c0 |
| 07-Dec-2023 |
David Marchand <david.marchand@redhat.com> |
lib: replace logging helpers
This is a preparation step before the next change.
Many libraries have their own logging helpers that do not add a newline in their format string. Some previous changes
lib: replace logging helpers
This is a preparation step before the next change.
Many libraries have their own logging helpers that do not add a newline in their format string. Some previous changes fixed places where some of those helpers are called without a trailing newline. Using RTE_LOG_LINE in the existing helpers will ensure we don't introduce new issues in the future.
The problem is that if we simply convert to the RTE_LOG_LINE helper, a future fix may introduce a regression since the logging helper change won't be backported.
To address this concern, rename existing helpers: backporting a call to them will trigger some conflict or build issue in LTS branches.
Note: - bpf and vhost that still has some debug multilines messages, a direct call to RTE_LOG/RTE_LOG_DP is used: this will make it easier to notice such special cases, - about previously publicly exposed logging helpers, when such helper is not publicly used (iow in public inline API), it is removed from the public API (this is the case for the member library),
Signed-off-by: David Marchand <david.marchand@redhat.com> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
show more ...
|
| #
c07da8e3 |
| 06-Dec-2023 |
David Marchand <david.marchand@redhat.com> |
lib: use dedicated logtypes and macros
No printf! When a dedicated log helper exists, use it. And no usurpation please: a library should log under its logtype (see the eventdev rx adapter update for
lib: use dedicated logtypes and macros
No printf! When a dedicated log helper exists, use it. And no usurpation please: a library should log under its logtype (see the eventdev rx adapter update for example).
Note: the RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET macro is renamed for consistency with the rest of eventdev (private) macros.
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
show more ...
|
|
Revision tags: v23.11, v23.11-rc4, v23.11-rc3, v23.11-rc2, v23.11-rc1 |
|
| #
36c46e73 |
| 27-Sep-2023 |
David Marchand <david.marchand@redhat.com> |
ethdev: cleanup shared data with the last port
If no port is allocated and no port owner is still registered, ethdev from a primary process may release the memzone used to store port data. This make
ethdev: cleanup shared data with the last port
If no port is allocated and no port owner is still registered, ethdev from a primary process may release the memzone used to store port data. This makes it possible for the DPDK memory allocator to release associated resources back to the OS.
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Morten Brørup <mb@smartsharesystems.com>
show more ...
|
| #
7fe371eb |
| 27-Sep-2023 |
David Marchand <david.marchand@redhat.com> |
ethdev: avoid panicking in absence of ethdev shared data
This is a preparation step before freeing the ethdev shared data memzone.
Previously, because the primary process never freed the memzone, a
ethdev: avoid panicking in absence of ethdev shared data
This is a preparation step before freeing the ethdev shared data memzone.
Previously, because the primary process never freed the memzone, a secondary process could assume this memzone was present. But in the next commit, this will change.
Make eth_dev_shared_data_prepare() report whether the memzone is available so that upper level API can react accordingly.
Signed-off-by: David Marchand <david.marchand@redhat.com>
show more ...
|
| #
5fa33785 |
| 27-Sep-2023 |
David Marchand <david.marchand@redhat.com> |
ethdev: protect shared memory accesses under one lock
ethdev currently uses two locks to protect access around eth_dev_shared_data: - one (process local) for avoiding multiple threads to reserve/loo
ethdev: protect shared memory accesses under one lock
ethdev currently uses two locks to protect access around eth_dev_shared_data: - one (process local) for avoiding multiple threads to reserve/lookup the eth_dev_shared_data memzone, - one (shared with other processes) for protecting port allocation/destruction,
A next change will make it possible for eth_dev_shared_data memzone to be freed during a DPDK application lifetime. Accessing its content must then be protected for concurrent accesses and with this new protection, existing locks become unneeded.
Simplify the logic and put everything under a single lock in DPDK shared memory config (which cannot be freed during a DPDK application lifetime).
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Morten Brørup <mb@smartsharesystems.com>
show more ...
|
| #
2744cb6e |
| 13-Sep-2023 |
Thomas Monjalon <thomas@monjalon.net> |
lib: remove pthread.h from includes
The header files should have the minimum embedded includes. The file pthread.h can logically be removed from rte_per_lcore.h and rte_ethdev_core.h files.
Signed-
lib: remove pthread.h from includes
The header files should have the minimum embedded includes. The file pthread.h can logically be removed from rte_per_lcore.h and rte_ethdev_core.h files.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Rosen Xu <rosen.xu@intel.com> Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
show more ...
|
|
Revision tags: v23.07, v23.07-rc4, v23.07-rc3, v23.07-rc2, v23.07-rc1, v23.03, v23.03-rc4, v23.03-rc3, v23.03-rc2, v23.03-rc1, v22.11, v22.11-rc4, v22.11-rc3, v22.11-rc2, v22.11-rc1 |
|
| #
8f1d23ec |
| 23-Aug-2022 |
David Marchand <david.marchand@redhat.com> |
eal: deprecate RTE_FUNC_PTR_* macros
Those macros have no real value and are easily replaced with a simple if() block.
Existing users have been converted using a new cocci script. Deprecate them.
eal: deprecate RTE_FUNC_PTR_* macros
Those macros have no real value and are easily replaced with a simple if() block.
Existing users have been converted using a new cocci script. Deprecate them.
Signed-off-by: David Marchand <david.marchand@redhat.com>
show more ...
|
| #
72b452c5 |
| 27-Aug-2022 |
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> |
eal: remove unneeded includes from a public header
Do not include <ctype.h>, <errno.h>, and <stdlib.h> from <rte_common.h>, because they are not used by this file. Include the needed headers directl
eal: remove unneeded includes from a public header
Do not include <ctype.h>, <errno.h>, and <stdlib.h> from <rte_common.h>, because they are not used by this file. Include the needed headers directly from the files that need them.
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|
|
Revision tags: v22.07, v22.07-rc4, v22.07-rc3, v22.07-rc2, v22.07-rc1, v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2 |
|
| #
68eb9a19 |
| 25-Feb-2022 |
Stephen Hemminger <stephen@networkplumber.org> |
remove extra blank line at EOF
These source files all had unnecessary blank line at end of file.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Revision tags: v22.03-rc1 |
|
| #
4b4f810e |
| 11-Feb-2022 |
Ferruh Yigit <ferruh.yigit@intel.com> |
ethdev: move driver interface functions to its own file
ethdev has two interfaces, one interface between applications and library, these APIs are declared in the rte_ethdev.h public header. Other in
ethdev: move driver interface functions to its own file
ethdev has two interfaces, one interface between applications and library, these APIs are declared in the rte_ethdev.h public header. Other interface is between drivers and library, these functions are declared in ethdev_driver.h and marked as internal.
But all functions are defined in rte_ethdev.c file. This patch moves functions for drivers to its own file, ethdev_driver.c for cleanup, no functional change in functions.
Some public APIs and driver helpers call common internal functions, which were mostly static since both were in same file. To be able to move driver helpers, common functions are moved to ethdev_private.c. (ethdev_private.c is used for functions that are internal to the library and shared by multiple .c files in the ethdev library.)
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
show more ...
|
| #
a41f593f |
| 11-Feb-2022 |
Ferruh Yigit <ferruh.yigit@intel.com> |
ethdev: introduce generic dummy packet burst function
Multiple PMDs have dummy/noop Rx/Tx packet burst functions.
These dummy functions are very simple, introduce a common function in the ethdev an
ethdev: introduce generic dummy packet burst function
Multiple PMDs have dummy/noop Rx/Tx packet burst functions.
These dummy functions are very simple, introduce a common function in the ethdev and update drivers to use it instead of each driver having its own functions.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
show more ...
|