net/ice: fix default RSS key configuration
PATCH 1/1 net/ice: fix default RSS key configuration
There's chance that rte_rand() doesn't provision suitable values for RSS hash, an extreme example could be a key with a lot of 0s in it.
This patch adds a default RSS key which has been used in ixgbe driver and fm10k driver.
--- drivers/net/ice/ice_ethdev.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/net/ice/ice_ethdev.c +10 -1
@@ -2628,11 +2628,20 @@ static int ice_init_rss(struct ice_pf *pf) vsi->rss_lut =rte_zmalloc (NULL , vsi->rss_lut_size,0 ); +#define RSS_KEY_SIZE ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE +static uint8_t rss_intel_key[RSS_KEY_SIZE ] = { +0x6D ,0x5A ,0x56 ,0xDA ,0x25 ,0x5B ,0x0E ,0xC2 , +0x41 ,0x67 ,0x25 ,0x3D ,0x43 ,0xA3 ,0x8F ,0xB0 , +0xD0 ,0xCA ,0x2B ,0xCB ,0xAE ,0x7B ,0x30 ,0xB4 , +0x77 ,0xCB ,0x2D ,0xA3 ,0x80 ,0x30 ,0xF2 ,0x0C , +0x6A ,0x42 ,0xB7 ,0x3B ,0xBE ,0xAC ,0x01 ,0xFA , + }; +/* configure RSS key */ if (!rss_conf->rss_key) {/* Calculate the default hash key */ for (i =0 ; i <= vsi->rss_key_size; i++) - vsi->rss_key[i] = (uint8_t )rte_rand (); + vsi->rss_key[i] = rss_intel_key[i]; }else { rte_memcpy(vsi->rss_key, rss_conf->rss_key, RTE_MIN(rss_conf->rss_key_len,
Signature · 1 line
1.8.3.1
Quoted 14 lines
-----Original Message-----
From: Wang, Xiao W <[email protected]>
Sent: Tuesday, July 21, 2020 5:03 PM
To: Zhang, Qi Z <[email protected]>
Cc: [email protected]; Yang, Qiming <[email protected]>; Yao, Lei A <[email protected]>; Wu, Jingjing <[email protected]>; Wang, Xiao W <[email protected]>; [email protected]
Subject: [PATCH] net/ice: fix default RSS key configurationThere's chance that
rte_rand()doesn't provision suitable values for RSS hash, an extreme example could be a key with a lot of 0s in it.
Quoted 7 lines
This patch adds a default RSS key which has been used in ixgbe driver and fm10k driver.
Fixes 50370662b727 ("net/ice: support device and queue ops")Signed-off-by Xiao Wang <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi
Quoted 27 lines
-----Original Message-----
From: Zhang, Qi Z
Sent: Wednesday, July 22, 2020 1:26 PM
To: Wang, Xiao W <[email protected]>
Cc: [email protected]; Yang, Qiming <[email protected]>; Yao, Lei A <[email protected]>; Wu, Jingjing <[email protected]>; [email protected]
Subject: RE: [PATCH] net/ice: fix default RSS key configurationQuoted 15 lines
-----Original Message-----
From: Wang, Xiao W <[email protected]>
Sent: Tuesday, July 21, 2020 5:03 PM
To: Zhang, Qi Z <[email protected]>
Cc: [email protected]; Yang, Qiming <[email protected]>; Yao, Lei A <[email protected]>; Wu, Jingjing <[email protected]>; Wang, Xiao W <[email protected]>; [email protected]
Subject: [PATCH] net/ice: fix default RSS key configurationThere's chance that
rte_rand()doesn't provision suitable values for RSS hash, an extreme example could be a key with a lot of 0s in it.This patch adds a default RSS key which has been used in ixgbe driver and fm10k driver.
Quoted 8 lines
Quoted 4 lines
Fixes 50370662b727 ("net/ice: support device and queue ops")Signed-off-by Xiao Wang <[email protected]>Acked-by Qi Zhang <[email protected]>Applied to dpdk-next-net-intel.
After some internal discussion, we decide to keep the random key as default, and user can use rte_eth_dev_rss_hash_update to update a new key. So the patch has been removed from dpdk-next-net-intel.
Quoted 3 lines
Thanks
Qi