| Age | Commit message (Collapse) | Author |
|
If device does not support reading registers then call to
rte_eth_dev_get_reg_info will return an error.
This fixes compiler warning when warn unused result is set.
Signed-off-by: Stephen Hemminger <[email protected]>
Acked-by: Morten Brørup <[email protected]>
|
|
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 <[email protected]>
Acked-by: Morten Brørup <[email protected]>
Signed-off-by: David Marchand <[email protected]>
|
|
There 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 the
device is already stopped, which should not be the case. This patch
removes rte_eth_dev_stop() from rte_ethtool_net_open().
Signed-off-by: Usman Tanveer <[email protected]>
Acked-by: Stephen Hemminger <[email protected]>
|
|
Prepare for making the device object opaque by adding accessors.
Update existing "external" users.
Signed-off-by: David Marchand <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
|
|
Rely on the generic device name rather than restrict to only supporting
PCI devices.
Signed-off-by: David Marchand <[email protected]>
|
|
The tool comes from https://github.com/jsoref
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Thomas Monjalon <[email protected]>
|
|
In 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 device
should be in the same socket.
This patch make sure it calls rte_eth_dev_socket_id API to get device
socket_id when setting ringparam.
Signed-off-by: Chengwen Feng <[email protected]>
Signed-off-by: Min Hu (Connor) <[email protected]>
|
|
Add 'RTE_ETH' namespace to all enums & macros in a backward compatible
way. 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 <[email protected]>
Acked-by: Tyler Retzlaff <[email protected]>
Acked-by: Andrew Rybchenko <[email protected]>
Acked-by: Ajit Khaparde <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
Acked-by: Wisam Jaddo <[email protected]>
Acked-by: Rosen Xu <[email protected]>
Acked-by: Chenbo Xia <[email protected]>
Acked-by: Hemant Agrawal <[email protected]>
Acked-by: Somnath Kotur <[email protected]>
|
|
Move pkg-config override to beginning in the Makefile to allow
use PKGCONF variable to detect the libdpdk availability.
Fixes: fda34680eb9a ("examples: remove legacy sections of makefiles")
Cc: [email protected]
Signed-off-by: Jerin Jacob <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
|
|
Some example apps rely on driver-specific functionality and link explicitly
against those drivers. These apps need their makefiles updated to take
account of the renaming of the driver libs.
Fixes: a20b2c01a7a1 ("build: standardize component names and defines")
Signed-off-by: Bruce Richardson <[email protected]>
Reviewed-by: David Marchand <[email protected]>
|
|
Use the newer macros defined by meson in all DPDK source code, to ensure
there are no errors when the old non-standard macros are removed.
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Luca Boccassi <[email protected]>
Acked-by: Andrew Rybchenko <[email protected]>
Acked-by: Rosen Xu <[email protected]>
Signed-off-by: Thomas Monjalon <[email protected]>
|
|
rte_eth_dev_stop() return value was changed from void to int,
so this patch modify usage of this function across examples
according to new return type.
Signed-off-by: Ivan Ilchenko <[email protected]>
Signed-off-by: Andrew Rybchenko <[email protected]>
|
|
Remove references to the old DPDK build system from the makefiles, and use
pkg-config provided flags instead.
Signed-off-by: Bruce Richardson <[email protected]>
|
|
This checks the return value from the function
rte_eth_dev_set_vlan_offload.
Coverity issue: 350358
Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")
Cc: [email protected]
Signed-off-by: Gargi Sau <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
|
|
The soname for each stable ABI version should be just the ABI version major
number without the minor number. Unfortunately both major and minor were
used causing version 20.1 to be incompatible with 20.0.
This patch fixes the issue by switching from 2-part to 3-part ABI version
numbers so that we can keep 20.0 as soname and using the final digits to
identify the 20.x releases which are ABI compatible. This requires changes
to both make and meson builds to handle the three-digit version and shrink
it to 2-digit for soname.
The final fix needed in this patch is to adjust the library version number
for the ethtool example library, which needs to be upped to 2-digits, as
external libraries using the DPDK build system also use the logic in this
file.
Fixes: cba806e07d6f ("build: change ABI versioning to global")
Signed-off-by: Thomas Monjalon <[email protected]>
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Neil Horman <[email protected]>
Tested-by: Ray Kinsella <[email protected]>
Tested-by: Ferruh Yigit <[email protected]>
Tested-by: Kevin Laatz <[email protected]>
Tested-by: David Marchand <[email protected]>
|
|
The 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 <[email protected]>
Signed-off-by: Andrew Rybchenko <[email protected]>
|
|
The return value of rte_eth_link_get() and rte_eth_link_get_nowait()
was changed from void to int. Update the usage of the functions
according to the new return type.
Signed-off-by: Igor Romanov <[email protected]>
Signed-off-by: Andrew Rybchenko <[email protected]>
|
|
rte_eth_dev_info_get() return value was changed from void to
int, so this patch modify rte_eth_dev_info_get() usage across
examples according to its new return type.
Signed-off-by: Ivan Ilchenko <[email protected]>
Signed-off-by: Andrew Rybchenko <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>
|
|
rte_eth_dev_info_get() always fills in device information memory
with zeros on entry.
Fixes: b6719879855d ("ethdev: avoid getting uninitialized info for bad port")
Cc: [email protected]
Signed-off-by: Andrew Rybchenko <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>
|
|
Add '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 <[email protected]>
Reviewed-by: Stephen Hemminger <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>
|
|
Add '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 to
librte_net.
Signed-off-by: Olivier Matz <[email protected]>
Reviewed-by: Stephen Hemminger <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>
|
|
Do a global replace of snprintf(..."%s",...) with strlcpy, adding in the
rte_string_fns.h header if needed. The function changes in this patch were
auto-generated via command:
spatch --sp-file devtools/cocci/strlcpy.cocci --dir . --in-place
and 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 <[email protected]>
|
|
Most examples have in their makefiles a default RTE_TARGET directory to be
used in case RTE_TARGET is not set. Rather than just using a hard-coded
default, we can instead detect what the build directory is relative to
RTE_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_TARGET
explicitly, instead relying on the fact that they were building in a
directory which corresponded to the example default path - which was
changed to "x86_64-native-linux-gcc" by commit 218c4e68c1d9 ("mk: use
linux and freebsd in config names").
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Ferruh Yigit <[email protected]>
|
|
Rather than using linuxapp and bsdapp everywhere, we can change things to
use the, more readable, terms "linux" and "freebsd" in our build configs.
Rather than renaming the configs we can just duplicate the existing ones
with the new names using symlinks, and use the new names exclusively
internally. ["make showconfigs" also only shows the new names to keep the
list short] The result is that backward compatibility is kept fully but any
new 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 <[email protected]>
|
|
Rename the macro to make things shorter and more comprehensible. For
both meson and make builds, keep the old macro around for backward
compatibility.
Signed-off-by: Bruce Richardson <[email protected]>
|
|
This patch fixes 2 typos in examples/ethtool:
There is no such thing as ethtool_ops::get_driverinfo
It should be get_drvinfo:
see include/linux/ethtool.h in the kernel tree.
rte_net_change_mtu should be ndo_change_mtu:
see include/linux/netdevice.h in the kernel tree.
Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")
Cc: [email protected]
Signed-off-by: Rami Rosen <[email protected]>
Acked-by: Remy Horton <[email protected]>
|
|
Some Makefiles are using CONFIG_RTE_EXEC_ENV and others
are using CONFIG_RTE_EXEC_ENV_LINUXAPP.
Use the latter one for consistency.
We could remove CONFIG_RTE_EXEC_ENV later if considered useless.
Signed-off-by: Thomas Monjalon <[email protected]>
|
|
Add a new command "module-eeprom" to get the data of plugin
module EEPROM.
Signed-off-by: Zijie Pan <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>
Acked-by: Remy Horton <[email protected]>
|
|
Public struct rte_eth_dev_info has a "struct rte_pci_device" field in it
although it is common for all ethdev in all buses.
Replacing pci specific struct with generic device struct and updating
places that are using pci device in a way to get this information from
generic device.
Signed-off-by: Ferruh Yigit <[email protected]>
Reviewed-by: David Marchand <[email protected]>
Acked-by: Pablo de Lara <[email protected]>
Acked-by: Thomas Monjalon <[email protected]>
|
|
Replace the BSD license header with the SPDX tag for files
with only an Intel copyright on them.
Signed-off-by: Bruce Richardson <[email protected]>
|
|
All PCI functionality should be hidden from apps via the PCI bus driver,
the EAL and individual device drivers. Therefore remove the inclusion of
rte_pci.h from sample apps.
Signed-off-by: Bruce Richardson <[email protected]>
|
|
The PCI lib defines the types and methods allowing to use PCI elements.
The PCI bus implements a bus driver for PCI devices by constructing
rte_bus elements using the PCI lib.
Move the relevant code out of the EAL to its expected place.
Libraries, drivers, unit tests and applications are updated to use the
new rte_bus_pci.h header when necessary.
Signed-off-by: Gaetan Rivet <[email protected]>
|
|
The list of libraries in LDLIBS was generated from the DEPDIRS-xyz
variable. This is valid when the subdirectory name match the library
name, but it's not always the case, especially for PMDs.
The patches removes this feature and explicitly adds the proper
libraries in LDLIBS.
Some DEPDIRS-xyz variables become useless, remove them.
Reported-by: Gage Eads <[email protected]>
Signed-off-by: Olivier Matz <[email protected]>
Reviewed-by: Gage Eads <[email protected]>
|
|
Fixes: f8244c6399d9 ("ethdev: increase port id range")
Signed-off-by: Zhiyong Yang <[email protected]>
|
|
In devargs rework, rte_pci.h won't be included by rte_ethdev.h
(via rte_devargs.h) anymore.
rte_ethtool_get_drvinfo() could use rte_devargs.name instead of
creating equivalent bus specific name.
For now, it is workarounded by just including rte_pci.h.
Signed-off-by: Thomas Monjalon <[email protected]>
|
|
Fixing typos across dpdk source code using codespell utility.
Skipped the ethdev driver's base code fixes to keep the base
code intact.
Signed-off-by: Jerin Jacob <[email protected]>
Acked-by: John McNamara <[email protected]>
|
|
When RTE_DEVEL_BUILD is unset, -rpath is unset.
So the ethtool app cannot link with ixgbe shared library
which is required by ethtool lib:
warning: librte_pmd_ixgbe.so.1, needed by
examples/ethtool/lib/x86_64-native-linuxapp-gcc/lib/librte_ethtool.so,
not found (try using -rpath or -rpath-link)
It is fixed by adding the library in the application link.
The library link is also improved to specify that this explicit link
to ixgbe is needed only in the shared lib mode.
Fixes: 077d223e25c3 ("examples/ethtool: use ixgbe public function")
Signed-off-by: Markos Chandras <[email protected]>
Acked-by: Remy Horton <[email protected]>
Acked-by: Timothy Redaelli <[email protected]>
Signed-off-by: Thomas Monjalon <[email protected]>
|
|
Before this patch, the management of dependencies between directories
had several issues:
- the generation of .depdirs, done at configuration is slow: it can take
more than one minute on some slow targets (usually ~10s on a standard
PC without -j).
- for instance, it is possible to express a dependency like:
- app/foo depends on lib/librte_foo
- and lib/librte_foo depends on app/bar
But this won't work because the directories are traversed with a
depth-first algorithm, so we have to choose between doing 'app' before
or after 'lib'.
- the script depdirs-rule.sh is too complex.
- we cannot use "make -d" for debug, because the output of make is used for
the generation of .depdirs.
This patch moves the DEPDIRS-* variables in the upper Makefile, making
the dependencies much easier to calculate. A DEPDIRS variable is still
used to process library dependencies in LDLIBS.
After this commit, "make config" is almost immediate.
Signed-off-by: Olivier Matz <[email protected]>
Tested-by: Robin Jarry <[email protected]>
Tested-by: Jerin Jacob <[email protected]>
|
|
Replace rte_eth_dev_set_vf_rxmode with rte_pmd_ixgbe_set_vf_rx_mode.
Signed-off-by: Bernard Iremonger <[email protected]>
|
|
This patch enhances the ethtool example to support to show
firmware version, in the same way that the Linux kernel
ethtool does.
Signed-off-by: Qiming Yang <[email protected]>
Acked-by: Remy Horton <[email protected]>
|
|
Doing a device information query on a non-PCI device such as
vhost was resulting in the dereferencing of a NULL pointer
(the absent PCI data), causing a segmentation fault.
Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")
Signed-off-by: Remy Horton <[email protected]>
|
|
The ethtool app was allocating too little space for 64-bit
registers which resulted in memory corruption.
Removes hard-coded assumption that device registers
are always 32 bits wide. The rte_eth_dev_get_reg_length
and rte_eth_dev_get_reg_info callbacks did not
provide register size to the app in any way while is
needed to allocate correct number of bytes before
retrieving registers using rte_eth_dev_get_reg.
This commit changes rte_eth_dev_get_reg_info so that
it can be used to retrieve both the number of registers
and their width, and removes the now-redundant
rte_eth_dev_get_reg_length.
Signed-off-by: Zyta Szpak <[email protected]>
Acked-by: Remy Horton <[email protected]>
|
|
Some libraries were missing their dependency on eal, mbuf, mempool,
ring and kvargs.
It is revealed by the linker option "-z defs".
Signed-off-by: Thomas Monjalon <[email protected]>
|
|
The RTE_ETH_VALID_PORTID_OR_ERR_RET macro is used in some places
to check if a port id is valid or not. This commit makes use of it in
some new parts of the code.
Signed-off-by: Mauricio Vasquez B <[email protected]>
Signed-off-by: Thomas Monjalon <[email protected]>
|
|
Further enhancements to the userspace ethtool implementation that was
submitted in 2.1 and packaged as a self-contained sample application.
Implements an rte_ethtool shim layer based on rte_ethdev API, along
with a command prompt driven demonstration application.
Signed-off-by: Remy Horton <[email protected]>
|