From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4DF95A046B for ; Thu, 25 Jul 2019 06:30:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EC2101C268; Thu, 25 Jul 2019 06:30:51 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id D5F781C24A; Thu, 25 Jul 2019 06:30:49 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2019 21:30:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,305,1559545200"; d="scan'208";a="345313029" Received: from dpdk51.sh.intel.com ([10.67.110.245]) by orsmga005.jf.intel.com with ESMTP; 24 Jul 2019 21:30:47 -0700 From: Qi Zhang To: wenzhuo.lu@intel.com, jingjing.wu@intel.com Cc: lei.yao@intel.com, dev@dpdk.org, Qi Zhang , stable@dpdk.org Date: Thu, 25 Jul 2019 12:33:22 +0800 Message-Id: <20190725043322.37834-1-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 Subject: [dpdk-dev] [PATCH] net/iavf: fix endless loop X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Signed-off-by: Qi Zhang --- 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