Messages in this thread Patch in this message |  | | From | Akinobu Mita <> | Subject | [PATCH v2 03/11] bnx2x: use random32_get_bytes() | Date | Sun, 4 Nov 2012 00:43:34 +0900 |
| |
Use random32_get_bytes() to fill rss key with pseudo-random bytes.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Eilon Greenstein <eilong@broadcom.com> Cc: netdev@vger.kernel.org --- new patch from v2
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index 4833b6a..9a25658 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c @@ -1741,7 +1741,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. @@ -1773,9 +1772,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(); - + random32_get_bytes(params.rss_key, sizeof(params.rss_key)); __set_bit(BNX2X_RSS_SET_SRCH, ¶ms.rss_flags); } -- 1.7.11.7
|  |