numam-dpdk/examples/multi_process
Thomas Monjalon 8728ccf376 fix ethdev ports enumeration
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-18 00:25:27 +02:00
..
client_server_mp examples: increase default ring sizes to 1024 2018-02-01 00:10:42 +01:00
l2fwd_fork fix ethdev ports enumeration 2018-04-18 00:25:27 +02:00
simple_mp examples: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
symmetric_mp fix ethdev ports enumeration 2018-04-18 00:25:27 +02:00
Makefile examples: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00