]> 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)
commit20a726376e53d39ec5c34322e350788240adf095
treecf1b617b01ec54f47dd167d41e489328899ebf08
parent8b1b493e8c2bf9f97ffb1146cd31c52e96757749
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: 1657422e49b0 ("net: hns3: add ethtool_ops.set_coalesce support to PF")
Fixes: d6625c40906a ("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