]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix user's coalesce configuration lost issue
authorHuazhong Tan <tanhuazhong@huawei.com>
Tue, 18 May 2021 11:36:02 +0000 (19:36 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 May 2021 20:41:04 +0000 (13:41 -0700)
commitb8e9d385de33b1ef9b85a9d75df28ced5cf2babd
treecf1b617b01ec54f47dd167d41e489328899ebf08
parent63dce331205b297b14c420bedf9c3c61980964b4
net: hns3: fix user's coalesce configuration lost issue

Currently, when adaptive is on, the user's coalesce configuration
may be overwritten by the dynamic one. The reason is that user's
configurations are saved in struct hns3_enet_tqp_vector whose
value maybe changed by the dynamic algorithm. To fix it, use
struct hns3_nic_priv instead of struct hns3_enet_tqp_vector to
save and get the user's configuration.

BTW, operations of storing and restoring coalesce info in the reset
process are unnecessary now, so remove them as well.

Fixes: ece55b1d0788 ("net: hns3: add ethtool_ops.set_coalesce support to PF")
Fixes: a60afdb10448 ("net: hns3: add ethtool_ops.get_coalesce support to PF")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c