From patchwork Sun Aug 12 09:47:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 143984 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1892509ljj; Sun, 12 Aug 2018 02:48:51 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxDz2tW5+Z9WCm6oBlQr5GcRNYagKmpvcFfyKQWP75k9hUEeOPEoZRjFuaKawO3N4mDHEPr X-Received: by 2002:a62:9349:: with SMTP id b70-v6mr14291903pfe.193.1534067331054; Sun, 12 Aug 2018 02:48:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534067331; cv=none; d=google.com; s=arc-20160816; b=W6G7/IEA3y0129waQaI2Z/9EOsF5UM8FjzHW2HfPFjzfsLNy/TQydnwQxGxiYfaji1 867rDWRGgVPYj3n7EXGwXYTOXl9i3/hKaz0oI5bk9ZG/Kbw6iHnFDncjpgZqeV+E2a2M IDItFPq67YOm/jho4crz7BRYGXzbH2YeuciVLs9Q8C7A1D2cXnmcHs8n+SlhFvERuTdW IhDF3qBxz4BUfYEGJAyRHRh7/4Rlmi1C/kf+H0AZQdmfxEaGWy5c3mHzBeryBTvh+2rA dV84WHBSgiVrPE9kOcAM6yftEdmBVOrtNEotZieSNQG7FboEEzZoVHL8JN04mg7Tpuno 7PsQ== 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=rI8HVnzx/p6swAu9sbV7NNvYFdUKbbi8DEOQ4Mb3K5TjprNtD8WkxndGw0UM+yF+cg dQ59r13Ov5X6GFXoBvk+I+uQvjzx3ctxmqmfCgtpfTo8v0mId/IZS8hx4hVePzMVz2n9 UJeXQCp9Ie2MhJ0EeD4xgi5/heKcZnTqrXKgWHbHMblPznnr1cJNaPYDUHS6fCyog4vn tom+Q1fp2Mg2l0V9qPnqCM/m3ZyZIOaAhsMb4Q7v3bRTODG+lnjDDqUXHkf0AZ1Eg3SP OvM8UTdRICt7hOkQnmSR/P3dOXIJKQZ2D+L68AQyX6doQwV1njjoj5HoKbx7Sx3iHIBv g7jA== 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 61-v6si6299474plz.447.2018.08.12.02.48.50; Sun, 12 Aug 2018 02:48:51 -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 S1728106AbeHLM0Q (ORCPT + 10 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 X-Originating-IP: [10.47.93.119] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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(+) -- 2.11.0 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);