patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/iavf: fix endless loop
@ 2019-07-25  4:32 Qi Zhang
  0 siblings, 0 replies; 2+ messages in thread
From: Qi Zhang @ 2019-07-25  4:32 UTC (permalink / raw)
  To: wenzhuo.lu, jingjin.wu; +Cc: lei.yao, dev, Qi Zhang, stable

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.yao@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index d8eb6d296..c2e4b8fa2 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -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;
-- 
2.13.6


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dpdk-stable] [PATCH] net/iavf: fix endless loop
@ 2019-07-25  4:33 Qi Zhang
  0 siblings, 0 replies; 2+ messages in thread
From: Qi Zhang @ 2019-07-25  4:33 UTC (permalink / raw)
  To: wenzhuo.lu, jingjing.wu; +Cc: lei.yao, dev, Qi Zhang, stable

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.yao@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index d8eb6d296..c2e4b8fa2 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -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;
-- 
2.13.6


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-25  4:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-25  4:32 [dpdk-stable] [PATCH] net/iavf: fix endless loop Qi Zhang
2019-07-25  4:33 Qi Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).