From: "Min Hu (Connor)" <humin29@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <thomas@monjalon.net>
Subject: [PATCH 09/15] net/hns3: remove the number of queue descriptors
Date: Fri, 7 Jan 2022 18:15:52 +0800 [thread overview]
Message-ID: <20220107101558.39219-10-humin29@huawei.com> (raw)
In-Reply-To: <20220107101558.39219-1-humin29@huawei.com>
From: Huisong Li <lihuisong@huawei.com>
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 <lihuisong@huawei.com>
---
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
next prev parent reply other threads:[~2022-01-07 10:16 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-07 10:15 [PATCH 00/15] fix and feature for hns3 PMD Min Hu (Connor)
2022-01-07 10:15 ` [PATCH 01/15] net/hns3: remove unnecessary assignment Min Hu (Connor)
2022-01-07 10:15 ` [PATCH 02/15] net/hns3: fix a misjudgment expression Min Hu (Connor)
2022-01-07 10:15 ` [PATCH 03/15] net/hns3: extract a common API to initialize MAC addrs Min Hu (Connor)
2022-01-07 10:15 ` [PATCH 04/15] net/hns3: remove unnecessary 'inline' Min Hu (Connor)
2022-01-07 10:15 ` [PATCH 05/15] net/hns3: remove unnecessary black lines Min Hu (Connor)
2022-01-07 10:15 ` [PATCH 06/15] net/hns3: extract a function to handle reset fail Min Hu (Connor)
2022-01-07 10:15 ` [PATCH 07/15] net/hns3: extract functions to create RSS and FDIR flow rule Min Hu (Connor)
2022-01-07 10:15 ` [PATCH 08/15] net/hns3: remove unused variables Min Hu (Connor)
2022-01-07 10:15 ` Min Hu (Connor) [this message]
2022-01-07 10:15 ` [PATCH 10/15] net/hns3: remove the printing of memory addresses Min Hu (Connor)
2022-01-07 10:15 ` [PATCH 11/15] net/hns3: extract a common interface to obtain revision ID Min Hu (Connor)
2022-01-07 10:15 ` [PATCH 12/15] net/hns3: remove invalid encapsulation function Min Hu (Connor)
2022-01-07 10:15 ` [PATCH 13/15] net/hns3: delete strerror invoke Min Hu (Connor)
2022-01-07 10:15 ` [PATCH 14/15] net/hns3: rename function Min Hu (Connor)
2022-01-07 10:15 ` [PATCH 15/15] net/hns3: support indirect counter action Min Hu (Connor)
2022-01-21 17:29 ` [PATCH 00/15] fix and feature for hns3 PMD Ferruh Yigit
2022-01-22 1:52 ` Min Hu (Connor)
2022-01-22 1:51 ` [PATCH v2 " Min Hu (Connor)
2022-01-22 1:51 ` [PATCH v2 01/15] net/hns3: remove unnecessary assignment Min Hu (Connor)
2022-01-22 1:51 ` [PATCH v2 02/15] net/hns3: fix a misjudgment expression Min Hu (Connor)
2022-01-22 1:51 ` [PATCH v2 03/15] net/hns3: extract a common API to initialize MAC addrs Min Hu (Connor)
2022-01-22 1:51 ` [PATCH v2 04/15] net/hns3: remove unnecessary 'inline' Min Hu (Connor)
2022-01-22 1:51 ` [PATCH v2 05/15] net/hns3: remove unnecessary black lines Min Hu (Connor)
2022-01-22 1:51 ` [PATCH v2 06/15] net/hns3: extract a function to handle reset fail Min Hu (Connor)
2022-01-22 1:51 ` [PATCH v2 07/15] net/hns3: remove unused variables Min Hu (Connor)
2022-01-22 1:51 ` [PATCH v2 08/15] net/hns3: remove the number of queue descriptors Min Hu (Connor)
2022-01-22 1:51 ` [PATCH v2 09/15] net/hns3: remove the printing of memory addresses Min Hu (Connor)
2022-01-22 1:51 ` [PATCH v2 10/15] net/hns3: extract a common interface to obtain revision ID Min Hu (Connor)
2022-01-22 1:51 ` [PATCH v2 11/15] net/hns3: remove invalid encapsulation function Min Hu (Connor)
2022-01-27 13:04 ` Ferruh Yigit
2022-01-22 1:51 ` [PATCH v2 12/15] net/hns3: delete strerror invoke Min Hu (Connor)
2022-01-22 1:51 ` [PATCH v2 13/15] net/hns3: rename function Min Hu (Connor)
2022-01-22 1:51 ` [PATCH v2 14/15] net/hns3: extract functions to create RSS and FDIR flow rule Min Hu (Connor)
2022-01-22 1:51 ` [PATCH v2 15/15] net/hns3: support indirect counter action Min Hu (Connor)
2022-01-27 12:49 ` [PATCH v2 00/15] fix and feature for hns3 PMD Ferruh Yigit
2022-01-27 13:50 ` Ferruh Yigit
2022-01-28 0:40 ` Min Hu (Connor)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220107101558.39219-10-humin29@huawei.com \
--to=humin29@huawei.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).