Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751827AbdHaNNc (ORCPT ); Thu, 31 Aug 2017 09:13:32 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:5071 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751205AbdHaNLY (ORCPT ); Thu, 31 Aug 2017 09:11:24 -0400 From: Lipeng To: CC: , , , , , Subject: [PATCH net-next 7/8] net: hns3: add vlan filter config of Ports Date: Thu, 31 Aug 2017 21:39:08 +0800 Message-ID: <1504186749-8926-8-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1504186749-8926-1-git-send-email-lipeng321@huawei.com> References: <1504186749-8926-1-git-send-email-lipeng321@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.71.200.31] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.59A80AFA.0142,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: f993ed026037398116415ce310eb7cdf Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1009 Lines: 23 Config the self_define vlan_type as TPID(0x8100) for vlan identification. When normal port initialize vlan configure, set default vlan id as 0. Signed-off-by: Mingguang Qu Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 12be24f..d0a30f5 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -3308,6 +3308,7 @@ static int hclge_add_mac_vlan_tbl(struct hclge_vport *vport, mc_desc[1].flag |= cpu_to_le16(HCLGE_CMD_FLAG_NEXT); hclge_cmd_reuse_desc(&mc_desc[2], false); mc_desc[2].flag &= cpu_to_le16(~HCLGE_CMD_FLAG_NEXT); + memcpy(mc_desc[0].data, req, sizeof(struct hclge_mac_vlan_tbl_entry)); ret = hclge_cmd_send(&hdev->hw, mc_desc, 3); -- 1.9.1