ethdev: deprecate port count function
authorThomas Monjalon <thomas@monjalon.net>
Thu, 5 Apr 2018 15:33:22 +0000 (17:33 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 17 Apr 2018 22:48:41 +0000 (00:48 +0200)
commitd9a42a69febf453cdb735e77fc0e01463ddf4acc
tree02965fc7b153216e78ba1135d440d2085e46c1c0
parenta9dbe180222680edf8c49e86791f972549ce5be3
ethdev: deprecate port count function

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 <thomas@monjalon.net>
76 files changed:
app/proc-info/main.c
app/test-eventdev/evt_options.h
app/test-eventdev/test_perf_atq.c
app/test-eventdev/test_perf_common.c
app/test-eventdev/test_perf_queue.c
app/test-eventdev/test_pipeline_atq.c
app/test-eventdev/test_pipeline_common.c
app/test-eventdev/test_pipeline_queue.c
app/test-pmd/cmdline.c
app/test-pmd/testpmd.c
doc/guides/rel_notes/release_18_05.rst
doc/guides/sample_app_ug/quota_watermark.rst
examples/bond/main.c
examples/distributor/main.c
examples/ethtool/ethtool-app/main.c
examples/eventdev_pipeline/main.c
examples/eventdev_pipeline/pipeline_worker_tx.c
examples/exception_path/main.c
examples/flow_classify/flow_classify.c
examples/flow_filtering/Makefile
examples/flow_filtering/main.c
examples/flow_filtering/meson.build
examples/ip_fragmentation/main.c
examples/ip_reassembly/main.c
examples/ipv4_multicast/main.c
examples/kni/main.c
examples/l2fwd-cat/l2fwd-cat.c
examples/l2fwd-crypto/main.c
examples/l2fwd-jobstats/main.c
examples/l2fwd-keepalive/main.c
examples/l2fwd/main.c
examples/l3fwd-acl/main.c
examples/l3fwd-power/main.c
examples/l3fwd-vf/main.c
examples/l3fwd/main.c
examples/link_status_interrupt/Makefile
examples/link_status_interrupt/main.c
examples/link_status_interrupt/meson.build
examples/multi_process/client_server_mp/mp_client/Makefile
examples/multi_process/client_server_mp/mp_client/client.c
examples/multi_process/client_server_mp/mp_server/Makefile
examples/multi_process/client_server_mp/mp_server/init.c
examples/multi_process/l2fwd_fork/main.c
examples/multi_process/symmetric_mp/main.c
examples/netmap_compat/bridge/Makefile
examples/netmap_compat/bridge/bridge.c
examples/packet_ordering/main.c
examples/performance-thread/l3fwd-thread/main.c
examples/ptpclient/ptpclient.c
examples/qos_sched/Makefile
examples/qos_sched/init.c
examples/qos_sched/meson.build
examples/quota_watermark/qw/Makefile
examples/quota_watermark/qw/init.c
examples/rxtx_callbacks/main.c
examples/server_node_efd/node/Makefile
examples/server_node_efd/node/node.c
examples/server_node_efd/server/Makefile
examples/server_node_efd/server/init.c
examples/skeleton/basicfwd.c
examples/skeleton/meson.build
examples/tep_termination/main.c
examples/vhost/main.c
examples/vm_power_manager/main.c
examples/vmdq/main.c
examples/vmdq_dcb/main.c
lib/librte_ether/rte_ethdev.c
lib/librte_ether/rte_ethdev.h
lib/librte_ether/rte_ethdev_version.map
lib/librte_eventdev/rte_event_eth_rx_adapter.c
test/test/test_event_eth_rx_adapter.c
test/test/test_kni.c
test/test/test_link_bonding_mode4.c
test/test/test_link_bonding_rssconf.c
test/test/test_pmd_perf.c
test/test/test_pmd_ring.c