Skip to contentSkip to conversation

net/iavf: fix endless loop

PATCH New Qi Zhang 1 participant 1 message Jul 25, 2019 Network drivers

lore
Share & tools
lore

Qi Zhang

author
#0 lore raw

PATCH 1/1 net/iavf: fix endless loop

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")
---
 drivers/net/iavf/iavf_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/iavf/iavf_rxtx.c +2 -1
index d8eb6d296..c2e4b8fa2 100644
@@ -144,7 +144,8 @@ check_rx_bulk_allow(struct iavf_rx_queue *rxq)
 static inline void
 reset_rx_queue(struct iavf_rx_queue *rxq)
 {
-	uint16_t len, i;
+	uint16_t len;
+	uint32_t i;
 
 	if (!rxq)
 		return;
Signature · 1 line
2.13.6