use C linkage where appropriate in headersAssure that 'extern "C" { /../ }' do not cover files included from aparticular header file, and address minor issues resulting from thischange of order.
use C linkage where appropriate in headersAssure that 'extern "C" { /../ }' do not cover files included from aparticular header file, and address minor issues resulting from thischange 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 withoverloaded 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 allheaders must contain a 'extern "C"'. Such a check was added in commit1ee492bdc4ff ("buildtools/chkincs: check missing C++ guards").Since this current change results in many headers not containing sucha token, remove the check for 'extern "C"' until we have a betterimplementation.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 ...
lib: move alignment attribute on types for MSVCThe current location used for __rte_aligned(a) for alignment of typesis not compatible with MSVC. There is only a single location acceptedby both to
lib: move alignment attribute on types for MSVCThe current location used for __rte_aligned(a) for alignment of typesis not compatible with MSVC. There is only a single location acceptedby both toolchains.The standard offers no alignment facility that compatibly interoperateswith C and C++ but it may be achieved by relocating the placement of__rte_aligned(a) to the aforementioned location accepted by all currentlysupported toolchains.To allow alignment for both compilers, do the following:* Expand __rte_aligned(a) to __declspec(align(a)) when building with MSVC.* Move __rte_aligned from the end of {struct,union} definitions to be between {struct,union} and tag.The placement between {struct,union} and the tag allows the desiredalignment to be imparted on the type regardless of the toolchain beingused for all of GCC, LLVM, MSVC compilers building both C and C++.Note: this move has an additional benefit as Doxygen is not confusedanymore like for the rte_event_vector struct definition.Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>Acked-by: Morten Brørup <mb@smartsharesystems.com>Acked-by: Bruce Richardson <bruce.richardson@intel.com>Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>Acked-by: Chengwen Feng <fengchengwen@huawei.com>Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>Signed-off-by: David Marchand <david.marchand@redhat.com>
dispatcher: add cache guard to per-lcore structAdd cache guard to per-lcore data structures to prevent false sharingin scenarios where a next-N-lines (or similar) hardware prefetcher isused.Sig
dispatcher: add cache guard to per-lcore structAdd cache guard to per-lcore data structures to prevent false sharingin scenarios where a next-N-lines (or similar) hardware prefetcher isused.Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
lib: remove redundant newline from logsFix places where two newline characters may be logged.Cc: stable@dpdk.orgSigned-off-by: David Marchand <david.marchand@redhat.com>Acked-by: Stephen Hemmi
lib: remove redundant newline from logsFix places where two newline characters may be logged.Cc: stable@dpdk.orgSigned-off-by: David Marchand <david.marchand@redhat.com>Acked-by: Stephen Hemminger <stephen@networkplumber.org>Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>Acked-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
lib: introduce dispatcher libraryThe purpose of the dispatcher library is to help reduce coupling in anEventdev-based DPDK application.In addition, the dispatcher also provides a convenient and
lib: introduce dispatcher libraryThe purpose of the dispatcher library is to help reduce coupling in anEventdev-based DPDK application.In addition, the dispatcher also provides a convenient and flexibleway for the application to use service cores for application-levelprocessing.Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>Tested-by: Peter Nilsson <peter.j.nilsson@ericsson.com>Reviewed-by: Heng Wang <heng.wang@ericsson.com>