Skip to content
Snippets Groups Projects
Commit 628811d0 authored by Aastha Mehta's avatar Aastha Mehta
Browse files

hack: fix the nonce for RSS hash function in code

parent e1fbd084
No related branches found
No related tags found
No related merge requests found
......@@ -2570,10 +2570,18 @@ static int bnx2x_init_rss(struct bnx2x *bp)
return bnx2x_config_rss_eth(bp, bp->port.pmf || !CHIP_IS_E1x(bp));
}
//#ifdef CONFIG_XEN_SME
//struct bnx2x_config_rss_params sme_rss_params;
//#endif
int bnx2x_rss(struct bnx2x *bp, struct bnx2x_rss_config_obj *rss_obj,
bool config_hash, bool enable)
{
struct bnx2x_config_rss_params params = {NULL};
#ifdef CONFIG_XEN_SME
int i;
//memset(&sme_rss_params, 0, sizeof(struct bnx2x_config_rss_params));
#endif
/* Although RSS is meaningless when there is a single HW queue we
* still need it enabled in order to have HW Rx hash generated.
......@@ -2619,6 +2627,18 @@ int bnx2x_rss(struct bnx2x *bp, struct bnx2x_rss_config_obj *rss_obj,
if (config_hash) {
/* RSS keys */
netdev_rss_key_fill(params.rss_key, T_ETH_RSS_KEY * 4);
#ifdef CONFIG_XEN_SME
// memcpy((void *) &sme_rss_params.rss_key, (void *) &params.rss_key,
// T_ETH_RSS_KEY * 4);
memset((void *) &params.rss_key, 0, T_ETH_RSS_KEY * 4);
for (i = 0; i < T_ETH_RSS_KEY; i++) {
params.rss_key[i] = i;
}
// for (i = 0; i < T_ETH_RSS_KEY; i++) {
// printk(KERN_ERR "rss key %d: %u %u", i, params.rss_key[i],
// sme_rss_params.rss_key[i]);
// }
#endif
__set_bit(BNX2X_RSS_SET_SRCH, &params.rss_flags);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment