net/i40e/base: fix Tx descriptors number

The existing driver allows setting the number of TX descriptors
to the value that is indivisible by 32. This is not properly
supported by x710 hardware. The patch limits the number of TX
descriptors to the whole value of 32.

Fixes: 8db9e2a1b2 ("i40e: base driver")
Cc: stable@dpdk.org

Signed-off-by: Doug Dziggel <douglas.a.dziggel@intel.com>
Signed-off-by: Dariusz Chaberski <dariuszx.chaberski@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
This commit is contained in:
Xiaolong Ye 2020-01-13 10:39:30 +08:00 committed by Ferruh Yigit
parent 9e50258a91
commit 79bfe78087

View File

@ -79,8 +79,8 @@ typedef void (*I40E_ADMINQ_CALLBACK)(struct i40e_hw *, struct i40e_aq_desc *);
#define I40E_HI_BYTE(x) ((u8)(((x) >> 8) & 0xFF))
#define I40E_LO_BYTE(x) ((u8)((x) & 0xFF))
/* Number of Transmit Descriptors must be a multiple of 8. */
#define I40E_REQ_TX_DESCRIPTOR_MULTIPLE 8
/* Number of Transmit Descriptors must be a multiple of 32. */
#define I40E_REQ_TX_DESCRIPTOR_MULTIPLE 32
/* Number of Receive Descriptors must be a multiple of 32 if
* the number of descriptors is greater than 32.
*/