Change loop index from uint16_t to uint32_t since max
index 65535 could be exceeded when ring size is 2k+.
Fixes:
69dd4c3d0898 ("net/avf: enable queue and device")
Cc: stable@dpdk.org
Reported-by: Lei Yao <lei.a.yao@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
static inline void
reset_rx_queue(struct iavf_rx_queue *rxq)
{
- uint16_t len, i;
+ uint16_t len;
+ uint32_t i;
if (!rxq)
return;
reset_tx_queue(struct iavf_tx_queue *txq)
{
struct iavf_tx_entry *txe;
- uint16_t i, prev, size;
+ uint32_t i, size;
+ uint16_t prev;
if (!txq) {
PMD_DRV_LOG(DEBUG, "Pointer to txq is NULL");