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 <lihuisong@huawei.com> Acked-by: Min Hu (Connor) <humin29@huawei.com>
This commit is contained in:
parent
a65941e9c4
commit
af1f62b3d1
@ -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;
|
||||
|
||||
|
@ -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 */
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user