summaryrefslogtreecommitdiff
path: root/examples/ethtool
AgeCommit message (Collapse)Author
2018-10-22mk: build with _GNU_SOURCE defined by defaultAnatoly Burakov
We use _GNU_SOURCE all over the place, but often times we miss defining it, resulting in broken builds on musl. Rather than fixing every library's and driver's and application's makefile, fix it by simply defining _GNU_SOURCE by default for all builds. Remove all usages of _GNU_SOURCE in source files and makefiles, and also fixup a couple of instances of using __USE_GNU instead of _GNU_SOURCE. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-12examples: make Linux environment check consistentThomas Monjalon
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 <thomas@monjalon.net>
2018-07-04ethdev: remove old offload APIFerruh Yigit
In DPDK 17.11, the ethdev offloads API has changed: commit cba7f53b717d ("ethdev: introduce Tx queue offloads API") commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API") The new API is documented in the programmer's guide: http://doc.dpdk.org/guides/prog_guide/poll_mode_drv.html#hardware-offload For reminder, the main concepts in the new API were: - All offloads are disabled by default - Distinction between per port and per queue offloads. The transition bits are now removed: - Translation of the old API in ethdev - rte_eth_conf.rxmode.ignore_offload_bitfield - ETH_TXQ_FLAGS_IGNORE The old API bits are now removed: - Rx per-port rte_eth_conf.rxmode.[bit-fields] - Tx per-queue rte_eth_txconf.txq_flags - ETH_TXQ_FLAGS_NO* Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Shahaf Shuler <shahafs@mellanox.com>
2018-04-27examples/ethtool: add a new command module-eepromZijie Pan
Add a new command "module-eeprom" to get the data of plugin module EEPROM. Signed-off-by: Zijie Pan <zijie.pan@6wind.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Remy Horton <remy.horton@intel.com>
2018-04-27ethdev: remove experimental flag of ports enumerationThomas Monjalon
The basic operations for ports enumeration should not be considered as experimental in DPDK 18.05. The iterator RTE_ETH_FOREACH_DEV was introduced in DPDK 17.05. It uses the function the rte_eth_find_next_owned_by() to get only ownerless ports. Its API can be considered stable. So the flag experimental is removed from rte_eth_find_next_owned_by(). The flag experimental is removed from rte_eth_dev_count_avail() which is the new name of the old function rte_eth_dev_count(). The flag experimental is set to rte_eth_dev_count_total() in the .c file for consistency with the declaration in the .h file. A lot of internal applications are fixed to not allow experimental API. Fixes: 8728ccf37615 ("fix ethdev ports enumeration") Fixes: d9a42a69febf ("ethdev: deprecate port count function") Fixes: e70e26861eaf ("net/mvpp2: fix build") Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Tested-by: David Marchand <david.marchand@6wind.com>
2018-04-17examples: add empty meson files for unsupported onesBruce Richardson
A number of example apps are not supported by the meson build system yet, but to allow future testing with "-Dexamples=all" we add in a placeholder meson.build file indicating that the apps should not be built. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Tested-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-04-18ethdev: deprecate port count functionThomas Monjalon
Some DPDK applications wrongly assume these requirements: - no hotplug, i.e. ports are never detached - all allocated ports are available to the application Such application iterates over ports by its own mean. The most common pattern is to request the port count and assume ports with index in the range [0..count[ can be used. In order to fix this common mistake in all external applications, the function rte_eth_dev_count is deprecated, while introducing the new functions rte_eth_dev_count_avail and rte_eth_dev_count_total. Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-04-18fix ethdev ports enumerationThomas Monjalon
Some DPDK applications wrongly assume these requirements: - no hotplug, i.e. ports are never detached - all allocated ports are available to the application Such application iterates over ports by its own mean. The most common pattern is to request the port count and assume ports with index in the range [0..count[ can be used. There are three consequences when using such wrong design: - new ports having an index higher than the port count won't be seen - old ports being detached (RTE_ETH_DEV_UNUSED) can be seen as ghosts - failsafe sub-devices (RTE_ETH_DEV_DEFERRED) will be seen by the application Such mistake will be less common with growing hotplug awareness. All applications and examples inside this repository - except testpmd - must be fixed to use the iterator RTE_ETH_FOREACH_DEV. Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-04-14ethdev: replace bus specific struct with generic devFerruh Yigit
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 <ferruh.yigit@intel.com> Reviewed-by: David Marchand <david.marchand@6wind.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-02-01examples: increase default ring sizes to 1024Kevin Laatz
Increase the default RX/TX ring sizes to 1024/1024 to accommodate for NICs with higher throughput (25G, 40G etc) Signed-off-by: Kevin Laatz <kevin.laatz@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-01-16examples/ethtool: convert to new ethdev offloads APIShahaf Shuler
Ethdev offloads API has changed since: commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API") commit cba7f53b717d ("ethdev: introduce Tx queue offloads API") This commit support the new API. Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-04examples: use SPDX tag for Intel copyright filesBruce Richardson
Replace the BSD license header with the SPDX tag for files with only an Intel copyright on them. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-11-07examples: remove dependency on PCIBruce Richardson
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 <bruce.richardson@intel.com>
2017-10-26pci: introduce library and driverGaetan Rivet
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 <gaetan.rivet@6wind.com>
2017-10-24mk: do not generate LDLIBS from directory dependenciesOlivier Matz
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 <gage.eads@intel.com> Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Gage Eads <gage.eads@intel.com>
2017-10-13examples: fix port id typeZhiyong Yang
Fixes: f8244c6399d9 ("ethdev: increase port id range") Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2017-07-09examples/ethtool: include PCI header directlyThomas Monjalon
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 <thomas@monjalon.net>
2017-07-08examples: adjust Rx and Tx descriptors to device limitsRoman Zhukov
Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-06-14fix typos using codespell utilityJerin Jacob
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 <jerin.jacob@caviumnetworks.com> Acked-by: John McNamara <john.mcnamara@intel.com>
2017-05-01examples/ethtool: fix link with ixgbe shared libMarkos Chandras
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 <mchandras@suse.de> Acked-by: Remy Horton <remy.horton@intel.com> Acked-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2017-04-21examples/ethtool: disable promiscuous mode by defaultQi Zhang
Disable promiscuous mode by default since VLAN filter does not work when promiscuous mode is enabled. Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Acked-by: Remy Horton <remy.horton@intel.com>
2017-03-27mk: optimize directory dependenciesOlivier Matz
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 <olivier.matz@6wind.com> Tested-by: Robin Jarry <robin.jarry@6wind.com> Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-02-09examples/ethtool: display bus informationQiming Yang
This patch enhances the ethtool example to support to show bus information, in the same way that the Linux kernel ethtool does. Signed-off-by: Qiming Yang <qiming.yang@intel.com> Acked-by: Remy Horton <remy.horton@intel.com>
2017-01-17examples/ethtool: use ixgbe public functionBernard Iremonger
Replace rte_eth_dev_set_vf_rxmode with rte_pmd_ixgbe_set_vf_rx_mode. Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
2017-01-17examples/ethtool: display firmware versionQiming Yang
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 <qiming.yang@intel.com> Acked-by: Remy Horton <remy.horton@intel.com>
2016-12-20examples/ethtool: fix driver informationQiming Yang
Function pcmd_drvinfo_callback uses struct info to get the ethtool information of each port. Struct info will store the information of previous port until this information be updated. This patch fixes this issue. Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application") Signed-off-by: Qiming Yang <qiming.yang@intel.com> Acked-by: Remy Horton <remy.horton@intel.com>
2016-12-20examples/ethtool: fix querying non-PCI devicesRemy Horton
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 <remy.horton@intel.com>
2016-07-10ethdev: get registers widthZyta Szpak
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 <zyta.szpak@semihalf.com> Acked-by: Remy Horton <remy.horton@intel.com>
2016-06-29mk: fix internal dependenciesThomas Monjalon
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 <thomas.monjalon@6wind.com>
2016-05-24ethdev: use dedicated macro to check port idMauricio Vasquez B
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 <mauricio.vasquezbernal@studenti.polito.it> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-04-20ethdev: remove deprecated statisticsThomas Monjalon
Some statistics were deprecated since release 2.1 (49f386542af4). The last deprecated counter to be used was imcasts. The VF loopback statistics are also removed as they are used only in igb and duplicated in extended statistics. The new counters should be added to extended statistics. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Remy Horton <remy.horton@intel.com>
2016-02-16examples/ethtool: fix buildThomas Monjalon
When building for ARM, the spinlock structure was not found. It appears to be a mismatch with rwlock which is not used in this file. Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application") Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Remy Horton <remy.horton@intel.com>
2015-12-14examples: skip unsupported ethtool and l3fwd-power on FreeBSDYong Liu
Userspace ethtool and l3fwd-power not support FreeBSD. So skip them when build samples. Signed-off-by: Marvin Liu <yong.liu@intel.com>
2015-12-10examples/ethtool: fix uninitialised variableRemy Horton
Fix Coverity warning with uninitialised field in structure being used. Zero out all the other unused ones. >>> CID 120413 (#1 of 1): Uninitialized scalar variable (UNINIT) Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application") Signed-off-by: Remy Horton <remy.horton@intel.com> Acked-by: John McNamara <john.mcnamara@intel.com>
2015-12-09examples/ethtool: remove dead codeStephen Hemminger
Remove dead code, and print better return for other errors. >>> CID 120411: Control flow issues (DEADCODE) >>> Execution cannot reach this statement: "return;". Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application") Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Remy Horton <remy.horton@intel.com>
2015-12-08examples/ethtool: add user-space ethtool sample applicationRemy Horton
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 <remy.horton@intel.com>