From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 66C4BA04A6; Fri, 7 Jan 2022 11:16:24 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D7102410EF; Fri, 7 Jan 2022 11:15:44 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id D191940143 for ; Fri, 7 Jan 2022 11:15:34 +0100 (CET) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4JVfGp0tttzccS8; Fri, 7 Jan 2022 18:14:58 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.20; Fri, 7 Jan 2022 18:15:33 +0800 From: "Min Hu (Connor)" To: CC: , Subject: [PATCH 09/15] net/hns3: remove the number of queue descriptors Date: Fri, 7 Jan 2022 18:15:52 +0800 Message-ID: <20220107101558.39219-10-humin29@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220107101558.39219-1-humin29@huawei.com> References: <20220107101558.39219-1-humin29@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Huisong Li Application can specify the number of Rx/Tx queue descriptors in DPDK. So driver does not obtain the default value from firmware and PF. Signed-off-by: Huisong Li --- drivers/net/hns3/hns3_ethdev.c | 5 ----- drivers/net/hns3/hns3_ethdev.h | 3 --- drivers/net/hns3/hns3_ethdev_vf.c | 26 -------------------------- 3 files changed, 34 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index bf64a4f45e..1deba2a055 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -2542,9 +2542,6 @@ hns3_parse_cfg(struct hns3_cfg *cfg, struct hns3_cmd_desc *desc) /* get the configuration */ cfg->tc_num = hns3_get_field(rte_le_to_cpu_32(req->param[0]), HNS3_CFG_TC_NUM_M, HNS3_CFG_TC_NUM_S); - cfg->tqp_desc_num = hns3_get_field(rte_le_to_cpu_32(req->param[0]), - HNS3_CFG_TQP_DESC_N_M, - HNS3_CFG_TQP_DESC_N_S); cfg->phy_addr = hns3_get_field(rte_le_to_cpu_32(req->param[1]), HNS3_CFG_PHY_ADDR_M, @@ -2855,8 +2852,6 @@ hns3_get_board_configuration(struct hns3_hw *hw) hw->rss_dis_flag = false; memcpy(hw->mac.mac_addr, cfg.mac_addr, RTE_ETHER_ADDR_LEN); hw->mac.phy_addr = cfg.phy_addr; - hw->num_tx_desc = cfg.tqp_desc_num; - hw->num_rx_desc = cfg.tqp_desc_num; hw->dcb_info.num_pg = 1; hw->dcb_info.hw_pfc_map = 0; diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h index ea92d94e37..15ab39796e 100644 --- a/drivers/net/hns3/hns3_ethdev.h +++ b/drivers/net/hns3/hns3_ethdev.h @@ -155,7 +155,6 @@ struct hns3_tc_queue_info { struct hns3_cfg { uint8_t tc_num; - uint16_t tqp_desc_num; uint16_t rss_size_max; uint8_t phy_addr; uint8_t media_type; @@ -512,8 +511,6 @@ struct hns3_hw { uint16_t intr_tqps_num; /* num queue pairs mapping interrupt */ uint16_t rss_size_max; /* HW defined max RSS task queue */ uint16_t rx_buf_len; /* hold min hardware rx buf len */ - uint16_t num_tx_desc; /* desc num of per tx queue */ - uint16_t num_rx_desc; /* desc num of per rx queue */ uint32_t mng_entry_num; /* number of manager table entry */ uint32_t mac_entry_num; /* number of mac-vlan table entry */ diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index 58b4a107d3..0921534205 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -941,27 +941,6 @@ hns3vf_get_queue_info(struct hns3_hw *hw) return hns3vf_check_tqp_info(hw); } -static int -hns3vf_get_queue_depth(struct hns3_hw *hw) -{ -#define HNS3VF_TQPS_DEPTH_INFO_LEN 4 - uint8_t resp_msg[HNS3VF_TQPS_DEPTH_INFO_LEN]; - int ret; - - ret = hns3_send_mbx_msg(hw, HNS3_MBX_GET_QDEPTH, 0, NULL, 0, true, - resp_msg, HNS3VF_TQPS_DEPTH_INFO_LEN); - if (ret) { - PMD_INIT_LOG(ERR, "Failed to get tqp depth info from PF: %d", - ret); - return ret; - } - - memcpy(&hw->num_tx_desc, &resp_msg[0], sizeof(uint16_t)); - memcpy(&hw->num_rx_desc, &resp_msg[2], sizeof(uint16_t)); - - return 0; -} - static void hns3vf_update_caps(struct hns3_hw *hw, uint32_t caps) { @@ -1052,11 +1031,6 @@ hns3vf_get_configuration(struct hns3_hw *hw) if (ret) return ret; - /* Get queue depth info from PF */ - ret = hns3vf_get_queue_depth(hw); - if (ret) - return ret; - /* Get user defined VF MAC addr from PF */ ret = hns3vf_get_host_mac_addr(hw); if (ret) -- 2.33.0