Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp4693581ooa; Tue, 14 Aug 2018 09:16:13 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyO3ZjCojjG35RQnYhJ5IARxJZkEVv0y3z30fvsFCkQ8/1zI7txIql3DEuuXZzc+dQB1G4u X-Received: by 2002:a62:642:: with SMTP id 63-v6mr24082379pfg.42.1534263373692; Tue, 14 Aug 2018 09:16:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534263373; cv=none; d=google.com; s=arc-20160816; b=BlUP1L1eahjI946a+TV9hbs+wPbLc7z/m52epbka9wWqa91KdvjrSut6QW+P2S4e5h r4l0LjwhTJmn8h4LKeoc7/egibEywo4ou1+awc5TJYKrXijeZRK7JbdsUnVkkxY/fgrA doFX7lJE6oPGGg92pHciYn67AnGp0/8DvQ9eIegezm/Swqa8QN3C3ptJMC/CCb0H2gRO bDIhaL1t7LvdfWy4phB7xegzigT5lbRTTbhPaa0kqXzhAhtxczuoYyB7lFX+9RpUSXvQ gHcTN/WUwuecNqI2+nCawhUyrw3VuMl5A/RbU6f+ir5CYX4Og+jQcMZ4lcBjlCIfLi8H hNWw== 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=y+0qpgK5kNCeUpcAoH8BG168k5mRaZxrxSACbUTWR5A=; b=CAhr887i02mK5RUPfVU9IkkZfkNpD88M9hAMB6BlrWKyDF00spxQ5goeoWLC4IwYQX qpt2AXZNhRtqihpUB5Db60ZOXCes7Bohr94UmvLx/r6c9/eE08YfHZ/jUen99qU0Muow 8XSM1jsiKqVwUufw5sr2T/vWEYqiudZR5gkVwlr+WKYifHZ0k15LgCpoaJF+zsYHZ6wW RmO3D+jLp/Ti+uunBJOfaPx/sT8dQCN+f79E0WcCxC9/XGN+YKQiv0zKhQyoPloPpFY6 kowcemLmEgkk13Ij3kYEzydJ3NQtXS0n8StwrhfvaBEVvoYW+rqTXTLYPzpPr2MeH8VA EepA== 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 68-v6si19002144pla.332.2018.08.14.09.15.58; Tue, 14 Aug 2018 09:16:13 -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 S1733133AbeHNTCV (ORCPT + 99 others); Tue, 14 Aug 2018 15:02:21 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:42424 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1733047AbeHNTCU (ORCPT ); Tue, 14 Aug 2018 15:02:20 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 39B3D9FDC1C44; Wed, 15 Aug 2018 00:14:27 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.202.226.54) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.399.0; Wed, 15 Aug 2018 00:14:19 +0800 From: Salil Mehta To: CC: , , , , , , Subject: [PATCH V2 net-next 8/8] net: hns3: Add vlan filter setting by ethtool command -K Date: Tue, 14 Aug 2018 17:13:19 +0100 Message-ID: <20180814161319.16392-9-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180814161319.16392-1-salil.mehta@huawei.com> References: <20180814161319.16392-1-salil.mehta@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.202.226.54] 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 b28c7e1..3554dca 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.7.4