Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3485708imu; Sun, 11 Nov 2018 16:10:36 -0800 (PST) X-Google-Smtp-Source: AJdET5fVdw3ripHHRqaHiNxv0IkVcWkSfO8+Y10qj4SewYkBKeh7F4Z1Sv4z/mG2yGdA3F8LdH0n X-Received: by 2002:a17:902:b689:: with SMTP id c9-v6mr11601194pls.306.1541981436008; Sun, 11 Nov 2018 16:10:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981435; cv=none; d=google.com; s=arc-20160816; b=vVR6wH1s3xxKPtsj0EmCbalatVMtzC8r/KJUeairviHmtaUGM9PkAgbFWSgTe5tuZ/ FkMk7CPuNgK+Wiznhk6z873RLXdSwE3kSlx5MTzNfpzCVxf+99FyH2p20E4QgT54e/rI Ob8Cjs5Mbr5EWwYj2MGxuoHl8+DTuFms3P0AWThWrzaEmhhfnHENrLbQFivU0UBwMSGq 5zl3KI0kj1qZNbZ7eKdubB1yUGwLK2SHz98MtwB+WY1UfF1MxnG+TTt1z5qyxk2e0IKK dGJakxehQCay0848ODEODXIoyZbc2wfUgopOvWL4QM1g28ag293zZrM6b7wkXRCti5VV tZbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=c14EtPvV0ku+gzEhqkBE1lZs0clpAWzuV67zDXdtxg0=; b=rdShSZoFPVVe1ePkrhV81Otn/W1tZINtqbInQ8S4ObzIVzwKpwXYLqgNnwjMZp8wzb cLqhZymiDp1XNjTuwSCfq5P/rvTQ+EBXbC22mOJs7N140+dlMCzEGcWmTwipkR+kCiVn CF4jnCOFbcLFeNXoCIWHcpaKCJapkfPp9WRKAt9A2Vza1EywCYIah4GSx5a/uWO7q3PA hLC7Kmzd9Vgor7OV0O91kvNifKvm2dur74ncPRIDoYQm3g4y4Ys7tXY4ZJ5nW+/HiRVa bs82LQVAPZj6qpuwTij+pLHFL5yo4191LIzejv0ye8goZrr3U42EcZ+6WqGdb0m2aG28 m2Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zFWpb7DF; 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 p18si14632980pgb.469.2018.11.11.16.10.21; Sun, 11 Nov 2018 16:10:35 -0800 (PST) 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=zFWpb7DF; 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 S1730983AbeKLIR1 (ORCPT + 99 others); Mon, 12 Nov 2018 03:17:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:60196 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730931AbeKLIR0 (ORCPT ); Mon, 12 Nov 2018 03:17:26 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3C0EE223AE; Sun, 11 Nov 2018 22:27:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975251; bh=r6zEKSKxpvdbnm78YI8XWDCM+l4oXfU0b4+uoBRt/pI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zFWpb7DF9TLQYoquWrUAkyJqY2atAQVRafMuDTg9ngFG6/TuYIHxJJUWfznQOYkGJ Rq8qJF5ViW0TzN6THn2zK6HgafV6ybZ48jmeDnYFKH0wrut2VIJygQ9lt6BGYDXiEX XKlf2bESMZbmqMnW9JzHFQyOmA7xD3yIb0EXT+bQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yunsheng Lin , Peng Li , Salil Mehta , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 116/361] net: hns3: Fix for vf vlan delete failed problem Date: Sun, 11 Nov 2018 14:17:43 -0800 Message-Id: <20181111221636.162080513@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ 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 Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) --- 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(stru "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);