ethdev: move a queue id check to generic layer
authorOlivier Matz <olivier.matz@6wind.com>
Fri, 17 Feb 2017 15:25:33 +0000 (16:25 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 9 Mar 2017 18:29:51 +0000 (19:29 +0100)
commit0ef850c4f6a506370cc448a7631f4de966a2f991
tree5ea008cd31768a70332cc0013c6eb6d32f9cbd31
parent44e93f4a34764f1798846fa6b40a666e35accaed
ethdev: move a queue id check to generic layer

The check of queue_id is done in all drivers implementing
rte_eth_rx_queue_count(). Factorize this check in the generic function.

Note that the nfp driver was doing the check differently, which could
induce crashes if the queue index was too big.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
drivers/net/e1000/em_rxtx.c
drivers/net/e1000/igb_rxtx.c
drivers/net/enic/enic_ethdev.c
drivers/net/i40e/i40e_rxtx.c
drivers/net/ixgbe/ixgbe_rxtx.c
drivers/net/nfp/nfp_net.c
lib/librte_ether/rte_ethdev.h