Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1922817imm; Sun, 12 Aug 2018 02:50:30 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyKX42JPv2lb2fe2rlfto+JitDa3wtc3HeKL+kuY76cSTJ/ggCNe2i+4Sg0a6chF+QyElA2 X-Received: by 2002:a65:448c:: with SMTP id l12-v6mr12389063pgq.277.1534067430645; Sun, 12 Aug 2018 02:50:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534067430; cv=none; d=google.com; s=arc-20160816; b=hNjWHg8oNcZ1Jb5y1DYFo0M5QJLKLGMPfIh9j8W/+N0fSnAztDZshA8yhSFDMdEn4h RADKKz5Qz+Q2L1gaPxrciSTu+7uWUUTFNRzmJaveR9bFbYz6FocJsuubtJobR1A7TKEW O7XWFgD8QPWCpv24Qlif7s55gLSIR7SmyEGLYbO+P5qGUr+B0PYJz1fNkPvahxqK5q1v Qcha8HW/ro6zcflgse4fKP/SRw+ixmardiUjkAGy203EXNnjkGi5SdkYZcHZNkPxXUVc pQUa533QFTmtrf41vBuBf/G5bBtuXHQS0lYY05nCORcdBQNIYNJb3EMRTXcwK7Mg1ib1 L4nQ== 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=TDchybwhI9/l9sSvXs7rOhSQZjnlYL/OOblYG409ibw=; b=VK3wDyjwMmH6l18sd9G/Mbe7CWeHdStzt0tYUN+B4JMdYUJdb3ARDCNLTZtebcFfUr R88D+DTFgqNK93iFvjRQ3kDbPqAtVVuep/EoBaW0k2yMU5R1iKai2w/pUAoLr2eel2NL OsAxDSfMaSLNSQPM4walepth8Nzr9ht2u+781lHBi8mMGaYQfNFuUt6VGepbIk2lPrww GpDM3I0B8PfUXm3DkHQPl0HwcjuaXp/DjL5BUr7sQ3p42EnYs2KRpg8PaVzyHm862YlD kMYbJi1yiJo48uzYhahzTmobLWCAlQdTA9NPyXX+KCSNqU0PRO+yvkRcRRlsNHPq/qaw WfKQ== 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 x65-v6si15652972pff.196.2018.08.12.02.50.16; Sun, 12 Aug 2018 02:50:30 -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 S1728168AbeHLM0d (ORCPT + 99 others); Sun, 12 Aug 2018 08:26:33 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:36886 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727580AbeHLM0Z (ORCPT ); Sun, 12 Aug 2018 08:26:25 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id D453AD213CF66; Sun, 12 Aug 2018 17:48:54 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.47.93.119) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.399.0; Sun, 12 Aug 2018 17:48:49 +0800 From: Salil Mehta To: CC: , , , , , , Subject: [PATCH net-next 9/9] net: hns3: Add vlan filter setting by ethtool command -K Date: Sun, 12 Aug 2018 10:47:38 +0100 Message-ID: <20180812094738.14852-10-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180812094738.14852-1-salil.mehta@huawei.com> References: <20180812094738.14852-1-salil.mehta@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.47.93.119] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Li Revision(0x20) HW does not support enabling or disabling individual netdev's HW_VLAN_CTAG_FILTER feature, and Revision(0x21) supports enabling or disabling individual netdev's HW_VLAN_CTAG_FILTER feature. Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index b28c7e142308..3554dca7a680 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -1673,6 +1673,9 @@ static struct pci_driver hns3_driver = { /* set default feature to hns3 */ static void hns3_set_default_feature(struct net_device *netdev) { + struct hnae3_handle *h = hns3_get_handle(netdev); + struct pci_dev *pdev = h->pdev; + netdev->priv_flags |= IFF_UNICAST_FLT; netdev->hw_enc_features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | @@ -1706,6 +1709,9 @@ static void hns3_set_default_feature(struct net_device *netdev) NETIF_F_GRO | NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_GSO_GRE | NETIF_F_GSO_GRE_CSUM | NETIF_F_GSO_UDP_TUNNEL | NETIF_F_GSO_UDP_TUNNEL_CSUM; + + if (pdev->revision != 0x20) + netdev->hw_features |= NETIF_F_HW_VLAN_CTAG_FILTER; } static int hns3_alloc_buffer(struct hns3_enet_ring *ring, -- 2.11.0