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 6DD90A04A6; Fri, 7 Jan 2022 11:16:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D5EC9411A7; Fri, 7 Jan 2022 11:15:46 +0100 (CET) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 3C16540042 for ; Fri, 7 Jan 2022 11:15:35 +0100 (CET) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4JVfGp1RYSzbjjQ; 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 12/15] net/hns3: remove invalid encapsulation function Date: Fri, 7 Jan 2022 18:15:55 +0800 Message-ID: <20220107101558.39219-13-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: Chengwen Feng This patch remove invalid encapsulation functions. Signed-off-by: Chengwen Feng --- drivers/net/hns3/hns3_ethdev.c | 27 ++++++++------------------- drivers/net/hns3/hns3_ethdev_vf.c | 13 ++----------- 2 files changed, 10 insertions(+), 30 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index a4ed08b52b..a876afe3c3 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -593,22 +593,6 @@ hns3_set_vlan_rx_offload_cfg(struct hns3_adapter *hns, return ret; } -static void -hns3_update_rx_offload_cfg(struct hns3_adapter *hns, - struct hns3_rx_vtag_cfg *vcfg) -{ - struct hns3_pf *pf = &hns->pf; - memcpy(&pf->vtag_config.rx_vcfg, vcfg, sizeof(pf->vtag_config.rx_vcfg)); -} - -static void -hns3_update_tx_offload_cfg(struct hns3_adapter *hns, - struct hns3_tx_vtag_cfg *vcfg) -{ - struct hns3_pf *pf = &hns->pf; - memcpy(&pf->vtag_config.tx_vcfg, vcfg, sizeof(pf->vtag_config.tx_vcfg)); -} - static int hns3_en_hw_strip_rxvtag(struct hns3_adapter *hns, bool enable) { @@ -638,7 +622,8 @@ hns3_en_hw_strip_rxvtag(struct hns3_adapter *hns, bool enable) return ret; } - hns3_update_rx_offload_cfg(hns, &rxvlan_cfg); + memcpy(&hns->pf.vtag_config.rx_vcfg, &rxvlan_cfg, + sizeof(struct hns3_rx_vtag_cfg)); return ret; } @@ -836,7 +821,9 @@ hns3_vlan_txvlan_cfg(struct hns3_adapter *hns, uint16_t port_base_vlan_state, return ret; } - hns3_update_tx_offload_cfg(hns, &txvlan_cfg); + memcpy(&hns->pf.vtag_config.tx_vcfg, &txvlan_cfg, + sizeof(struct hns3_tx_vtag_cfg)); + return ret; } @@ -962,7 +949,9 @@ hns3_en_pvid_strip(struct hns3_adapter *hns, int on) if (ret) return ret; - hns3_update_rx_offload_cfg(hns, &rx_vlan_cfg); + memcpy(&hns->pf.vtag_config.rx_vcfg, &rx_vlan_cfg, + sizeof(struct hns3_rx_vtag_cfg)); + return ret; } diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index 18abf9b109..0842631e9c 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -1026,15 +1026,6 @@ hns3vf_get_configuration(struct hns3_hw *hw) return hns3vf_get_port_base_vlan_filter_state(hw); } -static int -hns3vf_set_tc_queue_mapping(struct hns3_adapter *hns, uint16_t nb_rx_q, - uint16_t nb_tx_q) -{ - struct hns3_hw *hw = &hns->hw; - - return hns3_queue_to_tc_mapping(hw, nb_rx_q, nb_tx_q); -} - static void hns3vf_request_link_info(struct hns3_hw *hw) { @@ -1530,7 +1521,7 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev) goto err_set_tc_queue; } - ret = hns3vf_set_tc_queue_mapping(hns, hw->tqps_num, hw->tqps_num); + ret = hns3_queue_to_tc_mapping(hw, hw->tqps_num, hw->tqps_num); if (ret) { PMD_INIT_LOG(ERR, "failed to set tc info, ret = %d.", ret); goto err_set_tc_queue; @@ -1739,7 +1730,7 @@ hns3vf_do_start(struct hns3_adapter *hns, bool reset_queue) uint16_t nb_tx_q = hw->data->nb_tx_queues; int ret; - ret = hns3vf_set_tc_queue_mapping(hns, nb_rx_q, nb_tx_q); + ret = hns3_queue_to_tc_mapping(hw, nb_rx_q, nb_tx_q); if (ret) return ret; -- 2.33.0