summaryrefslogtreecommitdiff
path: root/drivers/net/i40e
diff options
context:
space:
mode:
authorXiaoyun Li <xiaoyun.li@intel.com>2018-12-03 16:26:32 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2018-12-13 16:40:25 +0000
commit36c5dc8e5d3c73824fc962abd26d013f00c55cb3 (patch)
treee7f80850c80017e1be267830991b114d870a902e /drivers/net/i40e
parent81b531cfc235149f68a40842abf0767a4fbfe994 (diff)
downloaddpdk-next-eventdev-36c5dc8e5d3c73824fc962abd26d013f00c55cb3.zip
dpdk-next-eventdev-36c5dc8e5d3c73824fc962abd26d013f00c55cb3.tar.gz
dpdk-next-eventdev-36c5dc8e5d3c73824fc962abd26d013f00c55cb3.tar.xz
net/i40e: fix overwriting RSS RETA
When starting the device, the RSS table is initialized. So the RSS update before dev_start would be overwritten. This patch allows users to update the RSS reta table before dev_start and adjusts the order to set entries sequentially. Fixes: 4861cde46116 ("i40e: new poll mode driver") Cc: stable@dpdk.org Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Diffstat (limited to 'drivers/net/i40e')
-rw-r--r--drivers/net/i40e/i40e_ethdev.c21
-rw-r--r--drivers/net/i40e/i40e_ethdev.h3
2 files changed, 17 insertions, 7 deletions
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index f61a12e..c1934d9 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2453,6 +2453,8 @@ i40e_dev_stop(struct rte_eth_dev *dev)
pf->tm_conf.committed = false;
hw->adapter_stopped = 1;
+
+ pf->adapter->rss_reta_updated = 0;
}
static void
@@ -4264,6 +4266,8 @@ i40e_dev_rss_reta_update(struct rte_eth_dev *dev,
}
ret = i40e_set_rss_lut(pf->main_vsi, lut, reta_size);
+ pf->adapter->rss_reta_updated = 1;
+
out:
rte_free(lut);
@@ -8501,13 +8505,16 @@ i40e_pf_config_rss(struct i40e_pf *pf)
return -ENOTSUP;
}
- for (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) {
- if (j == num)
- j = 0;
- lut = (lut << 8) | (j & ((0x1 <<
- hw->func_caps.rss_table_entry_width) - 1));
- if ((i & 3) == 3)
- I40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), lut);
+ if (pf->adapter->rss_reta_updated == 0) {
+ for (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) {
+ if (j == num)
+ j = 0;
+ lut = (lut << 8) | (j & ((0x1 <<
+ hw->func_caps.rss_table_entry_width) - 1));
+ if ((i & 3) == 3)
+ I40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2),
+ rte_bswap32(lut));
+ }
}
rss_conf = pf->dev_data->dev_conf.rx_adv_conf.rss_conf;
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 11ecfc3..930eb9a 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -1081,6 +1081,9 @@ struct i40e_adapter {
/* For devargs */
uint8_t use_latest_vec;
+
+ /* For RSS reta table update */
+ uint8_t rss_reta_updated;
};
/**