From patchwork Wed Oct 9 14:16:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wei Hu (Xavier)" X-Patchwork-Id: 60802 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AC5621E87D; Wed, 9 Oct 2019 16:17:14 +0200 (CEST) Received: from smtp.tom.com (smtprz14.163.net [106.3.154.247]) by dpdk.org (Postfix) with ESMTP id 69C231E537 for ; Wed, 9 Oct 2019 16:17:11 +0200 (CEST) Received: from my-app01.tom.com (my-app01.tom.com [127.0.0.1]) by freemail01.tom.com (Postfix) with ESMTP id EECF51C82C06 for ; Wed, 9 Oct 2019 22:17:27 +0800 (CST) Received: from my-app01.tom.com (HELO smtp.tom.com) ([127.0.0.1]) by my-app01 (TOM SMTP Server) with SMTP ID 1012280281 for ; Wed, 09 Oct 2019 22:17:27 +0800 (CST) Received: from antispam1.tom.com (unknown [172.25.16.55]) by freemail01.tom.com (Postfix) with ESMTP id EC61B1C82A58 for ; Wed, 9 Oct 2019 22:17:27 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tom.com; s=201807; t=1570630647; bh=j+HivmFoIK3h6YCQLOn6aoGYCGv8mdtnKf2ecaaddNk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xdrmafA2WVxRAHkZehmfkiqAXP4NsLgSpLZnE1IA+SOzpv/IOy45+ksgk4uGr1mim fw4LDYWGhvm26BwsZEULHKfo1dClRKgd4bt3kq7GpvNnAFUAplJUHaYrHYa2zcbQ95 UouwE0MAm8H5hLL8xltuajWFhE8cpOLvDu+4lDbw= Received: from antispam1.tom.com (antispam1.tom.com [127.0.0.1]) by antispam1.tom.com (Postfix) with ESMTP id 829C710011A1 for ; Wed, 9 Oct 2019 22:16:01 +0800 (CST) X-Virus-Scanned: Debian amavisd-new at antispam1.tom.com Received: from antispam1.tom.com ([127.0.0.1]) by antispam1.tom.com (antispam1.tom.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xTHPFrS0l-kW for ; Wed, 9 Oct 2019 22:16:00 +0800 (CST) Received: from localhost.localdomain (unknown [114.119.4.74]) by antispam1.tom.com (Postfix) with ESMTPA id 38C2A10011AD; Wed, 9 Oct 2019 22:16:00 +0800 (CST) From: "Wei Hu (Xavier)" To: dev@dpdk.org Cc: xavier.huwei@huawei.com Date: Wed, 9 Oct 2019 22:16:52 +0800 Message-Id: <20191009141653.39364-4-xavier.huwei@tom.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191009141653.39364-1-xavier.huwei@tom.com> References: <20191009141653.39364-1-xavier.huwei@tom.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 3/4] net/hns3: Renew command and desc structure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: humin This patch adds commands and modifies descriptor structures for accessing manage table and mac table. Signed-off-by: humin Signed-off-by: Wei Hu (Xavier) --- drivers/net/hns3/hns3_cmd.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h index be0ecbe86..13a3b87d5 100644 --- a/drivers/net/hns3/hns3_cmd.h +++ b/drivers/net/hns3/hns3_cmd.h @@ -217,6 +217,8 @@ enum hns3_opcode_type { /* PPP module intr commands */ HNS3_PPP_CMD0_INT_CMD = 0x2100, HNS3_PPP_CMD1_INT_CMD = 0x2101, + HNS3_PPP_MAC_VLAN_IDX_RD = 0x2104, + HNS3_MAC_ETHERTYPE_IDX_RD = 0x2105, }; #define HNS3_CMD_FLAG_IN BIT(0) @@ -642,7 +644,7 @@ struct hns3_mac_mgr_tbl_entry_cmd { uint16_t vlan_tag; uint32_t mac_addr_hi32; uint16_t mac_addr_lo16; - uint16_t rsv1; + uint16_t index; uint16_t ethter_type; uint16_t egress_port; uint16_t egress_queue; @@ -707,12 +709,13 @@ struct hns3_mac_vlan_tbl_entry_cmd { uint16_t vlan_tag; uint32_t mac_addr_hi32; uint16_t mac_addr_lo16; - uint16_t rsv1; + uint16_t port; uint8_t entry_type; uint8_t mc_mac_en; uint16_t egress_port; uint16_t egress_queue; - uint8_t rsv2[6]; + uint8_t rsv2[2]; + uint32_t index; }; #define HNS3_TQP_RESET_B 0