]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net: ena: fix incorrect default RSS key
authorArthur Kiyanovski <akiyano@amazon.com>
Tue, 11 Feb 2020 15:17:43 +0000 (15:17 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 7 Apr 2020 08:50:54 +0000 (10:50 +0200)
commit056d2b33889a1b5bf3d17390ba83eb4315288e1d
treed4d3ccd8d374b125ef6ab18084987b2d86bea03b
parent60d7db96c45e8867bc34912104f60a4009346ee0
net: ena: fix incorrect default RSS key

BugLink: https://bugs.launchpad.net/bugs/1868623
[ Upstream commit 0d1c3de7b8c78a5e44b74b62ede4a63629f5d811 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/amazon/ena/ena_com.c
drivers/net/ethernet/amazon/ena/ena_com.h