]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: don't restore rules when flow director is disabled
authorJian Shen <shenjian15@huawei.com>
Thu, 20 Dec 2018 03:52:04 +0000 (11:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Dec 2018 07:47:59 +0000 (23:47 -0800)
commite9f58c6e372bdb62bd30c3f6e5920b27a7082146
tree1c7d1f07a9fea7dfd601e7b54f37d70240180993
parenta375a04abbcd578c2aa2a01a40a1c3ec52ecd697
net: hns3: don't restore rules when flow director is disabled

When user disables flow director, all the rules will be disabled. But
when reset happens, it will restore all the rules again. It's not
reasonable. This patch fixes it by add flow director status check before
restore fules.

Fixes: dec24ae57a4d ("net: hns3: Add reset handle for flow director")
Fixes: bbe4f20005d8 ("net: hns3: Add support for enable/disable flow director")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c