[dpdk-dev] [PATCH 1/2] net/tap: remove useless offload capa functions

Stephen Hemminger stephen at networkplumber.org
Wed Jun 16 06:15:27 CEST 2021


Since these always return 0, they were doing nothing useful.

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 drivers/net/tap/rte_eth_tap.c | 24 ++----------------------
 1 file changed, 2 insertions(+), 22 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 5735988e7c82..aeae6e8f5e93 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -373,15 +373,6 @@ tap_verify_csum(struct rte_mbuf *mbuf)
 	}
 }
 
-static uint64_t
-tap_rx_offload_get_port_capa(void)
-{
-	/*
-	 * No specific port Rx offload capabilities.
-	 */
-	return 0;
-}
-
 static uint64_t
 tap_rx_offload_get_queue_capa(void)
 {
@@ -506,15 +497,6 @@ pmd_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	return num_rx;
 }
 
-static uint64_t
-tap_tx_offload_get_port_capa(void)
-{
-	/*
-	 * No specific port Tx offload capabilities.
-	 */
-	return 0;
-}
-
 static uint64_t
 tap_tx_offload_get_queue_capa(void)
 {
@@ -1016,11 +998,9 @@ tap_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->min_rx_bufsize = 0;
 	dev_info->speed_capa = tap_dev_speed_capa();
 	dev_info->rx_queue_offload_capa = tap_rx_offload_get_queue_capa();
-	dev_info->rx_offload_capa = tap_rx_offload_get_port_capa() |
-				    dev_info->rx_queue_offload_capa;
+	dev_info->rx_offload_capa = dev_info->rx_queue_offload_capa;
 	dev_info->tx_queue_offload_capa = tap_tx_offload_get_queue_capa();
-	dev_info->tx_offload_capa = tap_tx_offload_get_port_capa() |
-				    dev_info->tx_queue_offload_capa;
+	dev_info->tx_offload_capa = dev_info->tx_queue_offload_capa;
 	dev_info->hash_key_size = TAP_RSS_HASH_KEY_SIZE;
 	/*
 	 * limitation: TAP supports all of IP, UDP and TCP hash
-- 
2.30.2



More information about the dev mailing list