代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/dpdk 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From af1f62b3d1e6bf12830facbb0161981bdce6685d Mon Sep 17 00:00:00 2001
From: Huisong Li <[email protected]>
Date: Sat, 22 Jan 2022 09:51:35 +0800
Subject: [PATCH] net/hns3: remove getting number of queue descriptors from FW
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 <[email protected]>
Acked-by: Min Hu (Connor) <[email protected]>
---
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 90eb6340a9..aa9301c561 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2536,9 +2536,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,
@@ -2849,8 +2846,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 1dd388625b..cf6380ebb2 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 5a1286e17b..36d860d08a 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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。