#
fba98755 |
| 10-Jan-2025 |
Andre Muezerie <andremue@linux.microsoft.com> |
lib: replace packed attributes
MSVC struct packing is not compatible with GCC. Replace macro __rte_packed with __rte_packed_begin to push existing pack value and set packing to 1-byte and macro __rt
lib: replace packed attributes
MSVC struct packing is not compatible with GCC. Replace macro __rte_packed with __rte_packed_begin to push existing pack value and set packing to 1-byte and macro __rte_packed_end to restore the pack value prior to the push.
Macro __rte_packed_end is deliberately utilized to trigger a MSVC compiler warning if no existing packing has been pushed allowing easy identification of locations where the __rte_packed_begin is missing.
Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
show more ...
|
#
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 ...
|
#
4dd146e5 |
| 08-Sep-2023 |
Artemy Kovalyov <artemyko@nvidia.com> |
mem: annotate locks for memseg list walk
Implementing a lock annotation for rte_memseg_list_walk() to proactively identify bugs similar to memory_hotplug_lock deadlock during initialization during c
mem: annotate locks for memseg list walk
Implementing a lock annotation for rte_memseg_list_walk() to proactively identify bugs similar to memory_hotplug_lock deadlock during initialization during compile time.
Signed-off-by: Artemy Kovalyov <artemyko@nvidia.com> Acked-by: David Marchand <david.marchand@redhat.com>
show more ...
|
#
971d2b57 |
| 11-Aug-2023 |
Tyler Retzlaff <roretzla@linux.microsoft.com> |
remove C11 compatibility macro
C11 conformant compiler is documented as a minimum requirement to build and consume DPDK. Remove use of RTE_STD_C11 macro marking use of C11 features with __extension_
remove C11 compatibility macro
C11 conformant compiler is documented as a minimum requirement to build and consume DPDK. Remove use of RTE_STD_C11 macro marking use of C11 features with __extension__ since it is no longer necessary and then remove definition of RTE_STD_C11 macro.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
show more ...
|
#
1094dd94 |
| 28-Oct-2022 |
David Marchand <david.marchand@redhat.com> |
cleanup compat header inclusions
With symbols going though experimental/stable stages, we accumulated a lot of discrepancies about inclusion of the rte_compat.h header.
Some headers are including i
cleanup compat header inclusions
With symbols going though experimental/stable stages, we accumulated a lot of discrepancies about inclusion of the rte_compat.h header.
Some headers are including it where unneeded, while others rely on implicit inclusion.
Fix unneeded inclusions: $ git grep -l include..rte_compat.h | xargs grep -LE '__rte_(internal|experimental)' | xargs sed -i -e '/#include..rte_compat.h/d'
Fix missing inclusion, by inserting rte_compat.h before the first inclusion of a DPDK header: $ git grep -lE '__rte_(internal|experimental)' | xargs grep -L include..rte_compat.h | xargs sed -i -e \ '0,/#include..\(rte_\|.*pmd.h.$\)/{ s/\(#include..\(rte_\|.*pmd.h.$\)\)/#include <rte_compat.h>\n\1/ }'
Fix missing inclusion, by inserting rte_compat.h after the last inclusion of a non DPDK header: $ for file in $(git grep -lE '__rte_(internal|experimental)' | xargs grep -L include..rte_compat.h); do tac $file > $file.$$ sed -i -e \ '0,/#include../{ s/\(#include..*$\)/#include <rte_compat.h>\n\n\1/ }' $file.$$ tac $file.$$ > $file rm $file.$$ done
Fix missing inclusion, by inserting rte_compat.h after the header guard: $ git grep -lE '__rte_(internal|experimental)' | xargs grep -L include..rte_compat.h | xargs sed -i -e \ '0,/#define/{ s/\(#define .*$\)/\1\n\n#include <rte_compat.h>/ }'
And finally, exclude rte_compat.h itself. $ git checkout lib/eal/include/rte_compat.h
At the end of all this, we have a clean tree: $ git grep -lE '__rte_(internal|experimental)' | xargs grep -L include..rte_compat.h buildtools/check-symbols.sh devtools/checkpatches.sh doc/guides/contributing/abi_policy.rst doc/guides/rel_notes/release_20_11.rst lib/eal/include/rte_compat.h
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
show more ...
|
#
2edd037c |
| 03-Feb-2022 |
Dmitry Kozlyuk <dkozlyuk@nvidia.com> |
mem: add dirty malloc element support
EAL malloc layer assumed all free elements content is filled with zeros ("clean"), as opposed to uninitialized ("dirty"). This assumption was ensured in two way
mem: add dirty malloc element support
EAL malloc layer assumed all free elements content is filled with zeros ("clean"), as opposed to uninitialized ("dirty"). This assumption was ensured in two ways: 1. EAL memalloc layer always returned clean memory. 2. Freed memory was cleared before returning into the heap.
Clearing the memory can be as slow as around 14 GiB/s. To save doing so, memalloc layer is allowed to return dirty memory. Such segments being marked with RTE_MEMSEG_FLAG_DIRTY. The allocator tracks elements that contain dirty memory using the new flag in the element header. When clean memory is requested via rte_zmalloc*() and the suitable element is dirty, it is cleared on allocation. When memory is deallocated, the freed element is joined with adjacent free elements, and the dirty flag is updated:
a) If the joint element contains dirty parts, it is dirty:
dirty + freed + dirty = dirty => no need to clean freed + dirty = dirty the freed memory
Dirty parts may be large (e.g. initial allocation), so clearing them could create unpredictable slowdown.
b) If the only dirty part of the joint element is the freed memory, the joint element can be made clean:
clean + freed + clean = clean => freed memory clean + freed = clean must be cleared freed + clean = clean freed = clean
This logic naturally reproduces the old behavior and always applies in modes when EAL memalloc layer returns only clean segments.
As a result, memory is either cleared on free, as before, or it will be cleared on allocation if need be, but never twice.
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com> Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
show more ...
|
#
27e7e250 |
| 10-Sep-2021 |
Anatoly Burakov <anatoly.burakov@intel.com> |
mem: promote DMA mask API to stable
As per ABI policy, move the formerly experimental API's to the stable section.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Ray Kinsella
mem: promote DMA mask API to stable
As per ABI policy, move the formerly experimental API's to the stable section.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Ray Kinsella <mdr@ashroe.eu>
show more ...
|
#
acddc33b |
| 10-Sep-2021 |
Anatoly Burakov <anatoly.burakov@intel.com> |
mem: promote external memory API to stable
As per ABI policy, move the formerly experimental API's to the stable section.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Ray Ki
mem: promote external memory API to stable
As per ABI policy, move the formerly experimental API's to the stable section.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Ray Kinsella <mdr@ashroe.eu>
show more ...
|
#
b8937750 |
| 10-Sep-2021 |
Anatoly Burakov <anatoly.burakov@intel.com> |
mem: promote memseg API to stable
As per ABI policy, move the formerly experimental API's to the stable section.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Ray Kinsella <m
mem: promote memseg API to stable
As per ABI policy, move the formerly experimental API's to the stable section.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Ray Kinsella <mdr@ashroe.eu>
show more ...
|
#
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 ...
|