#
92e68d9c |
| 14-May-2024 |
Tyler Retzlaff <roretzla@linux.microsoft.com> |
examples: use stdatomic API
Replace the use of gcc builtin __atomic_xxx intrinsics with corresponding rte_atomic_xxx optional rte stdatomic API.
Signed-off-by: Tyler Retzlaff <roretzla@linux.micros
examples: use stdatomic API
Replace the use of gcc builtin __atomic_xxx intrinsics with corresponding rte_atomic_xxx optional rte stdatomic API.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
69f9d8aa |
| 10-Nov-2021 |
Gregory Etelson <getelson@nvidia.com> |
examples/multi_process: fix Rx packets distribution
MP servers distributes Rx packets between clients according to round-robin scheme.
Current implementation always started packets distribution fro
examples/multi_process: fix Rx packets distribution
MP servers distributes Rx packets between clients according to round-robin scheme.
Current implementation always started packets distribution from the first client. That procedure resulted in uniform distribution in cases when Rx packets number was around clients number multiplication. However, if RX burst repeatedly returned single packet, round-robin scheme would not work because all packets were assigned to the first client only.
The patch does not restart packets distribution from the first client. Packets distribution always continues to the next client.
Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
show more ...
|
#
9b882c5b |
| 13-Oct-2021 |
Joyce Kong <joyce.kong@arm.com> |
examples/multi_process: use compiler atomics for sync
Convert rte_atomic32_test_and_set usage to compiler atomic CAS operation for display_stats sync.
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
examples/multi_process: use compiler atomics for sync
Convert rte_atomic32_test_and_set usage to compiler atomic CAS operation for display_stats sync.
Signed-off-by: Joyce Kong <joyce.kong@arm.com> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
show more ...
|
#
10aa3757 |
| 15-Apr-2021 |
Chengchang Tang <tangchengchang@huawei.com> |
examples: add eal cleanup to examples
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 use
examples: add eal cleanup to examples
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: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
show more ...
|
#
27b549c1 |
| 28-Oct-2020 |
Bruce Richardson <bruce.richardson@intel.com> |
examples/multi_process: fix build on Ubuntu 20.04
Two warnings are reported by gcc 9.3.0 on Ubuntu 20.04.
When producing a printable mac address the buffer was appropriately sized for holding the m
examples/multi_process: fix build on Ubuntu 20.04
Two warnings are reported by gcc 9.3.0 on Ubuntu 20.04.
When producing a printable mac address the buffer was appropriately sized for holding the mac address exactly, but the actual snprintf included a '\n' character at the end, which means that the snprintf technically is getting truncated i.e. the \n would not be added due to lack of space. This gets flagged as a problem by modern versions of gcc, e.g. on Ubuntu 20.04.
main.c:77:37: warning: ‘__builtin___snprintf_chk’ output truncated before the last format character [-Wformat-truncation=] 77 | "%02x:%02x:%02x:%02x:%02x:%02x\n", | ^
Since the \n is getting stripped anyway, we can fix the issue by just removing it. In the process we can switch to using the standard ethernet address formatting function from rte_ether.h.
The other warning is about possible string truncation when getting the RX queue name:
In file included from init.c:36: init.c: In function ‘init’: ../shared/common.h:38:28: warning: ‘%u’ directive output may be truncated writing between 1 and 10 bytes into a region of size 8 [-Wformat-truncation=] 38 | #define MP_CLIENT_RXQ_NAME "MProc_Client_%u_RX" | ^~~~~~~~~~~~~~~~~~~~ ../shared/common.h:52:35: note: in expansion of macro ‘MP_CLIENT_RXQ_NAME’ 52 | snprintf(buffer, sizeof(buffer), MP_CLIENT_RXQ_NAME, id); | ^~~~~~~~~~~~~~~~~~
This is a false positive, as the value of the "id" is limited to 255, being stored in the app as a uint8_t value, removing the possibility of the %u being replaced by anything other then 3 characters max (rather than up to 10 as thought by the compiler). Therefore, the warning can be easily removed by changing the type of the "id" parameter to the local function from "unsigned" to "uint8_t" also, ensuring the compiler is aware of the range limit.
Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Radu Nicolau <radu.nicolau@intel.com>
show more ...
|
#
cb056611 |
| 15-Oct-2020 |
Stephen Hemminger <stephen@networkplumber.org> |
eal: rename lcore master and slave
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.
T
eal: rename lcore master and slave
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 <stephen@networkplumber.org> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
show more ...
|
#
f2fc83b4 |
| 09-Feb-2020 |
Thomas Monjalon <thomas@monjalon.net> |
replace unused attributes
There is a common macro __rte_unused, avoiding warnings, which is now used where appropriate for consistency.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
|
#
70febdcf |
| 10-Sep-2019 |
Igor Romanov <igor.romanov@oktetlabs.ru> |
examples: check status of getting MAC address
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-
examples: check status of getting MAC address
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 <igor.romanov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
show more ...
|
#
99683979 |
| 05-Jun-2019 |
David Marchand <david.marchand@redhat.com> |
examples/multi_process: fix FreeBSD build
Caught on FreeBSD 12:
/usr/include/netinet/ip.h:71:17: error: field 'ip_src' has incomplete type struct in_addr ip_src,ip_dst; /* source and dest address
examples/multi_process: fix FreeBSD build
Caught on FreeBSD 12:
/usr/include/netinet/ip.h:71:17: error: field 'ip_src' has incomplete type struct in_addr ip_src,ip_dst; /* source and dest address */ ^~~~~~
On FreeBSD, netinet/ip.h is not auto sufficient like on Linux. But actually, this header is not used in the example, just remove it.
Fixes: 764bf26873b9 ("add FreeBSD support") Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com> Tested-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|
#
6d13ea8e |
| 21-May-2019 |
Olivier Matz <olivier.matz@6wind.com> |
net: add rte prefix to ether structures
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_
net: add rte prefix to ether structures
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 <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>
show more ...
|
#
a894d96e |
| 27-Sep-2018 |
Raslan Darawsheh <rasland@mellanox.com> |
examples/multi_process: add sigint handler to server
add sigint handler in the server application to stop and close ports
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
|
#
3998e2a0 |
| 19-Dec-2017 |
Bruce Richardson <bruce.richardson@intel.com> |
examples: use SPDX tag for Intel copyright files
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@i
examples: use SPDX tag for Intel copyright files
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>
show more ...
|
#
015f9489 |
| 03-Nov-2017 |
Bruce Richardson <bruce.richardson@intel.com> |
examples: remove dependency on PCI
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 sa
examples: remove dependency on PCI
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>
show more ...
|
#
4c00cfdc |
| 04-Nov-2017 |
Thomas Monjalon <thomas@monjalon.net> |
remove useless memzone includes
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>
|
#
f8244c63 |
| 29-Sep-2017 |
Zhiyong Yang <zhiyong.yang@intel.com> |
ethdev: increase port id range
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
ethdev: increase port id range
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>
show more ...
|
#
b5906927 |
| 16-Jul-2017 |
Thomas Monjalon <thomas@monjalon.net> |
examples: remove duplicate includes
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
|
#
14fbffb0 |
| 29-Mar-2017 |
Bruce Richardson <bruce.richardson@intel.com> |
ring: return free space when enqueuing
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 inform
ring: return free space when enqueuing
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 <bruce.richardson@intel.com> Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
show more ...
|
#
cfa7c9e6 |
| 29-Mar-2017 |
Bruce Richardson <bruce.richardson@intel.com> |
ring: make bulk and burst return values consistent
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
ring: make bulk and burst return values consistent
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 <bruce.richardson@intel.com> Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
show more ...
|
#
c6946933 |
| 06-Jul-2016 |
Thomas Monjalon <thomas.monjalon@6wind.com> |
examples: fix dependencies on hash library
The multi_process example do not need rte_hash. But these examples cannot compile if rte_hash is not available: - ipsec-secgw (was already protected - no c
examples: fix dependencies on hash library
The multi_process example do not need rte_hash. But these examples cannot compile if rte_hash is not available: - ipsec-secgw (was already protected - no change) - ipv4_multicast - l3fwd-power - l3fwd-vf - tep_termination - ip_pipeline
The ip_pipeline example is not disabled because its dependencies are handled with #ifdef. It may require a separate fix.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
show more ...
|
#
ff708fac |
| 04-Mar-2015 |
David Marchand <david.marchand@6wind.com> |
tailq: remove unneeded inclusions
Only keep inclusion where really needed.
Signed-off-by: David Marchand <david.marchand@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
|
#
98a16481 |
| 26-Sep-2014 |
David Marchand <david.marchand@6wind.com> |
examples: no more bare metal environment
Signed-off-by: David Marchand <david.marchand@6wind.com> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.
examples: no more bare metal environment
Signed-off-by: David Marchand <david.marchand@6wind.com> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
show more ...
|
#
6f41fe75 |
| 24-Jun-2014 |
Stephen Hemminger <stephen@networkplumber.org> |
eal: deprecate rte_snprintf
The function rte_snprintf serves no useful purpose. It is the same as snprintf() for all valid inputs. Deprecate it and replace all uses in current code.
Leave the tests
eal: deprecate rte_snprintf
The function rte_snprintf serves no useful purpose. It is the same as snprintf() for all valid inputs. Deprecate it and replace all uses in current code.
Leave the tests for the deprecated function in place.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
show more ...
|
#
3031749c |
| 03-Jun-2014 |
Bruce Richardson <bruce.richardson@intel.com> |
remove trailing whitespaces
This commit removes trailing whitespace from lines in files. Almost all files are affected, as the BSD license copyright header had trailing whitespace on 4 lines in it [
remove trailing whitespaces
This commit removes trailing whitespace from lines in files. Almost all files are affected, as the BSD license copyright header had trailing whitespace on 4 lines in it [hence the number of files reporting 8 lines changed in the diffstat].
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> [Thomas: remove spaces before tabs in libs] [Thomas: remove more trailing spaces in non-C files] Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
show more ...
|
#
e9d48c00 |
| 10-Feb-2014 |
Bruce Richardson <bruce.richardson@intel.com> |
update Intel copyright years to 2014
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
|
#
1c1d4d7a |
| 18-Sep-2013 |
Intel <intel.com> |
doc: whitespace changes in licenses
Signed-off-by: Intel
|