Commit 8376d0bc authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds
Browse files

bnx2x: use prandom_bytes()

Use prandom_bytes() to fill rss key with pseudo-random bytes.
Signed-off-by: default avatarAkinobu Mita <>
Cc: Eilon Greenstein <>
Cc: "Theodore Ts'o" <>
Cc: Adrian Hunter <>
Cc: Artem Bityutskiy <>
Cc: David Laight <>
Cc: David Woodhouse <>
Cc: Michel Lespinasse <>
Cc: Robert Love <>
Cc: Valdis Kletnieks <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 6582c665
......@@ -1832,7 +1832,6 @@ int bnx2x_config_rss_pf(struct bnx2x *bp, struct bnx2x_rss_config_obj *rss_obj,
bool config_hash)
struct bnx2x_config_rss_params params = {NULL};
int i;
/* Although RSS is meaningless when there is a single HW queue we
* still need it enabled in order to have HW Rx hash generated.
......@@ -1864,9 +1863,7 @@ int bnx2x_config_rss_pf(struct bnx2x *bp, struct bnx2x_rss_config_obj *rss_obj,
if (config_hash) {
/* RSS keys */
for (i = 0; i < sizeof(params.rss_key) / 4; i++)
params.rss_key[i] = random32();
prandom_bytes(params.rss_key, sizeof(params.rss_key));
__set_bit(BNX2X_RSS_SET_SRCH, &params.rss_flags);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment