[dpdk-stable] patch 'net/tap: return empty port offload capabilities' has been queued to stable release 18.02.2

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Apr 30 16:54:00 CEST 2018


Hi,

FYI, your patch has been queued to stable release 18.02.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/02/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From b3f92645149b009c1488c022b0d934f69c89d0ad Mon Sep 17 00:00:00 2001
From: Ophir Munk <ophirmu at mellanox.com>
Date: Thu, 26 Apr 2018 11:13:02 +0000
Subject: [PATCH] net/tap: return empty port offload capabilities

[ upstream commit ead63dd3181c9fdf4a191072f622ad2b934a4b9f ]

Fix internal report on port specific offload capabilities to be 0 (no
capabilities). Before this commit port capabilities were a clone of queue
capabilities, however the current TAP offload capabilities (e.g.
checksum calculation) are per queue and are not specific per port.
This commit fixes an internal validation check for new configured
queue offloads.
The port capability API keeps reporting all queue capabilities as port
capabilities.

Fixes: 95ae196ae10b ("net/tap: use new Rx offloads API")
Fixes: 818fe14a9891 ("net/tap: use new Tx offloads API")

Signed-off-by: Ophir Munk <ophirmu at mellanox.com>
---
 drivers/net/tap/rte_eth_tap.c | 23 ++++++++---------------
 1 file changed, 8 insertions(+), 15 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index a55bf8463..7f85d4133 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -255,14 +255,9 @@ static uint64_t
 tap_rx_offload_get_port_capa(void)
 {
 	/*
-	 * In order to support legacy apps,
-	 * report capabilities also as port capabilities.
+	 * No specific port Rx offload capabilities.
 	 */
-	return DEV_RX_OFFLOAD_SCATTER |
-	       DEV_RX_OFFLOAD_IPV4_CKSUM |
-	       DEV_RX_OFFLOAD_UDP_CKSUM |
-	       DEV_RX_OFFLOAD_TCP_CKSUM |
-	       DEV_RX_OFFLOAD_CRC_STRIP;
+	return 0;
 }
 
 static uint64_t
@@ -389,13 +384,9 @@ static uint64_t
 tap_tx_offload_get_port_capa(void)
 {
 	/*
-	 * In order to support legacy apps,
-	 * report capabilities also as port capabilities.
+	 * No specific port Tx offload capabilities.
 	 */
-	return DEV_TX_OFFLOAD_MULTI_SEGS |
-	       DEV_TX_OFFLOAD_IPV4_CKSUM |
-	       DEV_TX_OFFLOAD_UDP_CKSUM |
-	       DEV_TX_OFFLOAD_TCP_CKSUM;
+	return 0;
 }
 
 static uint64_t
@@ -652,7 +643,8 @@ tap_dev_stop(struct rte_eth_dev *dev)
 static int
 tap_dev_configure(struct rte_eth_dev *dev)
 {
-	uint64_t supp_tx_offloads = tap_tx_offload_get_port_capa();
+	uint64_t supp_tx_offloads = tap_tx_offload_get_port_capa() |
+				tap_tx_offload_get_queue_capa();
 	uint64_t tx_offloads = dev->data->dev_conf.txmode.offloads;
 
 	if ((tx_offloads & supp_tx_offloads) != tx_offloads) {
@@ -1157,7 +1149,8 @@ tap_tx_queue_setup(struct rte_eth_dev *dev,
 				" or supported offloads 0x%" PRIx64,
 				(void *)dev, tx_conf->offloads,
 				dev->data->dev_conf.txmode.offloads,
-				tap_tx_offload_get_port_capa());
+				(tap_tx_offload_get_port_capa() |
+				tap_tx_offload_get_queue_capa()));
 			return -rte_errno;
 		}
 	}
-- 
2.14.2



More information about the stable mailing list