rawdev: get device structure using IDAdded an internal API for PMDs to get raw device pointer from a device id.Signed-off-by: Akhil Goyal <gakhil@marvell.com>Reviewed-by: Hemant Agrawal <hemant.
rawdev: get device structure using IDAdded an internal API for PMDs to get raw device pointer from a device id.Signed-off-by: Akhil Goyal <gakhil@marvell.com>Reviewed-by: Hemant Agrawal <hemant.agrawal@nxp.com>
show more ...
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>
version: 24.11-rc0Start a new release cycle with empty release notes.The ABI version becomes 25.0.The map files are updated to the new ABI major number (25).The ABI exceptions are dropped and C
version: 24.11-rc0Start a new release cycle with empty release notes.The ABI version becomes 25.0.The map files are updated to the new ABI major number (25).The ABI exceptions are dropped and CI ABI checks are disabled becausecompatibility is not preserved.Signed-off-by: David Marchand <david.marchand@redhat.com>Acked-by: Thomas Monjalon <thomas@monjalon.net>
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>
lib: use log helper with prefixUse RTE_LOG_LINE_PREFIX instead of RTE_LOG_LINE in macro expansionswhich allows a prefix and arguments to be inserted into the log linewithout the need to use the #
lib: use log helper with prefixUse RTE_LOG_LINE_PREFIX instead of RTE_LOG_LINE in macro expansionswhich allows a prefix and arguments to be inserted into the log linewithout the need to use the ## args variadic argument pack extension.Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>Acked-by: Morten Brørup <mb@smartsharesystems.com>Acked-by: Stephen Hemminger <stephen@networkplumber.org>Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
rawdev: fix calloc parametersgcc [1] generates warning [2] about calloc usage, because callocparameter order is wrong, fixing it by replacing parameters.[1]gcc (GCC) 14.0.0 20240108 (experiment
rawdev: fix calloc parametersgcc [1] generates warning [2] about calloc usage, because callocparameter order is wrong, fixing it by replacing parameters.[1]gcc (GCC) 14.0.0 20240108 (experimental)[2]Compiling C object .../lib/librte_rawdev.a.p/rawdev_rte_rawdev.c.o../lib/rawdev/rte_rawdev.c: In function ‘handle_dev_dump’:../lib/rawdev/rte_rawdev.c:659:29: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] 659 | buf = calloc(sizeof(char), RTE_TEL_MAX_SINGLE_STRING_LEN); | ^~~~Fixes: e915d404eb72 ("rawdev: support telemetry dump rawdev")Cc: stable@dpdk.orgSigned-off-by: Ferruh Yigit <ferruh.yigit@amd.com>Acked-by: Morten Brørup <mb@smartsharesystems.com>Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>Reviewed-by: Hemant Agrawal <hemant.agrawal@nxp.com>
lib: use per line logging in helpersUse RTE_LOG_LINE in existing macros that append a \n.This will help catching unwanted newline character or multilinesin log messages.Signed-off-by: David Mar
lib: use per line logging in helpersUse RTE_LOG_LINE in existing macros that append a \n.This will help catching unwanted newline character or multilinesin log messages.Signed-off-by: David Marchand <david.marchand@redhat.com>Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
rawdev: fix device class in log messageUse proper naming when dealing with a raw device.Fixes: c88b3f2558ed ("rawdev: introduce raw device library")Cc: stable@dpdk.orgSigned-off-by: Tomasz Dus
rawdev: fix device class in log messageUse proper naming when dealing with a raw device.Fixes: c88b3f2558ed ("rawdev: introduce raw device library")Cc: stable@dpdk.orgSigned-off-by: Tomasz Duszynski <tduszynski@marvell.com>Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
remove C11 compatibility macroC11 conformant compiler is documented as a minimum requirement to buildand consume DPDK.Remove use of RTE_STD_C11 macro marking use of C11 features with__extension_
remove C11 compatibility macroC11 conformant compiler is documented as a minimum requirement to buildand 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 definitionof 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>
version: 23.11-rc0Start a new release cycle with empty release notes.The ABI version becomes 24.0.The map files are updated to the new ABI major number (24).The ABI exceptions are dropped and C
version: 23.11-rc0Start a new release cycle with empty release notes.The ABI version becomes 24.0.The map files are updated to the new ABI major number (24).The ABI exceptions are dropped and CI ABI checks are disabled becausecompatibility is not preserved.The telemetry and vhost libraries compat code is cleaned up in nextcommits.Signed-off-by: David Marchand <david.marchand@redhat.com>Acked-by: Bruce Richardson <bruce.richardson@intel.com>
lib: remove blank line ending comment blocksAt the end of a comment, no need for an extra line.This pattern was fixed with the following command:git ls lib | xargs sed -i '/^ *\* *$/{N;/ *\*\/ *
lib: remove blank line ending comment blocksAt the end of a comment, no need for an extra line.This pattern was fixed with the following command:git ls lib | xargs sed -i '/^ *\* *$/{N;/ *\*\/ *$/D;}'Signed-off-by: Thomas Monjalon <thomas@monjalon.net>Acked-by: Bruce Richardson <bruce.richardson@intel.com>Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
rename telemetry u64 functions to uint versionsWithin the DPDK code-base, replace all occurrences of"rte_tel_data_add_array_u64" with "rte_tel_data_add_array_uint", andsimilarly replace all occur
rename telemetry u64 functions to uint versionsWithin the DPDK code-base, replace all occurrences of"rte_tel_data_add_array_u64" with "rte_tel_data_add_array_uint", andsimilarly replace all occurrences of "rte_tel_data_add_dict_u64" with"rte_tel_data_add_dict_uint". This allows us to later mark the olderfunctions as deprecated without hitting warnings.Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>Acked-by: Ciara Power <ciara.power@intel.com>
rawdev: support telemetry dump rawdevThis patch supports telemetry dump rawdev.Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>Acked-by: Morten Brørup <mb@smartsharesystems.com>
dev: hide driver objectMake rte_driver opaque for non internal users.This will make extending this object possible without breaking the ABI.Introduce a new driver header and move rte_driver defi
dev: hide driver objectMake rte_driver opaque for non internal users.This will make extending this object possible without breaking the ABI.Introduce a new driver header and move rte_driver definition.Update drivers and library to use the internal header.Some applications may have been dereferencing rte_driver objects, markthis object's accessors as stable.Signed-off-by: David Marchand <david.marchand@redhat.com>Acked-by: Bruce Richardson <bruce.richardson@intel.com>Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>Acked-by: Akhil Goyal <gakhil@marvell.com>Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
eal: deprecate RTE_FUNC_PTR_* macrosThose macros have no real value and are easily replaced with a simpleif() block.Existing users have been converted using a new cocci script.Deprecate them.
eal: deprecate RTE_FUNC_PTR_* macrosThose macros have no real value and are easily replaced with a simpleif() block.Existing users have been converted using a new cocci script.Deprecate them.Signed-off-by: David Marchand <david.marchand@redhat.com>
version: 22.11-rc0Start a new release cycle with empty release notes.The ABI version becomes 23.0.The map files are updated to the new ABI major number (23).The ABI exceptions are dropped and C
version: 22.11-rc0Start a new release cycle with empty release notes.The ABI version becomes 23.0.The map files are updated to the new ABI major number (23).The ABI exceptions are dropped and CI ABI checks are disabled becausecompatibility is not preserved.Special handling of removed drivers is also dropped in check-abi.sh anda note has been added in libabigail.abignore as a reminder.Signed-off-by: David Marchand <david.marchand@redhat.com>Acked-by: Thomas Monjalon <thomas@monjalon.net>
rawdev: remove unneeded header includesThese header includes have been flagged by the iwyu_tooland removed.Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>Acked-by: Hemant Agrawal <hema
rawdev: remove unneeded header includesThese header includes have been flagged by the iwyu_tooland removed.Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
lib: remove unneeded header includesThese header includes have been flagged by the iwyu_tooland removed.Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
remove repeated 'the' in the codeRemove the use of double "the" as it does not make sense.Cc: stable@dpdk.orgSigned-off-by: Sean Morrissey <sean.morrissey@intel.com>Signed-off-by: Conor Fogart
remove repeated 'the' in the codeRemove the use of double "the" as it does not make sense.Cc: stable@dpdk.orgSigned-off-by: Sean Morrissey <sean.morrissey@intel.com>Signed-off-by: Conor Fogarty <conor.fogarty@intel.com>Acked-by: John McNamara <john.mcnamara@intel.com>Reviewed-by: Conor Walsh <conor.walsh@intel.com>Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
build/windows: remove separate list of libsRather than maintaining a separate list of libraries which are to bebuilt on windows, use the standard library list and explicitly add toeach library th
build/windows: remove separate list of libsRather than maintaining a separate list of libraries which are to bebuilt on windows, use the standard library list and explicitly add toeach library that is not to be built a check for windows and disablethe library at that per-lib level. As well as shortening the mainlib/meson.build file, this also leads to the build summary at the end ofthe meson config run correctly listing the libraries which are not to bebuilt.Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
version: 21.11-rc0Start a new release cycle with empty release notes.The ABI version becomes 22.0.The map files are updated to the new ABI major number (22).The ABI exceptions are dropped and C
version: 21.11-rc0Start a new release cycle with empty release notes.The ABI version becomes 22.0.The map files are updated to the new ABI major number (22).The ABI exceptions are dropped and CI ABI checks are disabled becausecompatibility is not preserved.Signed-off-by: Thomas Monjalon <thomas@monjalon.net>Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>Acked-by: David Marchand <david.marchand@redhat.com>
log: register with standardized namesLet's try to enforce the convention where most drivers use a pmd. logtypewith their class reflected in it, and libraries use a lib. logtype.Introduce two new
log: register with standardized namesLet's try to enforce the convention where most drivers use a pmd. logtypewith their class reflected in it, and libraries use a lib. logtype.Introduce two new macros:- RTE_LOG_REGISTER_DEFAULT can be used when a single logtype is used in a component. It is associated to the default name provided by the build system,- RTE_LOG_REGISTER_SUFFIX can be used when multiple logtypes are used, and then the passed name is appended to the default name,RTE_LOG_REGISTER is left untouched for existing external usersand for components that do not comply with the convention.There is a new Meson variable log_prefix to adapt the default namefor baseband (pmd.bb.), bus (no pmd.) and mempool (no pmd.) classes.Note: achieved with below commands + reverted change on net/bonding +edits on crypto/virtio, compress/mlx5, regex/mlx5$ git grep -l RTE_LOG_REGISTER drivers/ | while read file; do pattern=${file##drivers/}; class=${pattern%%/*}; pattern=${pattern#$class/}; drv=${pattern%%/*}; case "$class" in baseband) pattern=pmd.bb.$drv;; bus) pattern=bus.$drv;; mempool) pattern=mempool.$drv;; *) pattern=pmd.$class.$drv;; esac sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file; sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file; done$ git grep -l RTE_LOG_REGISTER lib/ | while read file; do pattern=${file##lib/}; pattern=lib.${pattern%%/*}; sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file; sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file; doneSigned-off-by: David Marchand <david.marchand@redhat.com>Signed-off-by: Thomas Monjalon <thomas@monjalon.net>Acked-by: Bruce Richardson <bruce.richardson@intel.com>
lib: remove librte_ prefix from directory namesThere is no reason for the DPDK libraries to all have 'librte_' prefix onthe directory names. This prefix makes the directory names longer and alsom
lib: remove librte_ prefix from directory namesThere is no reason for the DPDK libraries to all have 'librte_' prefix onthe directory names. This prefix makes the directory names longer and alsomakes it awkward to add features referring to individual libraries in thebuild - should the lib names be specified with or without the prefix.Therefore, we can just remove the library prefix and use the library'sunique name as the directory name, i.e. 'eal' rather than 'librte_eal'Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>