kni: optimize Rx burst size computation
authorJay Rolette <rolette@infiniteio.com>
Wed, 3 Jun 2015 19:18:56 +0000 (14:18 -0500)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 16 Jun 2015 14:50:27 +0000 (16:50 +0200)
commita1f8789546ce5011de77361cbff3d3383464ffd7
tree5a54551463ab3694bb8b13bf66587fceb5d63448
parentda9cc0b9df1f9a6caa9ce19e743e9aae8cd858cb
kni: optimize Rx burst size computation

No reason to check out many entries are in kni->rx_q prior to
actually pulling them from the fifo. You can't dequeue more than
are there anyway. Max entries to dequeue is either the max batch
size or however much space is available on kni->free_q (lesser of the two).

Signed-off-by: Jay Rolette <rolette@infiniteio.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
lib/librte_eal/linuxapp/kni/kni_net.c