Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1922719imm; Sun, 12 Aug 2018 02:50:20 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxMhdx3ly8DgyCDoV7D43oOiwUwWlnkoKBtbWEgOEkrjowX5m1eRhfhCx40uya041xnbbZ9 X-Received: by 2002:a17:902:c6b:: with SMTP id 98-v6mr12390654pls.233.1534067420576; Sun, 12 Aug 2018 02:50:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534067420; cv=none; d=google.com; s=arc-20160816; b=qEdFdkHbRWEaX9FNeAaoemkxVYGNeglPPo2teWtBswuAOgvgj23WruKVY/rksbiZmo Q6d9ikGFEtd/+rPSLmapz61yBho0hM8AsIuycdrXFEhvjdpecdtEQaQZjsAb8fta8e5c QvjxZpEpVSXIZUwZ0pqfB24c95X2hzfUK2Bd95JboqTxgeWe176GDnKoHtxLerI6j3ya 7shRwWWM8vLTfNyysDCeJD4XZJlEWAtkyTORbQbaNcSGJ9cenrTZGbb4+zczED8DQ24x WCyrVlh2YUukOOAKpbT/89dea93Ig2806LsWyIWNpjLNYuHDEOFIhw8BZRfR/iiIuyQW Qhdg== 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:arc-authentication-results; bh=Ht/nDQM6wwiR/Z0RLuVIdU99bkyyxXQzyAQh3Ud1bT0=; b=vn74nbcP8wnjs7ZZRFfRquUDBcnfIvB8dhuiQzwhGkzekGWR2Z8KMpTvs7yHR5vr6r NY1S0MjhgAvhxuoidfGoNtw4cl64CTLqoJMka9GNcdqruUDtCRRQ9NLan/WYbi9rGICd mvhpudsNctTK/ln/TgQ+kD6oq8B1+uAioYXSoshTBXSPyRYsjyDsfeY+9k46eFOtHLKT 7mYasXIOuKMwngZcioW2Gq1lyxgEr1qlO3fydx138fBKEENrgulLYksL6ej06wXAs64f zq+9xlwR24NJUcy+LCRbVuJtT3SvCR0aR3BnUVMjKm+Z/q05sJQFBXyD8KSW7oW1LsAL UcpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 n3-v6si14328711pga.298.2018.08.12.02.49.54; Sun, 12 Aug 2018 02:50:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728095AbeHLM0Q (ORCPT + 99 others); Sun, 12 Aug 2018 08:26:16 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:10658 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728049AbeHLM0P (ORCPT ); Sun, 12 Aug 2018 08:26:15 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 0A1A8146207B7; Sun, 12 Aug 2018 17:48:45 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.47.93.119) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.399.0; Sun, 12 Aug 2018 17:48:36 +0800 From: Salil Mehta To: CC: , , , , , , , Yunsheng Lin Subject: [PATCH net-next 5/9] net: hns3: Fix for vf vlan delete failed problem Date: Sun, 12 Aug 2018 10:47:34 +0100 Message-ID: <20180812094738.14852-6-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180812094738.14852-1-salil.mehta@huawei.com> References: <20180812094738.14852-1-salil.mehta@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.47.93.119] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yunsheng Lin There are only 128 entries in vf vlan table, if user has added more than 128 vlan, fw will ignore it and disable the vf vlan table. So when user deletes the vlan entry that has not been set to vf vlan table, fw will return not found result and driver treat that as error, which will cause vlan delete failed problem. This patch fixes it by returning ok when fw returns not found result. Fixes: 9dba194574e3 ("{topost} net: hns3: fix for vlan table problem") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 3b7cd6744280..c88f5e6a9b77 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -4684,9 +4684,17 @@ static int hclge_set_vf_vlan_common(struct hclge_dev *hdev, int vfid, "Add vf vlan filter fail, ret =%d.\n", req0->resp_code); } else { +#define HCLGE_VF_VLAN_DEL_NO_FOUND 1 if (!req0->resp_code) return 0; + if (req0->resp_code == HCLGE_VF_VLAN_DEL_NO_FOUND) { + dev_warn(&hdev->pdev->dev, + "vlan %d filter is not in vf vlan table\n", + vlan); + return 0; + } + dev_err(&hdev->pdev->dev, "Kill vf vlan filter fail, ret =%d.\n", req0->resp_code); -- 2.11.0