ethdev: add sanity checks to functions
authorBruce Richardson <bruce.richardson@intel.com>
Tue, 24 Nov 2015 17:37:57 +0000 (17:37 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 25 Nov 2015 18:18:04 +0000 (19:18 +0100)
commit33cf6be04d603e99056cbc88ddf46dc58d836e02
tree924791f1027444f49b46c5ea4624991a05c10b2c
parent71594065e2187b10a9252f8ac94c37ad9c645bb4
ethdev: add sanity checks to functions

The functions rte_eth_rx_queue_count and rte_eth_descriptor_done are
supported by very few PMDs. Therefore, it is best to check for support
for the functions in the ethdev library, so as to avoid run-time crashes
at run-time if the application goes to use those APIs. Similarly, the
port parameter should also be checked for validity.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
doc/guides/rel_notes/release_2_2.rst
lib/librte_ether/rte_ethdev.h