Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1548639imm; Mon, 3 Sep 2018 03:26:55 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYugWDVfd30VJTnE3yJFdQpW5k75gZJu9K+ujOk8z5ZkzN+rMufMOU1zV2HVdopnfjPARTX X-Received: by 2002:a17:902:aa05:: with SMTP id be5-v6mr26437561plb.313.1535970415371; Mon, 03 Sep 2018 03:26:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535970415; cv=none; d=google.com; s=arc-20160816; b=EpJVlFbRY/foED+Q0Mn0EsssyU1CvAPtA2gpitVE3YoDHETMk8+MSmd+FqW8JCzxQe nVhOs4QQo4CLi8iXGyjpHAE94wtCcM9gsYuj9xuPEWddXIVLEdKsrS/ba/2gjnilZJa2 n7UEXyYGU5rYExfgv8Z5iuedCX/jkjerhBK36HVAkjeH2upwMeaj90byQNA6J0VGQcBb 9FCE2/XaVl3fQUqp8oILEV6SgE6rGpeFw7f3ohXaBcCUMeUx1y402qK75DjwdYe6x1RV Hu8BcH/q+6IxIzVVKmDIpIrYebc4j53ReuLRNjk7/XABb68pc0Howrlg/DN8xbVUZf1m MSSg== 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 v1-v6si18818469plb.387.2018.09.03.03.26.40; Mon, 03 Sep 2018 03:26:55 -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 S1727755AbeICOmd (ORCPT + 99 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 Content-Type: text/plain 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(+) 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); -- 2.7.4