From: Xiao Wang Date: Fri, 18 Mar 2016 02:27:35 +0000 (+0800) Subject: ixgbe: fix RETA query and update on X550 X-Git-Tag: spdx-start~7195 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2c4ee442c489260786a27cdc61653c950e0eaef4;p=dpdk.git ixgbe: fix RETA query and update on X550 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 --- diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index c03d53caf0..c20338270b 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -3741,11 +3741,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(); @@ -3795,11 +3795,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();