|
Revision tags: v24.11, v24.11-rc4, v24.11-rc3, v24.11-rc2, v24.11-rc1 |
|
| #
719834a6 |
| 20-Sep-2024 |
Mattias Rönnblom <mattias.ronnblom@ericsson.com> |
use C linkage where appropriate in headers
Assure that 'extern "C" { /../ }' do not cover files included from a particular header file, and address minor issues resulting from this change of order.
use C linkage where appropriate in headers
Assure that 'extern "C" { /../ }' do not cover files included from a particular header file, and address minor issues resulting from this change of order.
Dealing with C++ should delegate to the individual include file level, rather than being imposed by the user of that file. For example, forcing C linkage prevents __Generic macros being replaced with overloaded static inline functions in C++ translation units.
Eliminate 'extern "C"' from files which do not declare any symbols (e.g., only macros or struct types).
On the other hand, the headers check is too naive in assuming that all headers must contain a 'extern "C"'. Such a check was added in commit 1ee492bdc4ff ("buildtools/chkincs: check missing C++ guards"). Since this current change results in many headers not containing such a token, remove the check for 'extern "C"' until we have a better implementation.
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Signed-off-by: David Marchand <david.marchand@redhat.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, v24.03-rc2, v24.03-rc1 |
|
| #
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 ...
|
| #
8e2407e4 |
| 06-Dec-2023 |
David Marchand <david.marchand@redhat.com> |
lib: add newline in logs
Fix places leading to a log message not terminated with a newline.
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Stephen Hemminge
lib: add newline in logs
Fix places leading to a log message not terminated with a newline.
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-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, v23.07, v23.07-rc4, v23.07-rc3 |
|
| #
1f00a6a0 |
| 11-Jul-2023 |
Kaiyu Zhang <squirrel.prog@gmail.com> |
ethdev: fix potential leak in PCI probing helper
Sanity check is performed after a rte_eth_dev object is allocated.
The object is not freed if the check fails, though in the current reality this ne
ethdev: fix potential leak in PCI probing helper
Sanity check is performed after a rte_eth_dev object is allocated.
The object is not freed if the check fails, though in the current reality this never happens, but it's better programming paradigm to move the quick check up front to the start of rte_eth_dev_pci_generic_probe().
Fixes: dcd5c8112bc3 ("ethdev: add PCI driver helpers") Cc: stable@dpdk.org
Signed-off-by: Kaiyu Zhang <squirrel.prog@gmail.com> Reviewed-by: Chengwen Feng <fengchengwen@huawei.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
show more ...
|
|
Revision tags: 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 |
|
| #
1f37cb2b |
| 28-Jul-2022 |
David Marchand <david.marchand@redhat.com> |
bus/pci: make driver-only headers private
The pci bus interface is for drivers only. Mark as internal and move the header in the driver headers list.
While at it, cleanup the code: - fix indentatio
bus/pci: make driver-only headers private
The pci bus interface is for drivers only. Mark as internal and move the header in the driver headers list.
While at it, cleanup the code: - fix indentation, - remove unneeded reference to bus specific singleton object, - remove unneeded list head structure type, - reorder the definitions and macro manipulating the bus singleton object, - remove inclusion of rte_bus.h and fix the code that relied on implicit inclusion,
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Rosen Xu <rosen.xu@intel.com>
show more ...
|
| #
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 ...
|
|
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 |
|
| #
5ed2a2d4 |
| 15-Feb-2022 |
Bruce Richardson <bruce.richardson@intel.com> |
ethdev: fix cast for C++ compatibility
C++ does not allow implicit conversion to/from void*, so we need an explicit cast to allow the driver SDK header to be included from C++ code.
Fixes: e489007a
ethdev: fix cast for C++ compatibility
C++ does not allow implicit conversion to/from void*, so we need an explicit cast to allow the driver SDK header to be included from C++ code.
Fixes: e489007a411c ("ethdev: add generic create/destroy ethdev APIs") Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
show more ...
|
| #
dbf9fc1d |
| 16-Feb-2022 |
Brian Dooley <brian.dooley@intel.com> |
ethdev: add missing C++ guards
Some public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards.
Fixes: 7a3f27cbf59b ("ethdev: add acc
ethdev: add missing C++ guards
Some public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards.
Fixes: 7a3f27cbf59b ("ethdev: add access to specific device info") Fixes: dcd5c8112bc3 ("ethdev: add PCI driver helpers") Fixes: 7f0a669e7b04 ("ethdev: add allocation helper for virtual drivers") Fixes: 7a3357205755 ("lib: remove C++ include guard from private headers") Cc: stable@dpdk.org
Signed-off-by: Brian Dooley <brian.dooley@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
show more ...
|
|
Revision tags: v22.03-rc1, v21.11, v21.11-rc4, v21.11-rc3, v21.11-rc2, v21.11-rc1 |
|
| #
d61138d4 |
| 22-Oct-2021 |
Harman Kalra <hkalra@marvell.com> |
drivers: remove direct access to interrupt handle
Removing direct access to interrupt handle structure fields, rather use respective get set APIs for the same. Making changes to all the drivers acce
drivers: remove direct access to interrupt handle
Removing direct access to interrupt handle structure fields, rather use respective get set APIs for the same. Making changes to all the drivers access the interrupt handle fields.
Signed-off-by: Harman Kalra <hkalra@marvell.com> Acked-by: Hyong Youb Kim <hyonkim@cisco.com> Signed-off-by: David Marchand <david.marchand@redhat.com> Tested-by: Raslan Darawsheh <rasland@nvidia.com>
show more ...
|
| #
17faaed8 |
| 21-Oct-2021 |
Huisong Li <lihuisong@huawei.com> |
ethdev: fix PCI device release in secondary process
In secondary process, rte_eth_dev_close() doesn't clear eth_dev->data. If calling rte_dev_remove() after rte_eth_dev_close(), in rte_eth_dev_pci_g
ethdev: fix PCI device release in secondary process
In secondary process, rte_eth_dev_close() doesn't clear eth_dev->data. If calling rte_dev_remove() after rte_eth_dev_close(), in rte_eth_dev_pci_generic_remove() function, the released eth device still can be found by its name in shared memory. As a result, the eth device will be released repeatedly. The state of the eth device is modified to RTE_ETH_DEV_UNUSED after rte_eth_dev_close(). So this state can be used to avoid this problem.
Fixes: dcd5c8112bc3 ("ethdev: add PCI driver helpers") Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
| #
0d9f56a8 |
| 20-Oct-2021 |
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> |
ethdev: fix Ethernet spelling
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
|
|
Revision tags: v21.08, v21.08-rc4, v21.08-rc3, v21.08-rc2, v21.08-rc1, v21.05, v21.05-rc4, v21.05-rc3, v21.05-rc2, v21.05-rc1 |
|
| #
99a2dd95 |
| 20-Apr-2021 |
Bruce Richardson <bruce.richardson@intel.com> |
lib: remove librte_ prefix from directory names
There is no reason for the DPDK libraries to all have 'librte_' prefix on the directory names. This prefix makes the directory names longer and also m
lib: remove librte_ prefix from directory names
There is no reason for the DPDK libraries to all have 'librte_' prefix on the directory names. This prefix makes the directory names longer and also makes it awkward to add features referring to individual libraries in the build - should the lib names be specified with or without the prefix. Therefore, we can just remove the library prefix and use the library's unique name as the directory name, i.e. 'eal' rather than 'librte_eal'
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|