net: hns3: Remove all flow director rules when unload hns3 driver
authorJian Shen <shenjian15@huawei.com>
Mon, 1 Oct 2018 11:46:46 +0000 (12:46 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Oct 2018 05:57:45 +0000 (22:57 -0700)
This patch removes all flow director rules when unload hns3 driver.

Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

index df4410e..96f07ca 100644 (file)
@@ -3286,6 +3286,8 @@ static void hns3_client_uninit(struct hnae3_handle *handle, bool reset)
        if (netdev->reg_state != NETREG_UNINITIALIZED)
                unregister_netdev(netdev);
 
+       hns3_del_all_fd_rules(netdev, true);
+
        hns3_force_clear_all_rx_ring(handle);
 
        ret = hns3_nic_uninit_vector_data(priv);