net/i40e: fix Rx instability with vector mode
authorBeilei Xing <beilei.xing@intel.com>
Mon, 5 Nov 2018 03:18:12 +0000 (11:18 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Mon, 5 Nov 2018 15:50:14 +0000 (16:50 +0100)
commit054d1be48cc114c5d3bf87c7ebdf46703876e8d5
tree5f9a2d6ee0cf44bad860de7692a6d60968ed3005
parent37cf9ea83dc27be4917dbd01aaae182df9800c7f
net/i40e: fix Rx instability with vector mode

Previously, there is instability during vector Rx if descriptor
number is not power of 2, e.g. process hang and some Rx packets
are unexpectedly empty. That's because vector Rx mode assumes Rx
descriptor number is power of 2 when doing bit mask.
This patch allows vector mode only when the number of Rx descriptor
is power of 2.

Fixes: 8e109464c022 ("i40e: allow vector Rx and Tx usage")
Fixes: a3c83a2527e1 ("net/i40e: enable runtime queue setup")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
doc/guides/nics/i40e.rst
drivers/net/i40e/i40e_rxtx.c
drivers/net/i40e/i40e_rxtx_vec_common.h