summaryrefslogtreecommitdiff
path: root/examples/server_node_efd
AgeCommit message (Collapse)Author
2024-05-17examples: use stdatomic APITyler Retzlaff
Replace the use of gcc builtin __atomic_xxx intrinsics with corresponding rte_atomic_xxx optional rte stdatomic API. Signed-off-by: Tyler Retzlaff <[email protected]> Acked-by: Stephen Hemminger <[email protected]>
2024-04-19examples: move alignment attribute on types for MSVCTyler Retzlaff
Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff <[email protected]> Reviewed-by: Morten Brørup <[email protected]> Acked-by: Morten Brørup <[email protected]> Acked-by: Akhil Goyal <[email protected]>
2023-06-22examples/server_node_efd: simplify build configurationDavid Marchand
The server_node_efd example contains various binaries whose sources are in sub directories that do not match their name. Rename sub directories in this example and stop overriding the binaries names in meson.build. This makes a next change easier in the build scripts used by CI. Signed-off-by: David Marchand <[email protected]> Acked-by: Bruce Richardson <[email protected]>
2022-09-21eal: remove unneeded includes from a public headerDmitry Kozlyuk
Do not include <ctype.h>, <errno.h>, and <stdlib.h> from <rte_common.h>, because they are not used by this file. Include the needed headers directly from the files that need them. Signed-off-by: Dmitry Kozlyuk <[email protected]> Acked-by: Bruce Richardson <[email protected]>
2022-01-11fix spelling in comments and stringsJosh Soref
The tool comes from https://github.com/jsoref Signed-off-by: Josh Soref <[email protected]> Signed-off-by: Thomas Monjalon <[email protected]>
2021-10-22ethdev: add namespaceFerruh Yigit
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]>
2021-10-19examples: remove unneeded atomic header includeJoyce Kong
Remove the unnecessary header file rte_atomic.h included in example module. Signed-off-by: Joyce Kong <[email protected]> Signed-off-by: Dharmik Thakkar <[email protected]> Reviewed-by: Ruifeng Wang <[email protected]>
2021-10-19examples/server_node_efd: use compiler atomics for syncJoyce Kong
Convert rte_atomic32_test_and_set to compiler CAS atomic operation for display_stats sync. Signed-off-by: Joyce Kong <[email protected]> Reviewed-by: Ruifeng Wang <[email protected]>
2021-09-07net: add macro to extract MAC address bytesAman Deep Singh
Added macros to simplify print of MAC address. The six bytes of a MAC address are extracted in a macro here, to improve code readablity. Signed-off-by: Aman Deep Singh <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
2021-09-07net: add macro for MAC address printAman Deep Singh
Added macro to print six bytes of MAC address. The MAC addresses will be printed in upper case hexadecimal format. In case there is a specific check for lower case MAC address, the user may need to make a change in such test case after this patch. Signed-off-by: Aman Deep Singh <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
2021-07-31doc: use code snippets in sample app guidesConor Fogarty
Currently the sample app user guides use hard coded code snippets, this patch changes these to use literalinclude which will dynamically update the snippets as changes are made to the code. This was introduced in commit 413c75c33c40 ("doc: show how to include code in guides"). Comments within the sample apps were updated to accommodate this as part of this patch. This will help to ensure that the code within the sample app user guides is up to date and not out of sync with the actual code. Signed-off-by: Conor Fogarty <[email protected]> Signed-off-by: Conor Walsh <[email protected]> Acked-by: John McNamara <[email protected]>
2021-05-05examples: fix pkg-config overrideJerin Jacob
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]>
2021-04-21examples: add eal cleanup to examplesChengchang Tang
According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup. This patch add rte_eal_cleanup to examples to encourage new users of DPDK to use it. Fixes: aec9c13c5257 ("eal: add function to release internal resources") Fixes: 3d0fad56b74a ("examples/fips_validation: add crypto FIPS application") Fixes: c8e6ceecebc1 ("examples/ioat: add new sample app for ioat driver") Fixes: 4ff457986f76 ("examples/l2fwd-event: add default poll mode routines") Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton") Fixes: c5eebf85badc ("examples/ntb: add example for NTB") Fixes: b77f66002812 ("examples/pipeline: add new example application") Fixes: edbed86d1cc3 ("examples/vdpa: introduce a new sample for vDPA") Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample") Fixes: f5188211c721 ("examples/vhost_crypto: add sample application") Cc: [email protected] Signed-off-by: Chengchang Tang <[email protected]>
2021-01-30examples: warn about broken pkg-configBruce Richardson
Since the examples are designed to be built by end-users using Make, we can detect and warn about broken pkg-config on the user's system as part of the build process. Signed-off-by: Bruce Richardson <[email protected]>
2020-11-15examples: restore trace pointDavid Marchand
Before make removal, those examples were built with experimental flag for tracepoints to be compiled in but the pkg-config part of those makefiles were missed. Fixes: 78d44153de8f ("ethdev: add tracepoints") Cc: [email protected] Signed-off-by: David Marchand <[email protected]> Acked-by: Bruce Richardson <[email protected]>
2020-10-20eal: rename lcore master and slaveStephen Hemminger
Replace master lcore with main lcore and replace slave lcore with worker lcore. Keep the old functions and macros but mark them as deprecated for this release. The "--master-lcore" command line option is also deprecated and any usage will print a warning and use "--main-lcore" as replacement. Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: Anatoly Burakov <[email protected]>
2020-09-21examples: use new link status print formatIvan Dyukov
Add usage of rte_eth_link_to_str function to example applications. Signed-off-by: Ivan Dyukov <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
2020-09-07examples/server_node_efd: convert to pkg-config-based buildKevin Laatz
Remove references to the old make build system and use pkg-config for building these examples. Signed-off-by: Kevin Laatz <[email protected]>
2020-05-12examples: remove extra new line after link duplexIvan Dyukov
This patch removes extra 'new line' in few app examples. Fixes: d3641ae863 ("examples: update link status checks") Fixes: 387259bd6c ("examples/l2fwd-crypto: add sample application") Fixes: 4ff457986f ("examples/l2fwd-event: add default poll mode routines") Fixes: e64833f227 ("examples/l2fwd-keepalive: add sample application") Fixes: 204896f8d6 ("examples/l2fwd-jobstats: add new example") Fixes: c8e6ceeceb ("examples/ioat: add new sample app for ioat driver") Fixes: cc8f4d020c ("examples/ip_reassembly: initial import") Fixes: d299106e8e ("examples/ipsec-secgw: add IPsec sample application") Fixes: 39aad0e88c ("examples/flow_distributor: new example to demonstrate EFD") Fixes: d48415e1fe ("examples/performance-thread: add l3fwd-thread app") Fixes: 20c78ac9ee ("examples/vm_power_mgr: add port initialisation") Fixes: 361b2e9559 ("acl: new sample l3fwd-acl") Fixes: de3cfa2c98 ("sched: initial import") Fixes: d7937e2e3d ("power: initial import") Fixes: 3fc5ca2f63 ("kni: initial import") Cc: [email protected] Signed-off-by: Ivan Dyukov <[email protected]>
2020-04-23ethdev: add tracepointsSunil Kumar Kori
Add tracepoints at important and mandatory APIs for tracing support. Signed-off-by: Sunil Kumar Kori <[email protected]> Acked-by: David Marchand <[email protected]>
2020-04-16replace unused attributesThomas Monjalon
There is a common macro __rte_unused, avoiding warnings, which is now used where appropriate for consistency. Signed-off-by: Thomas Monjalon <[email protected]>
2019-10-27examples/server_node_efd: add server binary to meson buildBruce Richardson
When adding to the build, add in two missing includes that prevented build on freebsd, rather than just duplicating the makefile restriction. Signed-off-by: Bruce Richardson <[email protected]> Acked-by: Luca Boccassi <[email protected]>
2019-10-27examples/server_node_efd: add node binary to meson buildBruce Richardson
Signed-off-by: Bruce Richardson <[email protected]> Acked-by: Luca Boccassi <[email protected]>
2019-10-07examples: check status of getting MAC addressIgor Romanov
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]>
2019-10-07examples: check status of getting link infoIgor Romanov
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]>
2019-10-07examples: take promiscuous mode switch result into accountIvan Ilchenko
rte_eth_promiscuous_enable()/rte_eth_promiscuous_disable() return value was changed from void to int, so this patch modify usage of these functions across examples according to new return type. Signed-off-by: Ivan Ilchenko <[email protected]> Signed-off-by: Andrew Rybchenko <[email protected]>
2019-10-07examples: check status of getting ethdev infoIvan Ilchenko
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]>
2019-05-29fix off-by-one errors in snprintfMichael Santana
snprintf guarantees to always correctly place a null terminator in the buffer string. So manually placing a null terminator in a buffer right after a call to snprintf is redundant code. Additionally, there is no need to use 'sizeof(buffer) - 1' in snprintf as this means we are not using the last character in the buffer. 'sizeof(buffer)' is enough. Cc: [email protected] Signed-off-by: Michael Santana <[email protected]> Acked-by: Bruce Richardson <[email protected]> Acked-by: Anatoly Burakov <[email protected]>
2019-05-24net: add rte prefix to IP structureOlivier Matz
Add 'rte_' prefix to structures: - rename struct ipv4_hdr as struct rte_ipv4_hdr. - rename struct ipv6_hdr as struct rte_ipv6_hdr. 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]>
2019-05-24net: add rte prefix to ether structuresOlivier Matz
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]>
2019-03-30examples: detect default build directoryBruce Richardson
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]>
2019-03-12mk: use linux and freebsd in config namesBruce Richardson
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]>
2019-03-12build/linux: rename macro from LINUXAPP to LINUXBruce Richardson
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]>
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 <[email protected]>
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 <[email protected]> Signed-off-by: Thomas Monjalon <[email protected]> Reviewed-by: Andrew Rybchenko <[email protected]> Reviewed-by: Shahaf Shuler <[email protected]>
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 <[email protected]> Tested-by: David Marchand <[email protected]>
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 <[email protected]> Tested-by: Harry van Haaren <[email protected]>
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 <[email protected]>
2018-01-16examples/server_node_efd: 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 <[email protected]> Acked-by: Pablo de Lara <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
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 <[email protected]>
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 <[email protected]>
2017-11-06remove useless memzone includesThomas Monjalon
The memzone header is often included without good reason. Signed-off-by: Thomas Monjalon <[email protected]> Acked-by: Bruce Richardson <[email protected]>
2017-10-13examples: fix port id typeZhiyong Yang
Fixes: f8244c6399d9 ("ethdev: increase port id range") Signed-off-by: Zhiyong Yang <[email protected]>
2017-10-12mk: sort headers before wildcard inclusionLuca Boccassi
In order to achieve fully reproducible builds, always use the same inclusion order for headers in the Makefiles. Signed-off-by: Luca Boccassi <[email protected]>
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 <[email protected]> Acked-by: Adrien Mazarguil <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
2017-07-16examples: remove duplicate includesThomas Monjalon
Signed-off-by: Thomas Monjalon <[email protected]>
2017-07-08examples: adjust Rx and Tx descriptors to device limitsRoman Zhukov
Signed-off-by: Roman Zhukov <[email protected]> Signed-off-by: Andrew Rybchenko <[email protected]>
2017-03-29ring: return remaining entry count when dequeuingBruce Richardson
Add an extra parameter to the ring dequeue burst/bulk functions so that those functions can optionally return the amount of remaining objs in the ring. This information can be used by applications in a number of ways, for instance, with single-consumer queues, it provides a max dequeue size which is guaranteed to work. Signed-off-by: Bruce Richardson <[email protected]> Reviewed-by: Yuanhan Liu <[email protected]> Acked-by: Olivier Matz <[email protected]>
2017-03-29ring: return free space when enqueuingBruce Richardson
Add an extra parameter to the ring enqueue burst/bulk functions so that those functions can optionally return the amount of free space in the ring. This information can be used by applications in a number of ways, for instance, with single-producer queues, it provides a max enqueue size which is guaranteed to work. It can also be used to implement watermark functionality in apps, replacing the older functionality with a more flexible version, which enables apps to implement multiple watermark thresholds, rather than just one. Signed-off-by: Bruce Richardson <[email protected]> Reviewed-by: Yuanhan Liu <[email protected]> Acked-by: Olivier Matz <[email protected]>
2017-03-29ring: make bulk and burst return values consistentBruce Richardson
The bulk fns for rings returns 0 for all elements enqueued and negative for no space. Change that to make them consistent with the burst functions in returning the number of elements enqueued/dequeued, i.e. 0 or N. This change also allows the return value from enq/deq to be used directly without a branch for error checking. Signed-off-by: Bruce Richardson <[email protected]> Reviewed-by: Yuanhan Liu <[email protected]> Acked-by: Olivier Matz <[email protected]>