patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v1] net/tap: return empty port offload capabilities
@ 2018-04-25 16:15 Ophir Munk
  2018-04-25 16:31 ` Ferruh Yigit
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Ophir Munk @ 2018-04-25 16:15 UTC (permalink / raw)
  To: dev, Pascal Mazon
  Cc: Thomas Monjalon, Olga Shern, Ferruh Yigit, Ophir Munk, stable

Fix report on port 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.

Fixes: 95ae196ae10b ("net/tap: use new Rx offloads API")
Fixes: 818fe14a9891 ("net/tap: use new Tx offloads API")
Cc: stable@dpdk.org

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

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index fe62ab3..aea73b1 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -269,14 +269,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
@@ -403,14 +398,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 |
-	       DEV_TX_OFFLOAD_TCP_TSO;
+	return 0;
 }
 
 static uint64_t
@@ -787,7 +777,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) {
-- 
2.7.4

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [dpdk-stable] [PATCH v1] net/tap: return empty port offload capabilities
@ 2018-04-25 16:14 Ophir Munk
  0 siblings, 0 replies; 10+ messages in thread
From: Ophir Munk @ 2018-04-25 16:14 UTC (permalink / raw)
  To: Ophir Munk; +Cc: stable

Fix report on port 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.

Fixes: 95ae196ae10b ("net/tap: use new Rx offloads API")
Fixes: 818fe14a9891 ("net/tap: use new Tx offloads API")
Cc: stable@dpdk.org

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

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index fe62ab3..aea73b1 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -269,14 +269,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
@@ -403,14 +398,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 |
-	       DEV_TX_OFFLOAD_TCP_TSO;
+	return 0;
 }
 
 static uint64_t
@@ -787,7 +777,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) {
-- 
2.7.4

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-04-26 16:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-25 16:15 [dpdk-stable] [PATCH v1] net/tap: return empty port offload capabilities Ophir Munk
2018-04-25 16:31 ` Ferruh Yigit
2018-04-26 11:09   ` Ophir Munk
2018-04-25 16:47 ` Thomas Monjalon
2018-04-25 17:13   ` Ferruh Yigit
2018-04-26 11:00 ` [dpdk-stable] [PATCH v2] " Ophir Munk
2018-04-26 11:13 ` Ophir Munk
2018-04-26 16:56   ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
2018-04-26 16:57     ` Ferruh Yigit
  -- strict thread matches above, loose matches on Subject: below --
2018-04-25 16:14 [dpdk-stable] [PATCH v1] " Ophir Munk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).