Skip to content

Commit

Permalink
net/ice: fix reading of RSS hash key
Browse files Browse the repository at this point in the history
The ICE driver returns only the first 40 bytes of its 52-byte RSS
hash key. This patch corrects this behavior.

Yuying Zhang <[email protected]> wrote the original patch, and
Michel Machado <[email protected]> back ported it to
Gatekeeper's custom DPDK.

This patch addresses one of the problems found with
the Intel 810 NIC. The following issue centralizes all the problems
related with this NIC:
AltraMayor/gatekeeper#634
  • Loading branch information
AltraMayor committed Jul 10, 2023
1 parent 133a51e commit ce91ff0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/net/ice/ice_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -3179,7 +3179,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 (is_safe_mode) {
Expand Down Expand Up @@ -3215,7 +3216,11 @@ static int ice_init_rss(struct ice_pf *pf)
RTE_MIN(rss_conf->rss_key_len,
vsi->rss_key_size));
}
rte_memcpy(key.standard_rss_key, vsi->rss_key, vsi->rss_key_size);
rte_memcpy(key.standard_rss_key, vsi->rss_key,
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 ce91ff0

Please sign in to comment.