History log of /dpdk/examples/multi_process/client_server_mp/mp_server/main.c (Results 1 – 25 of 29)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2, v22.03-rc1, v21.11, v21.11-rc4, v21.11-rc3
# 69f9d8aa 10-Nov-2021 Gregory Etelson <[email protected]>

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: [email protected]

Signed-off-by: Gregory Etelson <[email protected]>
Acked-by: Anatoly Burakov <[email protected]>

show more ...


Revision tags: v21.11-rc2, v21.11-rc1
# 9b882c5b 13-Oct-2021 Joyce Kong <[email protected]>

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 <[email protected]>

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 <[email protected]>
Reviewed-by: Ruifeng Wang <[email protected]>

show more ...


Revision tags: v21.08, v21.08-rc4, v21.08-rc3, v21.08-rc2, v21.08-rc1, v21.05, v21.05-rc4, v21.05-rc3, v21.05-rc2, v21.05-rc1
# 10aa3757 15-Apr-2021 Chengchang Tang <[email protected]>

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: [email protected]

Signed-off-by: Chengchang Tang <[email protected]>

show more ...


Revision tags: v21.02, v21.02-rc4, v21.02-rc3, v21.02-rc2, v21.02-rc1, v20.11, v20.11-rc5, v20.11-rc4, v20.11-rc3, v20.11-rc2
# 27b549c1 28-Oct-2020 Bruce Richardson <[email protected]>

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: [email protected]

Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Radu Nicolau <[email protected]>

show more ...


Revision tags: v20.11-rc1
# cb056611 15-Oct-2020 Stephen Hemminger <[email protected]>

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 <[email protected]>
Acked-by: Anatoly Burakov <[email protected]>

show more ...


Revision tags: v20.08, v20.08-rc4, v20.08-rc3, v20.08-rc2, v20.08-rc1, v20.05, v20.05-rc4, v20.05-rc3, v20.05-rc2, v20.05-rc1, v20.02, v20.02-rc4, v20.02-rc3
# f2fc83b4 09-Feb-2020 Thomas Monjalon <[email protected]>

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 <[email protected]>


Revision tags: v20.02-rc2, v20.02-rc1, v19.11, v19.11-rc4, v19.11-rc3, v19.11-rc2, v19.11-rc1
# 70febdcf 10-Sep-2019 Igor Romanov <[email protected]>

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 <[email protected]>
Signed-off-by: Andrew Rybchenko <[email protected]>

show more ...


Revision tags: v19.08, v19.08-rc4, v19.08-rc3, v19.08-rc2, v19.08-rc1
# 99683979 05-Jun-2019 David Marchand <[email protected]>

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: [email protected]

Signed-off-by: David Marchand <[email protected]>
Tested-by: Bruce Richardson <[email protected]>
Acked-by: Bruce Richardson <[email protected]>

show more ...


# 6d13ea8e 21-May-2019 Olivier Matz <[email protected]>

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 <[email protected]>
Reviewed-by: Stephen Hemminger <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>

show more ...


Revision tags: v19.05, v19.05-rc4, v19.05-rc3, v19.05-rc2, v19.05-rc1, v19.02, v19.02-rc4, v19.02-rc3, v19.02-rc2, v19.02-rc1, v18.11, v18.11-rc5, v18.11-rc4, v18.11-rc3, v18.11-rc2, v18.11-rc1
# a894d96e 27-Sep-2018 Raslan Darawsheh <[email protected]>

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 <[email protected]>


Revision tags: v18.08, v18.08-rc3, v18.08-rc2, v18.08-rc1, v18.05, v18.05-rc6, v18.05-rc5, v18.05-rc4, v18.05-rc3, v18.05-rc2, v18.05-rc1, v18.02, v18.02-rc4, v18.02-rc3, v18.02-rc2, v18.02-rc1
# 3998e2a0 19-Dec-2017 Bruce Richardson <[email protected]>

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 <[email protected]>

show more ...


Revision tags: v17.11, v17.11-rc4, v17.11-rc3
# 015f9489 03-Nov-2017 Bruce Richardson <[email protected]>

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 <[email protected]>

show more ...


# 4c00cfdc 04-Nov-2017 Thomas Monjalon <[email protected]>

remove useless memzone includes

The memzone header is often included without good reason.

Signed-off-by: Thomas Monjalon <[email protected]>
Acked-by: Bruce Richardson <[email protected]>


Revision tags: v17.11-rc2, v17.11-rc1
# f8244c63 29-Sep-2017 Zhiyong Yang <[email protected]>

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 <[email protected]>
Acked-by: Adrien Mazarguil <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>

show more ...


Revision tags: v17.08, v17.08-rc4, v17.08-rc3, v17.08-rc2
# b5906927 16-Jul-2017 Thomas Monjalon <[email protected]>

examples: remove duplicate includes

Signed-off-by: Thomas Monjalon <[email protected]>


Revision tags: v17.08-rc1, v17.05, v17.05-rc4, v17.05-rc3, v17.05-rc2, v17.05-rc1
# 14fbffb0 29-Mar-2017 Bruce Richardson <[email protected]>

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 <[email protected]>
Reviewed-by: Yuanhan Liu <[email protected]>
Acked-by: Olivier Matz <[email protected]>

show more ...


# cfa7c9e6 29-Mar-2017 Bruce Richardson <[email protected]>

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 <[email protected]>
Reviewed-by: Yuanhan Liu <[email protected]>
Acked-by: Olivier Matz <[email protected]>

show more ...


Revision tags: v17.02, v17.02-rc3, v17.02-rc2, v17.02-rc1, v16.11, v16.11-rc3, v16.11-rc2, v16.11-rc1, v16.07, v16.07-rc5, v16.07-rc4, v16.07-rc3, v16.07-rc2
# c6946933 06-Jul-2016 Thomas Monjalon <[email protected]>

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 <[email protected]>

show more ...


Revision tags: v16.07-rc1, v16.04, v16.04-rc4, v16.04-rc3, v16.04-rc2, v16.04-rc1, v2.2.0, v2.2.0-rc4, v2.2.0-rc3, v2.2.0-rc2, v2.2.0-rc1, v2.1.0, v2.1.0-rc4, v2.1.0-rc3, v2.1.0-rc2, v2.1.0-rc1, v2.0.0, v2.0.0-rc3, v2.0.0-rc2
# ff708fac 04-Mar-2015 David Marchand <[email protected]>

tailq: remove unneeded inclusions

Only keep inclusion where really needed.

Signed-off-by: David Marchand <[email protected]>
Acked-by: Neil Horman <[email protected]>


Revision tags: v2.0.0-rc1, v1.8.0, v1.8.0-rc6, v1.8.0-rc5, v1.8.0-rc4, v1.8.0-rc3, v1.8.0-rc2, v1.8.0-rc1
# 98a16481 26-Sep-2014 David Marchand <[email protected]>

examples: no more bare metal environment

Signed-off-by: David Marchand <[email protected]>
Signed-off-by: Thomas Monjalon <[email protected]>
Acked-by: Neil Horman <nhorman@tuxdriver.

examples: no more bare metal environment

Signed-off-by: David Marchand <[email protected]>
Signed-off-by: Thomas Monjalon <[email protected]>
Acked-by: Neil Horman <[email protected]>

show more ...


Revision tags: v1.7.1, v1.7.0, v1.7.0-rc4, v1.7.0-rc3, v1.7.0-rc2
# 6f41fe75 24-Jun-2014 Stephen Hemminger <[email protected]>

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 <[email protected]>
Acked-by: Thomas Monjalon <[email protected]>

show more ...


Revision tags: v1.7.0-rc1
# 3031749c 03-Jun-2014 Bruce Richardson <[email protected]>

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 <[email protected]>
Acked-by: Neil Horman <[email protected]>
[Thomas: remove spaces before tabs in libs]
[Thomas: remove more trailing spaces in non-C files]
Signed-off-by: Thomas Monjalon <[email protected]>

show more ...


Revision tags: v1.6.0r2, v1.6.0r1, v1.6.0r0, v1.5.2r2
# e9d48c00 10-Feb-2014 Bruce Richardson <[email protected]>

update Intel copyright years to 2014

Signed-off-by: Bruce Richardson <[email protected]>


Revision tags: v1.5.2r1, v1.5.2r0, v1.5.1r2, v1.5.1r1, v1.5.1r0, v1.5.0r2, v1.4.1r2, v1.5.0r1, v1.5.0r0
# 1c1d4d7a 18-Sep-2013 Intel <intel.com>

doc: whitespace changes in licenses

Signed-off-by: Intel


Revision tags: v1.4.1r1, v1.4.1r0, v1.4.0r0, v1.3.1r3, v1.3.1r2, v1.3.1r1, v1.3.1r0, v1.3.0r0, v1.2.3r4, v1.2.3r3
# cdfd5dbb 03-Jun-2013 Intel <intel.com>

examples: work only on defined lcores

Signed-off-by: Intel


12