Skip to content

Commit ce91ff0

Browse files
committed
net/ice: fix reading of RSS hash key
The ICE driver returns only the first 40 bytes of its 52-byte RSS hash key. This patch corrects this behavior. Yuying Zhang <yuying.zhang@intel.com> wrote the original patch, and Michel Machado <michel@digirati.com.br> 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
1 parent 133a51e commit ce91ff0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/net/ice/ice_ethdev.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -3179,7 +3179,8 @@ static int ice_init_rss(struct ice_pf *pf)
31793179

31803180
rss_conf = &dev->data->dev_conf.rx_adv_conf.rss_conf;
31813181
nb_q = dev->data->nb_rx_queues;
3182-
vsi->rss_key_size = ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE;
3182+
vsi->rss_key_size = ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE +
3183+
ICE_AQC_GET_SET_RSS_KEY_DATA_HASH_KEY_SIZE;
31833184
vsi->rss_lut_size = pf->hash_lut_size;
31843185

31853186
if (is_safe_mode) {
@@ -3215,7 +3216,11 @@ static int ice_init_rss(struct ice_pf *pf)
32153216
RTE_MIN(rss_conf->rss_key_len,
32163217
vsi->rss_key_size));
32173218
}
3218-
rte_memcpy(key.standard_rss_key, vsi->rss_key, vsi->rss_key_size);
3219+
rte_memcpy(key.standard_rss_key, vsi->rss_key,
3220+
ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE);
3221+
rte_memcpy(key.extended_hash_key,
3222+
&vsi->rss_key[ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE],
3223+
ICE_AQC_GET_SET_RSS_KEY_DATA_HASH_KEY_SIZE);
32193224
ret = ice_aq_set_rss_key(hw, vsi->idx, &key);
32203225
if (ret)
32213226
goto out;

0 commit comments

Comments
 (0)