OSDN Git Service

net: ena: fix incorrect default RSS key
authorArthur Kiyanovski <akiyano@amazon.com>
Tue, 11 Feb 2020 15:17:43 +0000 (15:17 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Feb 2020 01:08:30 +0000 (17:08 -0800)
commit0d1c3de7b8c78a5e44b74b62ede4a63629f5d811
treeb91a186ecbc1840c79748e74c883076d662adab5
parentcf6d17fde93bdda23c9b02dd5906a12bf8c55209
net: ena: fix incorrect default RSS key

Bug description:
When running "ethtool -x <if_name>" the key shows up as all zeros.

When we use "ethtool -X <if_name> hfunc toeplitz hkey <some:random:key>" to
set the key and then try to retrieve it using "ethtool -x <if_name>" then
we return the correct key because we return the one we saved.

Bug cause:
We don't fetch the key from the device but instead return the key
that we have saved internally which is by default set to zero upon
allocation.

Fix:
This commit fixes the issue by initializing the key to a random value
using netdev_rss_key_fill().

Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amazon/ena/ena_com.c
drivers/net/ethernet/amazon/ena/ena_com.h