examples/ethtool: handle drivers without registers infoIf device does not support reading registers then call torte_eth_dev_get_reg_info will return an error.This fixes compiler warning when warn
examples/ethtool: handle drivers without registers infoIf device does not support reading registers then call torte_eth_dev_get_reg_info will return an error.This fixes compiler warning when warn unused result is set.Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>Acked-by: Morten Brørup <mb@smartsharesystems.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>
examples/ethtool: remove stop before startThere is a call to rte_eth_dev_stop() in rte_ethtool_net_open()due to which user gets misleading message upon first open/start call.It says that thedevi
examples/ethtool: remove stop before startThere is a call to rte_eth_dev_stop() in rte_ethtool_net_open()due to which user gets misleading message upon first open/start call.It says that thedevice is already stopped, which should not be the case. This patchremoves rte_eth_dev_stop() from rte_ethtool_net_open().Signed-off-by: Usman Tanveer <usman.tanveer@emumba.com>Acked-by: Stephen Hemminger <stephen@networkplumber.org>
dev: introduce device accessorsPrepare for making the device object opaque by adding accessors.Update existing "external" users.Signed-off-by: David Marchand <david.marchand@redhat.com>Acked-by
dev: introduce device accessorsPrepare for making the device object opaque by adding accessors.Update existing "external" users.Signed-off-by: David Marchand <david.marchand@redhat.com>Acked-by: Bruce Richardson <bruce.richardson@intel.com>
examples/ethtool: prefer device nameRely on the generic device name rather than restrict to only supportingPCI devices.Signed-off-by: David Marchand <david.marchand@redhat.com>
fix spelling in comments and stringsThe tool comes from https://github.com/jsorefSigned-off-by: Josh Soref <jsoref@gmail.com>Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
examples/ethtool: enhance Rx/Tx queue NUMA affinityIn DPDK, 'rte_socket_id' means the running socket while'rte_eth_dev_socket_id' is the device socket.For better performance, memory which queue s
examples/ethtool: enhance Rx/Tx queue NUMA affinityIn DPDK, 'rte_socket_id' means the running socket while'rte_eth_dev_socket_id' is the device socket.For better performance, memory which queue setup used and deviceshould be in the same socket.This patch make sure it calls rte_eth_dev_socket_id API to get devicesocket_id when setting ringparam.Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
ethdev: add namespaceAdd 'RTE_ETH' namespace to all enums & macros in a backward compatibleway. The macros for backward compatibility can be removed in next LTS.Also updated some struct names to
ethdev: add namespaceAdd 'RTE_ETH' namespace to all enums & macros in a backward compatibleway. The macros for backward compatibility can be removed in next LTS.Also updated some struct names to have 'rte_eth' prefix.All internal components switched to using new names.Syntax fixed on lines that this patch touches.Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>Acked-by: Jerin Jacob <jerinj@marvell.com>Acked-by: Wisam Jaddo <wisamm@nvidia.com>Acked-by: Rosen Xu <rosen.xu@intel.com>Acked-by: Chenbo Xia <chenbo.xia@intel.com>Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
examples: fix pkg-config overrideMove pkg-config override to beginning in the Makefile to allowuse PKGCONF variable to detect the libdpdk availability.Fixes: fda34680eb9a ("examples: remove lega
examples: fix pkg-config overrideMove pkg-config override to beginning in the Makefile to allowuse PKGCONF variable to detect the libdpdk availability.Fixes: fda34680eb9a ("examples: remove legacy sections of makefiles")Cc: stable@dpdk.orgSigned-off-by: Jerin Jacob <jerinj@marvell.com>Acked-by: Bruce Richardson <bruce.richardson@intel.com>
examples: fix linking against specific driversSome example apps rely on driver-specific functionality and link explicitlyagainst those drivers. These apps need their makefiles updated to takeacco
examples: fix linking against specific driversSome example apps rely on driver-specific functionality and link explicitlyagainst those drivers. These apps need their makefiles updated to takeaccount of the renaming of the driver libs.Fixes: a20b2c01a7a1 ("build: standardize component names and defines")Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>Reviewed-by: David Marchand <david.marchand@redhat.com>
build: replace use of old build macrosUse the newer macros defined by meson in all DPDK source code, to ensurethere are no errors when the old non-standard macros are removed.Signed-off-by: Bruc
build: replace use of old build macrosUse the newer macros defined by meson in all DPDK source code, to ensurethere are no errors when the old non-standard macros are removed.Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>Acked-by: Luca Boccassi <bluca@debian.org>Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>Acked-by: Rosen Xu <rosen.xu@intel.com>Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
examples: check stop call statusrte_eth_dev_stop() return value was changed from void to int,so this patch modify usage of this function across examplesaccording to new return type.Signed-off-b
examples: check stop call statusrte_eth_dev_stop() return value was changed from void to int,so this patch modify usage of this function across examplesaccording to new return type.Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
examples/ethtool: convert to pkg-config-based buildRemove references to the old DPDK build system from the makefiles, and usepkg-config provided flags instead.Signed-off-by: Bruce Richardson <br
examples/ethtool: convert to pkg-config-based buildRemove references to the old DPDK build system from the makefiles, and usepkg-config provided flags instead.Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
examples/ethtool: fix unchecked return valueThis checks the return value from the functionrte_eth_dev_set_vlan_offload.Coverity issue: 350358Fixes: bda68ab9d1e7 ("examples/ethtool: add user-spa
examples/ethtool: fix unchecked return valueThis checks the return value from the functionrte_eth_dev_set_vlan_offload.Coverity issue: 350358Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")Cc: stable@dpdk.orgSigned-off-by: Gargi Sau <gargi.sau@intel.com>Acked-by: Bruce Richardson <bruce.richardson@intel.com>
build: fix soname info for 19.11 compatibilityThe soname for each stable ABI version should be just the ABI version majornumber without the minor number. Unfortunately both major and minor wereus
build: fix soname info for 19.11 compatibilityThe soname for each stable ABI version should be just the ABI version majornumber without the minor number. Unfortunately both major and minor wereused causing version 20.1 to be incompatible with 20.0.This patch fixes the issue by switching from 2-part to 3-part ABI versionnumbers so that we can keep 20.0 as soname and using the final digits toidentify the 20.x releases which are ABI compatible. This requires changesto both make and meson builds to handle the three-digit version and shrinkit to 2-digit for soname.The final fix needed in this patch is to adjust the library version numberfor the ethtool example library, which needs to be upped to 2-digits, asexternal libraries using the DPDK build system also use the logic in thisfile.Fixes: cba806e07d6f ("build: change ABI versioning to global")Signed-off-by: Thomas Monjalon <thomas@monjalon.net>Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>Acked-by: Neil Horman <nhorman@tuxdriver.com>Tested-by: Ray Kinsella <mdr@ashroe.eu>Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>Tested-by: Kevin Laatz <kevin.laatz@intel.com>Tested-by: David Marchand <david.marchand@redhat.com>
examples: check status of getting MAC addressThe return value of rte_eth_macaddr_get() was changed from void to int.Update the usage of the functions according to the new return type.Signed-off-
examples: check status of getting MAC addressThe return value of rte_eth_macaddr_get() was changed from void to int.Update the usage of the functions according to the new return type.Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
examples: check status of getting link infoThe return value of rte_eth_link_get() and rte_eth_link_get_nowait()was changed from void to int. Update the usage of the functionsaccording to the new
examples: check status of getting link infoThe return value of rte_eth_link_get() and rte_eth_link_get_nowait()was changed from void to int. Update the usage of the functionsaccording to the new return type.Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
examples: check status of getting ethdev inforte_eth_dev_info_get() return value was changed from void toint, so this patch modify rte_eth_dev_info_get() usage acrossexamples according to its new
examples: check status of getting ethdev inforte_eth_dev_info_get() return value was changed from void toint, so this patch modify rte_eth_dev_info_get() usage acrossexamples according to its new return type.Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
ethdev: remove redundant device info cleanup before getrte_eth_dev_info_get() always fills in device information memorywith zeros on entry.Fixes: b6719879855d ("ethdev: avoid getting uninitializ
ethdev: remove redundant device info cleanup before getrte_eth_dev_info_get() always fills in device information memorywith zeros on entry.Fixes: b6719879855d ("ethdev: avoid getting uninitialized info for bad port")Cc: stable@dpdk.orgSigned-off-by: Andrew Rybchenko <arybchenko@solarflare.com>Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
net: add rte prefix to ether functionsAdd 'rte_' prefix to functions:- rename is_same_ether_addr() as rte_is_same_ether_addr().- rename is_zero_ether_addr() as rte_is_zero_ether_addr().- rename
net: add rte prefix to ether functionsAdd 'rte_' prefix to functions:- rename is_same_ether_addr() as rte_is_same_ether_addr().- rename is_zero_ether_addr() as rte_is_zero_ether_addr().- rename is_unicast_ether_addr() as rte_is_unicast_ether_addr().- rename is_multicast_ether_addr() as rte_is_multicast_ether_addr().- rename is_broadcast_ether_addr() as rte_is_broadcast_ether_addr().- rename is_universal_ether_addr() as rte_is_universal_ether_addr().- rename is_local_admin_ether_addr() as rte_is_local_admin_ether_addr().- rename is_valid_assigned_ether_addr() as rte_is_valid_assigned_ether_addr().- rename eth_random_addr() as rte_eth_random_addr().- rename ether_addr_copy() as rte_ether_addr_copy().- rename ether_format_addr() as rte_ether_format_addr().Signed-off-by: Olivier Matz <olivier.matz@6wind.com>Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
net: add rte prefix to ether structuresAdd 'rte_' prefix to structures:- rename struct ether_addr as struct rte_ether_addr.- rename struct ether_hdr as struct rte_ether_hdr.- rename struct vlan_
net: add rte prefix to ether structuresAdd 'rte_' prefix to structures:- rename struct ether_addr as struct rte_ether_addr.- rename struct ether_hdr as struct rte_ether_hdr.- rename struct vlan_hdr as struct rte_vlan_hdr.- rename struct vxlan_hdr as struct rte_vxlan_hdr.- rename struct vxlan_gpe_hdr as struct rte_vxlan_gpe_hdr.Do not update the command line library to avoid adding a dependency tolibrte_net.Signed-off-by: Olivier Matz <olivier.matz@6wind.com>Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
replace snprintf with strlcpyDo a global replace of snprintf(..."%s",...) with strlcpy, adding in therte_string_fns.h header if needed. The function changes in this patch wereauto-generated via
replace snprintf with strlcpyDo a global replace of snprintf(..."%s",...) with strlcpy, adding in therte_string_fns.h header if needed. The function changes in this patch wereauto-generated via command: spatch --sp-file devtools/cocci/strlcpy.cocci --dir . --in-placeand then the files edited using awk to add in the missing header: gawk -i inplace '/include <rte_/ && ! seen { \ print "#include <rte_string_fns.h>"; seen=1} {print}'Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
examples: detect default build directoryMost examples have in their makefiles a default RTE_TARGET directory to beused in case RTE_TARGET is not set. Rather than just using a hard-codeddefault, w
examples: detect default build directoryMost examples have in their makefiles a default RTE_TARGET directory to beused in case RTE_TARGET is not set. Rather than just using a hard-codeddefault, we can instead detect what the build directory is relative toRTE_SDK directory.This fixes a potential issue for anyone who continues to build using"make install T=x86_64-native-linuxapp-gcc" and skips setting RTE_TARGETexplicitly, instead relying on the fact that they were building in adirectory which corresponded to the example default path - which waschanged to "x86_64-native-linux-gcc" by commit 218c4e68c1d9 ("mk: uselinux and freebsd in config names").Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
mk: use linux and freebsd in config namesRather than using linuxapp and bsdapp everywhere, we can change things touse the, more readable, terms "linux" and "freebsd" in our build configs.Rather t
mk: use linux and freebsd in config namesRather than using linuxapp and bsdapp everywhere, we can change things touse the, more readable, terms "linux" and "freebsd" in our build configs.Rather than renaming the configs we can just duplicate the existing oneswith the new names using symlinks, and use the new names exclusivelyinternally. ["make showconfigs" also only shows the new names to keep thelist short] The result is that backward compatibility is kept fully but anynew builds or development can be done using the newer names, i.e. both"make config T=x86_64-native-linuxapp-gcc" and "T=x86_64-native-linux-gcc"work.Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
build/linux: rename macro from LINUXAPP to LINUXRename the macro to make things shorter and more comprehensible. Forboth meson and make builds, keep the old macro around for backwardcompatibility
build/linux: rename macro from LINUXAPP to LINUXRename the macro to make things shorter and more comprehensible. Forboth meson and make builds, keep the old macro around for backwardcompatibility.Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
12