From patchwork Mon Sep 3 10:21: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: 145772 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp2313108ljw; Mon, 3 Sep 2018 03:23:05 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbODnwVSZqwdqvhe47mQ5mXzcIEJ4RgoGulYOymTKbXfgnbVVImE5rWbyLwVtYH76QBsHsk X-Received: by 2002:a17:902:b902:: with SMTP id bf2-v6mr28015610plb.185.1535970185116; Mon, 03 Sep 2018 03:23:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535970185; cv=none; d=google.com; s=arc-20160816; b=dPqhjRHsR4dLwS0sqHztSS3t3/vK2/cIDCGLFBZED6xmdjKFmIkg1dxAc3fGCbaohM LiRVVB6rmH4pl9ZFcFhgCSfxdpj4AIdnXbWij/CXTLn4l2vreomhtyRsB+j0VSSDB+CT uHAH+lq8p/BZgfOxcgczeyD3aFVxeFdk84NZjx7Sz8S/HQmGNCItfNB1fUjUAAtds844 afSnCDFCK9kadrDojZTWWT125OFNqiyYSMl85TQE3xGQ/WzjPGC3t1a0lwPaTsGe1biH 1fxyzFd7rCW847+0PTvZY8T1LgvytuEwu7wBb7KnkOtUigXkp4h8D1i+wMIkdw0qZW5G uYgg== 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=sESWmpEMlEN2jSml41bEQzhodjtdx0+yP1CEtObEwVY=; b=PMVMUqIVdqJE/6Q6UFEjJbf4timGWkIZBAlYw6UrlYgxsV2zrzMB4L6dQCqLtVUxp2 tSeCVvH8ukvQ+jm6xAqwIGy7apHbV7AB8ahEnVCzoHZmQn3Pa1ZLnS/7XC+M6DE6+ATV KKolpFkJu4JaP48iwVho0SH0lD6VJ8Db3HnhKJhadDY1rPPyZZdIGq/btb4+8FJXNMl9 eKRXHcVTGXHVrD8RMqsRfFOe+4FULnFL6G8XX14luR638gaAPJwRO7GxGCLR93LTrH7v aiFBoRXA8+SNTVatAO/C6BQerI4MJliiuBafhPZecKprSJQyVLO6tgPp7VSwg1EFD07z y4wg== 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 s14-v6si17021902pga.21.2018.09.03.03.23.04; Mon, 03 Sep 2018 03:23:05 -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 S1727758AbeICOmd (ORCPT + 32 others); Mon, 3 Sep 2018 10:42:33 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:11219 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727319AbeICOmc (ORCPT ); Mon, 3 Sep 2018 10:42:32 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 265961C62FDEB; Mon, 3 Sep 2018 18:22:59 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.202.226.54) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.399.0; Mon, 3 Sep 2018 18:22:51 +0800 From: Salil Mehta To: CC: , , , , , , , Yunsheng Lin Subject: [PATCH net-next 01/11] net: hns3: Fix for vf vlan delete failed problem Date: Mon, 3 Sep 2018 11:21:46 +0100 Message-ID: <20180903102156.18676-2-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180903102156.18676-1-salil.mehta@huawei.com> References: <20180903102156.18676-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.202.226.54] 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: 6c251711b37f ("net: hns3: Disable vf vlan filter when vf vlan table is full") 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.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 8577dfc..1c2ab7e 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -4686,9 +4686,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);