From patchwork Sun Aug 12 09:47:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 143987 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1892678ljj; Sun, 12 Aug 2018 02:49:09 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwA0388S5JeBedMSf5lq7IvKniqHWOu8b/JQEM6iL4/IiAfq+z/1gPsXTGLW+w0YILuTdAO X-Received: by 2002:a17:902:e28b:: with SMTP id cf11-v6mr12703410plb.86.1534067349167; Sun, 12 Aug 2018 02:49:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534067349; cv=none; d=google.com; s=arc-20160816; b=eLBzlXwmOIw2b0iNeGyNjy4KwOWBhWOJ9yjzNJ2s2wY4QKBsv1/bUb68KthiAqWJ5R Y5b0tWQLwNFUzDot02QU2rllyDxM6swepvU8AkOA9HO0/uEmEtHIY563E7ZFxLpn5kfT 3LU+UJXexFqcUJDQwLLZ/5wjUSwT3X4Ttxg2wkpvZYjqyyqQTVRTFTacLDbFCTkd8c4s SeeQ6SfEPe5jqaYfLDsZk3apvLTbvSJEv3OHoqIudktUEz+TLk7wXrui75ASQfIp4yxJ yZoXIGxx/CIEUaZQsPLfPEXhdu0g9gSFe2Lfd+EPDWM5qD0vxHi179FLN9g1eD/UjALg BEEg== 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 t89-v6si15784334pfe.59.2018.08.12.02.49.08; Sun, 12 Aug 2018 02:49:09 -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 S1728172AbeHLM0d (ORCPT + 31 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 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(+) -- 2.11.0 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,