DPDK patches and discussions
 help / color / mirror / Atom feed
From: Wang Xiao W <xiao.w.wang@intel.com>
To: helin.zhang@intel.com
Cc: dev@dpdk.org, wenzhuo.lu@intel.com, Wang Xiao W <xiao.w.wang@intel.com>
Subject: [dpdk-dev] [PATCH] ixgbe: fix reta query and update on x550
Date: Fri, 18 Mar 2016 10:27:35 +0800	[thread overview]
Message-ID: <1458268055-22668-1-git-send-email-xiao.w.wang@intel.com> (raw)

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 <xiao.w.wang@intel.com>
---
 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();
-- 
1.9.3

             reply	other threads:[~2016-03-18  2:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-18  2:27 Wang Xiao W [this message]
2016-03-18  3:19 ` Lu, Wenzhuo
2016-03-22 17:19   ` Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1458268055-22668-1-git-send-email-xiao.w.wang@intel.com \
    --to=xiao.w.wang@intel.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).