Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3712974pxv; Mon, 26 Jul 2021 10:02:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTm8BLOGQ+1ZrkVGMuAQ3dHeP4UhXdrvm1AWXM/1AwRjQwjYqfJsVHl7XCmntCIZ4i4zZY X-Received: by 2002:a05:6e02:218c:: with SMTP id j12mr13704949ila.32.1627318939519; Mon, 26 Jul 2021 10:02:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627318939; cv=none; d=google.com; s=arc-20160816; b=P7bz2SL282qcgNeOUCRpNTQ0rUl5VGfB+KtwKyey0EqF9YMUzm1tZKOABaXocled2v +iAOpzfbwAH9rAkJoIji9jSUlcKaD9UhWlMPTWHfzkvx6kozKn1yTqmSuJTzOT4xPH8A YLh46zp9yTfGraAZXcJ0HKQKd0CSxzFTuJBbEpAZAOpQNds3VVkdIKKiWFtmufEEgVMS deN6aO3U8vUmyLMUSgzST473i6vTOmr3OU4S0EepmL1JuNMJgUk9DbqxsdP6aiz6M+qY ovZ7rvKMuNIlxSl5GkYqk7xX2EF8D4NZUinkZMhgMEmD5NS6TxOvH8z2l4GOugBVanM8 DnIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bCPaicoQGM+y+GOBwQ5VPqFl6rz7Xe9Yc4svbWU1lKM=; b=sbC+ZrHfImDnuWQrpLFPUhvPTgrxb2lP3YYKBXhgpvMsZSE8/z8jPmvBzqRzKX0CTK Tf4jqjRVC3N1p8oSuY6oujb4rJRzp++1v9TrBK2R63vwR7rKygXg17pLe0ozkp9EshXF 1JG3f4oZ1CM3zDiLqAnAihOlHQZNbo+dWtM9q/C5o/is0UXxutySVsz/r2Tb1j0mIUTr fJiRgc11P+Na5hOqWJqUGoaSl6LKrSYXlRT1+vO0t2zPbdX8Gmu2uWLgcpNowXeZf9ja oUhS3JZGCgTbLLbTInjAkFwbMBuVhKX9zq7vgAGtjVTGDRFAmv2trDRKd2A1yUpLu+nX I3Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=I2GrVz+h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r3si399087jan.7.2021.07.26.10.02.06; Mon, 26 Jul 2021 10:02:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=I2GrVz+h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238111AbhGZPkl (ORCPT + 99 others); Mon, 26 Jul 2021 11:40:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:38082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237484AbhGZPXJ (ORCPT ); Mon, 26 Jul 2021 11:23:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 578CF60240; Mon, 26 Jul 2021 16:03:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627315417; bh=/8Wx9N5fo692tISUi5J6zaIzXfl5biye7vAxO06POj8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I2GrVz+hF9Uzv8yGrNT4BA9Q1vS5Vw8BQXpqGla004U47U36Ro8hp69oEYwtMrtZv URA37K/pP0uvaSrhkKXx9agHb0gajnqgUEy+NJHiTg4LBdl6ofQkfXNI4J/dhHdkWJ cZ+pkt5YQHJ1jtrnZWpSQxMl2J1mmQRy71vCiV/M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jian Shen , Guangbin Huang , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.10 088/167] net: hns3: fix rx VLAN offload state inconsistent issue Date: Mon, 26 Jul 2021 17:38:41 +0200 Message-Id: <20210726153842.358338161@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210726153839.371771838@linuxfoundation.org> References: <20210726153839.371771838@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jian Shen [ Upstream commit bbfd4506f962e7e6fff8f37f017154a3c3791264 ] Currently, VF doesn't enable rx VLAN offload when initializating, and PF does it for VFs. If user disable the rx VLAN offload for VF with ethtool -K, and reload the VF driver, it may cause the rx VLAN offload state being inconsistent between hardware and software. Fixes it by enabling rx VLAN offload when VF initializing. Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support") Signed-off-by: Jian Shen Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- .../net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c index ac6980acb6f0..d3010d5ab366 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c @@ -2518,6 +2518,16 @@ static int hclgevf_rss_init_hw(struct hclgevf_dev *hdev) static int hclgevf_init_vlan_config(struct hclgevf_dev *hdev) { + struct hnae3_handle *nic = &hdev->nic; + int ret; + + ret = hclgevf_en_hw_strip_rxvtag(nic, true); + if (ret) { + dev_err(&hdev->pdev->dev, + "failed to enable rx vlan offload, ret = %d\n", ret); + return ret; + } + return hclgevf_set_vlan_filter(&hdev->nic, htons(ETH_P_8021Q), 0, false); } -- 2.30.2