numam-dpdk/lib/librte_kni
Thomas Monjalon a9dbe18022 fix ethdev port id validation
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 assume a valid port index is in the range [0..count[.

There are three consequences when using such wrong design:
    - new ports having an index higher than the port count won't be valid
    - old ports being detached (RTE_ETH_DEV_UNUSED) can be valid

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 function rte_eth_dev_is_valid_port.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-04-18 00:37:05 +02:00
..
Makefile lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
meson.build build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
rte_kni_fifo.h lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte_kni_version.map kni: remove deprecated functions 2015-09-03 19:22:48 +02:00
rte_kni.c fix ethdev port id validation 2018-04-18 00:37:05 +02:00
rte_kni.h kni: set initial value for MTU 2018-02-01 01:03:26 +01:00