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 5D1CDA04A6; Fri, 7 Jan 2022 11:16:12 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 89BC641169; Fri, 7 Jan 2022 11:15:42 +0100 (CET) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 9C16040140 for ; Fri, 7 Jan 2022 11:15:34 +0100 (CET) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4JVfGn4GZmzbjs9; Fri, 7 Jan 2022 18:14:57 +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 08/15] net/hns3: remove unused variables Date: Fri, 7 Jan 2022 18:15:51 +0800 Message-ID: <20220107101558.39219-9-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 Remove unused variables. Signed-off-by: Huisong Li --- drivers/net/hns3/hns3_dcb.c | 12 +----------- drivers/net/hns3/hns3_ethdev.c | 3 --- drivers/net/hns3/hns3_ethdev.h | 2 -- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c index 3d0159d787..136ada626b 100644 --- a/drivers/net/hns3/hns3_dcb.c +++ b/drivers/net/hns3/hns3_dcb.c @@ -750,19 +750,9 @@ static int hns3_dcb_update_tc_queue_mapping(struct hns3_hw *hw, uint16_t nb_rx_q, uint16_t nb_tx_q) { - struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw); - struct hns3_pf *pf = &hns->pf; - int ret; - hw->num_tc = hw->dcb_info.num_tc; - ret = hns3_queue_to_tc_mapping(hw, nb_rx_q, nb_tx_q); - if (ret) - return ret; - if (!hns->is_vf) - memcpy(pf->prio_tc, hw->dcb_info.prio_tc, HNS3_MAX_USER_PRIO); - - return 0; + return hns3_queue_to_tc_mapping(hw, nb_rx_q, nb_tx_q); } int diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 756645a410..bf64a4f45e 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -2552,9 +2552,6 @@ hns3_parse_cfg(struct hns3_cfg *cfg, struct hns3_cmd_desc *desc) cfg->media_type = hns3_get_field(rte_le_to_cpu_32(req->param[1]), HNS3_CFG_MEDIA_TP_M, HNS3_CFG_MEDIA_TP_S); - cfg->rx_buf_len = hns3_get_field(rte_le_to_cpu_32(req->param[1]), - HNS3_CFG_RX_BUF_LEN_M, - HNS3_CFG_RX_BUF_LEN_S); /* get mac address */ mac_addr_tmp = rte_le_to_cpu_32(req->param[2]); mac_addr_tmp_high = hns3_get_field(rte_le_to_cpu_32(req->param[3]), diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h index aa45b31261..ea92d94e37 100644 --- a/drivers/net/hns3/hns3_ethdev.h +++ b/drivers/net/hns3/hns3_ethdev.h @@ -156,7 +156,6 @@ struct hns3_tc_queue_info { struct hns3_cfg { uint8_t tc_num; uint16_t tqp_desc_num; - uint16_t rx_buf_len; uint16_t rss_size_max; uint8_t phy_addr; uint8_t media_type; @@ -804,7 +803,6 @@ struct hns3_pf { uint8_t tc_max; /* max number of tc driver supported */ uint8_t local_max_tc; /* max number of local tc */ uint8_t pfc_max; - uint8_t prio_tc[HNS3_MAX_USER_PRIO]; /* TC indexed by prio */ uint16_t pause_time; bool support_fc_autoneg; /* support FC autonegotiate */ bool support_multi_tc_pause; -- 2.33.0