From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 286E6A04C7 for ; Mon, 14 Sep 2020 16:31:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 471B41C10A; Mon, 14 Sep 2020 16:31:04 +0200 (CEST) Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by dpdk.org (Postfix) with ESMTP id E1AAB1C0C9; Mon, 14 Sep 2020 16:30:58 +0200 (CEST) Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id C0EA4C3F399918BCD798; Mon, 14 Sep 2020 22:30:57 +0800 (CST) Received: from tester.localdomain (10.175.119.39) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Mon, 14 Sep 2020 22:30:50 +0800 From: Xiaoyun wang To: CC: , , , , , , , , , Xiaoyun wang Date: Mon, 14 Sep 2020 22:31:43 +0800 Message-ID: <263a30d52f070480b98cd9ae4c36a95e86af7463.1600093192.git.cloud.wangxiaoyun@huawei.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.119.39] X-CFilter-Loop: Reflected Subject: [dpdk-stable] [PATCH v1 2/5] net/hinic: fix TCAM filter set failed X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" hinic supports two methods: linear table and tcam table, if tcam filter enables failed but linear table is ok, which also needs to enable filter, so for this scene, driver should not close fdir switch. Fixes: f4ca3fd54c4d ("net/hinic: create and destroy flow director filter") Cc: stable@dpdk.org Signed-off-by: Xiaoyun wang --- drivers/net/hinic/hinic_pmd_flow.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/hinic/hinic_pmd_flow.c b/drivers/net/hinic/hinic_pmd_flow.c index 9888a87..d71a42a 100644 --- a/drivers/net/hinic/hinic_pmd_flow.c +++ b/drivers/net/hinic/hinic_pmd_flow.c @@ -2809,8 +2809,12 @@ static int hinic_add_tcam_filter(struct rte_eth_dev *dev, rc = hinic_set_fdir_tcam_rule_filter(nic_dev->hwdev, true); if (rc && rc != HINIC_MGMT_CMD_UNSUPPORTED) { - (void)hinic_set_fdir_filter(nic_dev->hwdev, 0, 0, 0, - false); + /* + * hinic supports two methods: linear table and tcam + * table, if tcam filter enables failed but linear table + * is ok, which also needs to enable filter, so for this + * scene, driver should not close fdir switch. + */ (void)hinic_del_tcam_rule(nic_dev->hwdev, fdir_tcam_rule->index); return rc; -- 1.8.3.1