Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp173945imd; Wed, 31 Oct 2018 16:48:42 -0700 (PDT) X-Google-Smtp-Source: AJdET5d1Jp8cdTgCGmE+C1jhvfevZRfgG6n34rgUjzbCpTDtKRHf70JeUtCy0CuOJemjvhZiNVbu X-Received: by 2002:a63:1444:: with SMTP id 4mr5089047pgu.430.1541029722792; Wed, 31 Oct 2018 16:48:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541029722; cv=none; d=google.com; s=arc-20160816; b=mgVfLQ/9ujCAdQGt2wEGa+YlF+My8sffijDSttZP3RziBC9w9nhZGYX1FSdmijXd4W 09C4sYJA7iyh0WkDYdYgMTceQk5GtK6/17/XpQmWU2wE8Y0r7jgnT69nOu8OpCzLNmZf 1cIOsibAFAXatjpr1u3UuUmEsSmj/pTwiup85rgCUOW+RRw394eodago//JPDike1KLO NJgYSjl4ke/JUG9WXloJtFcktefCdt+sYUi8N88KVo8hNXMLzrwOE5KMTAfjEsFxNVdy uG3r3iDG8xpMfIJVVYO1Pb3zLYGm843RohmSqf/Y60JeMnTzKkPzSMqpTwOieaUxzmLv IJyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=94ZYBf5IAvqfZ/oTwxa1okEog5A/Iv84jURM5YKEYsk=; b=guX3jtVzAjuWUW3q4NXl7p7tplu1YU8t9IPcCWYspAHQx2acubc8zZQtXYdG2aSbJu Mmdbi0lJvu0wB3P6Yam/ADUcKRhFAi0dwHxmiuk9GQAtlQleY7Fk0YyHvlJvVZ7Nh/LP uSM5xLd4PIOZninBQBTgGGSsUwu7bRR6/MjPIpPrL87Ow21/cwpVntSHoF2LHJSMzpiE pKFBEYtD68wcGyr6D9dDmpWTn3Loc3R9QQ90OAu0icenIf+gHpMGvE7z5+dDpufpT1gc E+NLIervmhcP97LafKwZz1/vvhTaVNmC01btnwl7959jNNv1WWd4OKhrhpQ8cH6RmMVa kcwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jWqQ886+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h13-v6si15046530pgj.457.2018.10.31.16.48.28; Wed, 31 Oct 2018 16:48:42 -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; dkim=pass header.i=@kernel.org header.s=default header.b=jWqQ886+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728491AbeKAIHA (ORCPT + 99 others); Thu, 1 Nov 2018 04:07:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:54318 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728445AbeKAIG6 (ORCPT ); Thu, 1 Nov 2018 04:06:58 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 63A9320823; Wed, 31 Oct 2018 23:06:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541027208; bh=lnRKMdfi7m12nORADw2Y7mF2rMaQBwk5GfryMByqfvU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jWqQ886+Lb+5huTFdk7ASH2lscAEizWX9MzQuiElQ/SYuuABzEECDlTIMqDSOnF62 hAyzZPJYwOR/CNCdpc+PYjmCJhvbfv78iWP7pC9bVx8B1xMC9X/NLjjswDQtFGQcMb RaKUd5gYRCwi3va0sOh21AAkbpky7xUXmbzzEBXM= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Yunsheng Lin , Peng Li , Salil Mehta , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL 4.19 071/146] net: hns3: Fix for vf vlan delete failed problem Date: Wed, 31 Oct 2018 19:04:26 -0400 Message-Id: <20181031230541.28822-71-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181031230541.28822-1-sashal@kernel.org> References: <20181031230541.28822-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yunsheng Lin [ Upstream commit 41dafea2af781d8e3ab8626d236b52e4172905a3 ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 2d58726893f4..db763450e5e3 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -4693,9 +4693,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.17.1