* [dpdk-dev] [PATCH v2] net/iavf: fix endless loop
@ 2019-07-25 4:38 Qi Zhang
2019-07-25 12:47 ` Ye Xiaolong
0 siblings, 1 reply; 3+ messages in thread
From: Qi Zhang @ 2019-07-25 4:38 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>
---
v2:
- add missing fix in reset_tx_queue.
drivers/net/iavf/iavf_rxtx.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index d8eb6d296..22d7bb612 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;
@@ -174,7 +175,8 @@ static inline void
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");
--
2.13.6
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/iavf: fix endless loop
2019-07-25 4:38 [dpdk-dev] [PATCH v2] net/iavf: fix endless loop Qi Zhang
@ 2019-07-25 12:47 ` Ye Xiaolong
2019-07-26 4:46 ` Zhang, Qi Z
0 siblings, 1 reply; 3+ messages in thread
From: Ye Xiaolong @ 2019-07-25 12:47 UTC (permalink / raw)
To: Qi Zhang; +Cc: wenzhuo.lu, jingjing.wu, lei.yao, dev, stable
On 07/25, Qi Zhang wrote:
>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>
>---
>v2:
>- add missing fix in reset_tx_queue.
>
> drivers/net/iavf/iavf_rxtx.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
>index d8eb6d296..22d7bb612 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;
>@@ -174,7 +175,8 @@ static inline void
> 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");
>--
>2.13.6
>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/iavf: fix endless loop
2019-07-25 12:47 ` Ye Xiaolong
@ 2019-07-26 4:46 ` Zhang, Qi Z
0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2019-07-26 4:46 UTC (permalink / raw)
To: Ye, Xiaolong; +Cc: Lu, Wenzhuo, Wu, Jingjing, Yao, Lei, dev, stable
> -----Original Message-----
> From: Ye, Xiaolong
> Sent: Thursday, July 25, 2019 8:47 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Yao, Lei <lei.yao@intel.com>; dev@dpdk.org;
> stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] net/iavf: fix endless loop
>
> On 07/25, Qi Zhang wrote:
> >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>
> >---
>
> Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-26 4:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-25 4:38 [dpdk-dev] [PATCH v2] net/iavf: fix endless loop Qi Zhang
2019-07-25 12:47 ` Ye Xiaolong
2019-07-26 4:46 ` Zhang, Qi Z
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).