From patchwork Fri Mar 18 02:27:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Wang X-Patchwork-Id: 11580 X-Patchwork-Delegate: bruce.richardson@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 3F68958D6; Fri, 18 Mar 2016 03:27:47 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id DA8DB2E8D for ; Fri, 18 Mar 2016 03:27:44 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 17 Mar 2016 19:27:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,352,1455004800"; d="scan'208";a="766509418" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga003.jf.intel.com with ESMTP; 17 Mar 2016 19:27:43 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u2I2Re7a032672; Fri, 18 Mar 2016 10:27:40 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u2I2Rbqm022702; Fri, 18 Mar 2016 10:27:39 +0800 Received: (from xiaowan1@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u2I2Rbtd022698; Fri, 18 Mar 2016 10:27:37 +0800 From: Wang Xiao W To: helin.zhang@intel.com Cc: dev@dpdk.org, wenzhuo.lu@intel.com, Wang Xiao W Date: Fri, 18 Mar 2016 10:27:35 +0800 Message-Id: <1458268055-22668-1-git-send-email-xiao.w.wang@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] ixgbe: fix reta query and update on x550 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" For x550 device, the reta table has 512 entries, but in function ixgbe_dev_rss_reta_query and ixgbe_dev_rss_reta_update we use an "uint8_t i" to traverse the entries, this will lead the function to an endless loop. This patch changes the data type from uint8_t to uint16_t to fix the issue. Fixes: 4bee94a6c22f ("ixgbe: support 512 RSS entries on x550") Signed-off-by: Wang Xiao W Acked-by: Wenzhuo Lu --- drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index afe6582..46c5d4d 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -3640,11 +3640,11 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size) { - uint8_t i, j, mask; + uint16_t i, sp_reta_size; + uint8_t j, mask; uint32_t reta, r; uint16_t idx, shift; struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); - uint16_t sp_reta_size; uint32_t reta_reg; PMD_INIT_FUNC_TRACE(); @@ -3694,11 +3694,11 @@ ixgbe_dev_rss_reta_query(struct rte_eth_dev *dev, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size) { - uint8_t i, j, mask; + uint16_t i, sp_reta_size; + uint8_t j, mask; uint32_t reta; uint16_t idx, shift; struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); - uint16_t sp_reta_size; uint32_t reta_reg; PMD_INIT_FUNC_TRACE();