summaryrefslogtreecommitdiff
path: root/examples/l2fwd-keepalive
AgeCommit message (Collapse)Author
2018-09-14ethdev: make default behavior CRC strip on RxFerruh Yigit
Removed DEV_RX_OFFLOAD_CRC_STRIP offload flag. Without any specific Rx offload flag, default behavior by PMDs is to strip CRC. PMDs that support keeping CRC should advertise DEV_RX_OFFLOAD_KEEP_CRC Rx offload capability. Applications that require keeping CRC should check PMD capability first and if it is supported can enable this feature by setting DEV_RX_OFFLOAD_KEEP_CRC in Rx offload flag in rte_eth_dev_configure() Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Tomasz Duszynski <tdu@semihalf.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Acked-by: Jan Remes <remes@netcope.com> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Acked-by: Hyong Youb Kim <hyonkim@cisco.com>
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-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-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-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-30build: replace license text with SPDX tagBruce Richardson
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Luca Boccassi <bluca@debian.org>
2018-01-30examples: enable linking both static and sharedBruce Richardson
Since the DPDK build now includes both static and shared libraries, we need a new way to enable building the examples using either method from the one installation. To do this, we add in a default "shared" target, and a separate "static" target which links in the DPDK static libraries. In both cases, the final application name is symlinked to the last-built static or shared target, with both binaries able to co-exist in the build directory. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
2018-01-30examples: use pkg-config in makefilesBruce Richardson
Change the example app Makefiles to query if DPDK is installed and registered using pkg-config. If so, build directly using pkg-config info, otherwise fall back to using the original build system with RTE_SDK and RTE_TARGET This commit changes the makefiles for the basic examples, i.e. those which do not have multiple subdirectories underneath the main examples dir. Examples not covered are: * ethtool * multi_process * performance-thread * quota_watermark * netmap_compat * server_node_efd * vm_power_manager Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Luca Boccassi <bluca@debian.org>
2018-01-30examples: put app name and sources at top of makefilesBruce Richardson
Reorder the text in the makefiles, so that the app name and the source files are listed first. This then will allow them to be shared later in a combined makefile building with pkg-config and RTE_SDK-based build system. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Luca Boccassi <bluca@debian.org>
2018-01-30examples: build some samples with mesonBruce Richardson
Add support for having selected example apps built as part of a meson, ninja build. By default none are built, and those to be built should be named directly in the -Dexamples='' meson configuration argument. This is useful for developers working on a feature who want to use a suitable example, or examples, to test that feature, as they can compile everything up in one go, and run the example without having to do a ninja install first. This commit adds examples which don't consist of multiple apps in subdirectories to the meson build, so they can be built by default by passing -Dexamples parameter to meson. Not included are the following examples: * ethtool * multi-process * netmap_compat * performance-thread * quota_watermark * server_node_efd * vm_power_manager To test the apps added here, use the following command, merged to one line, to add them to your meson build (command to be run inside the build directory): meson configure -Dexamples=bbdev_app,bond,cmdline,distributor,\ eventdev_pipeline_sw_pmd, exception_path,helloworld,\ ip_fragmentation,ip_pipeline,ip_reassembly, ipsec-secgw,\ ipv4_multicast,kni,l2fwd-cat,l2fwd-crypto,l2fwd-jobstats,\ l2fwd-keepalive,l2fwd,l3fwd-acl,l3fwd-power,l3fwd-vf,l3fwd,\ link_status_interrupt,load_balancer,packet_ordering,ptpclient,\ qos_meter,qos_sched,rxtx_callbacks,skeleton,tep_termination,\ timer,vhost,vhost_scsi,vmdq,vmdq_dcb Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Luca Boccassi <bluca@debian.org>
2018-01-16examples/l2fwd-keepalive: 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-15examples: remove unnecessary dev info queriesPrashant Bhole
Removed rte_eth_dev_info_get() calls and declaration of struct rte_eth_dev_info where info is not used anymore. Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp> 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-11-06remove useless memzone includesThomas Monjalon
The memzone header is often included without good reason. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2017-10-06ethdev: increase port id rangeZhiyong Yang
Extend port_id definition from uint8_t to uint16_t in lib and drivers data structures, specifically rte_eth_dev_data. Modify the APIs, drivers and app using port_id at the same time. Fix some checkpatch issues from the original code and remove some unnecessary cast operations. release_17_11 and deprecation docs have been updated in this patch. Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-07-16examples: remove duplicate includesThomas Monjalon
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-05-01examples/l2fwd-keepalive: clean up shared mem on exitRemy Horton
This patch adds the unlinking/unmapping of shared host memory on termination of l2fwd-keepalive. Previously it was only cleaned on re-running of the example application. Fixes: e64833f2273a ("examples/l2fwd-keepalive: add sample application") Signed-off-by: Remy Horton <remy.horton@intel.com> Tested-by: Roman Korynkevych <romanx.korynkevych@intel.com>
2017-05-01examples/l2fwd-keepalive: add graceful exitRemy Horton
The l2fwd-keepalive example has infinite processing loops and as a result the only way to exit it is via SIGINT/SIGTERM (e.g. Control-C). The resulting shutdown is unclean, which is fixed by adding a signal handler that causes the processing loops to break. Fixes: e64833f2273a ("examples/l2fwd-keepalive: add sample application") Signed-off-by: Remy Horton <remy.horton@intel.com> Tested-by: Roman Korynkevych <romanx.korynkevych@intel.com>
2017-04-10examples: enable HW CRC strip by defaultJeff Guo
Since VF can not disable/enable HW CRC strip for non-DPDK PF drivers, and kernel driver almost default enable that feature, if disable it in example app's rxmode, VF driver will report the VF launch failure. So this patch default to enable HW CRC strip to let VF launch successful. Cc: stable@dpdk.org Signed-off-by: Jeff Guo <jia.guo@intel.com> Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-03-10examples: fix optind resetKeith Wiles
The variable optind should be reset to one not zero. From the man page: "The variable optind is the index of the next element to be processed in argv. The system initializes this value to 1. The caller can reset it to 1 to restart scanning of the same argv, or when scanning a new argument vector.” The problem I saw with my application was trying to parse the wrong option, which can happen as DPDK parses the first part of the command line and the application parses the second part. If you call getopt() multiple times in the same execution, the behavior is not maintained when using zero for optind. Signed-off-by: Keith Wiles <keith.wiles@intel.com>
2016-09-16remove unused ring includesAmine Kherbouche
This patch removes all unused <rte_ring.h> headers. Signed-off-by: Amine Kherbouche <amine.kherbouche@6wind.com>
2016-06-21examples/l2fwd-keepalive: fix memory leakRemy Horton
Fixes memory leaks detected by Coverity. These are due to ephemeral memory allocations not being freed when errors occur. Coverity issue: 127349 Fixes: e2aae1c1ced9 ("ethdev: remove name from extended statistic fetch") Signed-off-by: Remy Horton <remy.horton@intel.com>
2016-06-16examples/l2fwd-keepalive: add IPC liveness reportingRemy Horton
Changes the l2fwd keepalive example to show how the new keepalive enhancements can be used to relay core state to an external process. Signed-off-by: Remy Horton <remy.horton@intel.com>
2016-05-16examples: remove useless check of port countMauricio Vasquez B
The rte_eth_dev_count() function will never return a value greater than RTE_MAX_ETHPORTS, so that checking is useless. Signed-off-by: Mauricio Vasquez B <mauricio.vasquezbernal@studenti.polito.it> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2016-04-01ethdev: use constants for link stateThomas Monjalon
Define and use ETH_LINK_UP and ETH_LINK_DOWN where appropriate. Signed-off-by: Marc Sune <marcdevel@gmail.com> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-03-11examples: use buffered TxTomasz Kulasek
The internal buffering of packets for TX in sample apps is no longer needed, so this patchset also replaces this code with calls to the new rte_eth_tx_buffer* APIs in: * l2fwd-jobstats * l2fwd-keepalive * l2fwd * l3fwd-acl * l3fwd-power * link_status_interrupt * client_server_mp * l2fwd_fork * packet_ordering * qos_meter Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-12-10examples/l2fwd-keepalive: fix integer overflowRemy Horton
Fix Coverity warning with potential 32-bit integer multiplication overflow where final result is expected to be 64-bit. >>> CID 120144 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN) Fixes: e64833f2273a ("examples/l2fwd-keepalive: add sample application") Signed-off-by: Remy Horton <remy.horton@intel.com> Acked-by: John McNamara <john.mcnamara@intel.com>
2015-11-19examples/l2fwd-keepalive: add sample applicationRemy Horton
Modified version of l2fwd to demonstrate keep-alive functionality. Signed-off-by: Remy Horton <remy.horton@intel.com> Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com> Signed-off-by: John J Browne <john.j.browne@intel.com>