Patch "net: hns: Correct HNS RSS key set function" has been added to the 4.9-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
net: hns: Correct HNS RSS key set function
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-hns-correct-hns-rss-key-set-function.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Sun Mar 18 16:55:33 CET 2018
From: lipeng <[email protected]>
Date: Sat, 1 Apr 2017 12:03:39 +0100
Subject: net: hns: Correct HNS RSS key set function
From: lipeng <[email protected]>
[ Upstream commit 64ec10dc2ab8ef5bc6e76b1d4bc8203c08a6da1e ]
This patch fixes below ethtool configuration error:
localhost:~ # ethtool -X eth0 hkey XX:XX:XX... Cannot set Rx flow hash configuration: Operation not supported
--- drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 27 +++++++++++++--------- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 9 +++---- 2 files changed, 20 insertions(+), 16 deletions(-)
drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c +16 -11
@@ -773,8 +773,9 @@ static int hns_ae_get_rss(struct hnae_hamemcpy (key, ppe_cb->rss_key,HNS_PPEV2_RSS_KEY_SIZE );/* update the current hash->queue mappings from the shadow RSS table */ -memcpy (indir, ppe_cb->rss_indir_table, -HNS_PPEV2_RSS_IND_TBL_SIZE *sizeof (*indir)); +if (indir) +memcpy (indir, ppe_cb->rss_indir_table, +HNS_PPEV2_RSS_IND_TBL_SIZE *sizeof (*indir));return 0 ; }
@@ -785,15 +786,19 @@ static int hns_ae_set_rss(struct hnae_hastruct hns_ppe_cb *ppe_cb =hns_get_ppe_cb (handle);/* set the RSS Hash Key if specififed by the user */ -if (key) -hns_ppe_set_rss_key (ppe_cb, (u32 *)key); - -/* update the shadow RSS table with user specified qids */ -memcpy (ppe_cb->rss_indir_table, indir, -HNS_PPEV2_RSS_IND_TBL_SIZE *sizeof (*indir)); - -/* now update the hardware */ -hns_ppe_set_indir_table (ppe_cb, ppe_cb->rss_indir_table); +if (key) { +memcpy (ppe_cb->rss_key, key,HNS_PPEV2_RSS_KEY_SIZE ); +hns_ppe_set_rss_key (ppe_cb, ppe_cb->rss_key); + } + +if (indir) { +/* update the shadow RSS table with user specified qids */ +memcpy (ppe_cb->rss_indir_table, indir, +HNS_PPEV2_RSS_IND_TBL_SIZE *sizeof (*indir)); + +/* now update the hardware */ +hns_ppe_set_indir_table (ppe_cb, ppe_cb->rss_indir_table); + }return 0 ; }
drivers/net/ethernet/hisilicon/hns/hns_ethtool.c +4 -5
@@ -1243,6 +1243,7 @@ hns_set_rss(struct net_device *netdev, c {struct hns_nic_priv *priv =netdev_priv (netdev);struct hnae_ae_ops *ops; +int ret;if (AE_IS_VER1 (priv->enet_ver)) { netdev_err(netdev,
@@ -1252,12 +1253,10 @@ hns_set_rss(struct net_device *netdev, c ops = priv->ae_handle->dev->ops; -/* currently hfunc can only be Toeplitz hash */ -if (key || - (hfunc !=ETH_RSS_HASH_NO_CHANGE && hfunc !=ETH_RSS_HASH_TOP )) +if (hfunc !=ETH_RSS_HASH_NO_CHANGE && hfunc !=ETH_RSS_HASH_TOP ) { +netdev_err (netdev,"Invalid hfunc!\n" );return -EOPNOTSUPP ; -if (!indir) -return 0 ; + }return ops->set_rss (priv->ae_handle, indir, key, hfunc); }
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/net-hns-correct-hns-rss-key-set-function.patch