[3/6] net/hns3: remove debug condition for Tx prepare

Message ID 20230211091830.3494-4-liudongdong3@huawei.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/hns3: some code optimization for Rx/Tx function |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Dongdong Liu Feb. 11, 2023, 9:18 a.m. UTC
From: Huisong Li <lihuisong@huawei.com>

The Tx prepare in driver is always needed if RTE_LIBRTE_ETHDEV_DEBUG
is defined. But it doesn't matter with this macro. Let's remove it.

Fixes: d7ec2c076579 ("net/hns3: select Tx prepare based on Tx offload")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 6 ------
 1 file changed, 6 deletions(-)
  

Patch

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 2524f4c3c2..921d72d69d 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -4311,11 +4311,6 @@  hns3_tx_check_simple_support(struct rte_eth_dev *dev)
 static bool
 hns3_get_tx_prep_needed(struct rte_eth_dev *dev)
 {
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
-	RTE_SET_USED(dev);
-	/* always perform tx_prepare when debug */
-	return true;
-#else
 #define HNS3_DEV_TX_CSKUM_TSO_OFFLOAD_MASK (\
 		RTE_ETH_TX_OFFLOAD_IPV4_CKSUM | \
 		RTE_ETH_TX_OFFLOAD_TCP_CKSUM | \
@@ -4333,7 +4328,6 @@  hns3_get_tx_prep_needed(struct rte_eth_dev *dev)
 		return true;
 
 	return false;
-#endif
 }
 
 eth_tx_burst_t