From patchwork Mon Oct 1 11:46:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 147889 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp3804035lji; Mon, 1 Oct 2018 04:48:53 -0700 (PDT) X-Google-Smtp-Source: ACcGV60Rx1t7I+aAo/VWPwXFkU/5wYB8yLaTiWt/v7U2EXTnaAimrk6rj66moudrpJ9stBr7ojku X-Received: by 2002:a62:9b9a:: with SMTP id e26-v6mr11257404pfk.181.1538394533812; Mon, 01 Oct 2018 04:48:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538394533; cv=none; d=google.com; s=arc-20160816; b=AOmdD78E7PvcH/amFnKGwAoRgiOuMPolNKpQgH+KwFlgF1HhN9++QNLHrOW4L12SVH KhQqNmJPlyYc7MnpLEoJLG/WNAaww8yRsivdshdP8Jn3zbAYffdj1IzCPiZFGJLfKQ81 IfoWuRjjSzWcFTTMWb9L2OHjz+xLAwXIQ+12cqwB/1Lwc0lqplmWYfEh32mUyFrekeBP RJs5jzzth94NfshLXx3XmAeZYIu6+Po77c9vHAhgIzZ4vFedUoh0lKkCqVnALHEyFHAi HFPKq+05Bdc+C7j07wey80ytR9INgDrjbblob6esqKKtbdbBibxm6z3xDCqDwAPR1dXg VcFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=tCrNvka1PKlViuo86F5OH3M7ZdkHGVxjfM7IZhW9yIs=; b=sIiNme2DpiLvNS2HYMTURbWKZaCpNH/DRCQPjQMbR/Q1+UEeiqkpfq+hdoVSt/IUnq hfIQZ74o0M7Kt+1VYyA4wjQtMdKUQDtlh/p+KxIfS0XR7n/+myt1VIstZrv+dQ5ObeGB G8tDAnIIJPloGy1T3SAaSjdfF5ERIXjVvhdbJiW9tlzyatnmdb9MG15BlxEysRBPqOsi mscVNFd2UjrbeE808D5Zc22AHRkLVxyOVP1Zjq1dXYt5R6P4WTN2m2lB7L1LQNjJNxuH gn3TNIuG8apUyWVug/yDxh6oGiXL6mEvce4SHvn+ZOT+yZK/A+en3MV0Aqz0E9qatRIy YIQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 80-v6si1185134pfv.135.2018.10.01.04.48.53; Mon, 01 Oct 2018 04:48:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729417AbeJAS0C (ORCPT + 10 others); Mon, 1 Oct 2018 14:26:02 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:53835 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729391AbeJAS0B (ORCPT ); Mon, 1 Oct 2018 14:26:01 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id CCE196A4AB78F; Mon, 1 Oct 2018 19:48:32 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.202.226.54) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.399.0; Mon, 1 Oct 2018 19:48:26 +0800 From: Salil Mehta To: CC: , , , , , , , Jian Shen Subject: [PATCH net-next 6/7] net: hns3: Remove all flow director rules when unload hns3 driver Date: Mon, 1 Oct 2018 12:46:46 +0100 Message-ID: <20181001114647.15504-7-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20181001114647.15504-1-salil.mehta@huawei.com> References: <20181001114647.15504-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.202.226.54] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jian Shen This patch removes all flow director rules when unload hns3 driver. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index df4410e..96f07ca 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -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);