Skip to content

Commit

Permalink
net/ice: fix RSS hash key generation
Browse files Browse the repository at this point in the history
[ upstream commit b9f28be1bf72e120041416b461325941fd97cac0 ]

Current code just generated 40 bytes standard rss
hash key of ice driver. The extended 12 bytes
were filled by hardware and were invalid for users.
This patch generate 52 bytes rss hash key for ice
driver just as other drivers.

Fixes: 5037066 ("net/ice: support device and queue ops")
Fixes: 20d6a01 ("net/ice: fix build with GCC 12")

Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
  • Loading branch information
Yuying2intel authored and kevintraynor committed Jul 18, 2023
1 parent f81d03d commit 670782b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/net/ice/ice_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -3199,7 +3199,8 @@ static int ice_init_rss(struct ice_pf *pf)

rss_conf = &dev_data->dev_conf.rx_adv_conf.rss_conf;
nb_q = dev_data->nb_rx_queues;
vsi->rss_key_size = ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE;
vsi->rss_key_size = ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE +
ICE_AQC_GET_SET_RSS_KEY_DATA_HASH_KEY_SIZE;
vsi->rss_lut_size = pf->hash_lut_size;

if (nb_q == 0) {
Expand Down Expand Up @@ -3240,7 +3241,10 @@ static int ice_init_rss(struct ice_pf *pf)
vsi->rss_key_size));

rte_memcpy(key.standard_rss_key, vsi->rss_key,
RTE_MIN(sizeof(key.standard_rss_key), vsi->rss_key_size));
ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE);
rte_memcpy(key.extended_hash_key,
&vsi->rss_key[ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE],
ICE_AQC_GET_SET_RSS_KEY_DATA_HASH_KEY_SIZE);
ret = ice_aq_set_rss_key(hw, vsi->idx, &key);
if (ret)
goto out;
Expand Down

0 comments on commit 670782b

Please sign in to comment.