[dpdk-dev,v2,3/3] ethdev: fail if Rx queue offload is not supported

Message ID 1526283378-30507-4-git-send-email-arybchenko@solarflare.com (mailing list archive)
State Not Applicable, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply patch file failure

Commit Message

Andrew Rybchenko May 14, 2018, 7:36 a.m. UTC
  Return of error was removed to mitigate possible breakage of old
applications which are not converted to the new offload API yet.

Old Rx offload API has no per queue controls and Rx queue offloads
are derived from the device Rx mode bitfields exactly in the same
way as it is done on configure and, then, removed to pass queue
level offloads only. It is meaningless and should be removed.

So, the new offload API only may be used to request per-queue
Rx offloads and error should be returned if offload not supported
on queue level is requested.

Fixes: 0330605295cf ("ethdev: new Rx/Tx offloads API")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 lib/librte_ethdev/rte_ethdev.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
  

Patch

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 2b673013a..d82962fae 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -1542,14 +1542,6 @@  rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 		rx_conf = &dev_info.default_rxconf;
 
 	local_conf = *rx_conf;
-	if (dev->data->dev_conf.rxmode.ignore_offload_bitfield == 0) {
-		/**
-		 * Reflect port offloads to queue offloads in order for
-		 * offloads to not be discarded.
-		 */
-		rte_eth_convert_rx_offload_bitfield(&dev->data->dev_conf.rxmode,
-						    &local_conf.offloads);
-	}
 
 	/*
 	 * If an offloading has already been enabled in
@@ -1581,6 +1573,7 @@  rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 				local_conf.offloads,
 				dev_info.rx_queue_offload_capa,
 				__func__);
+		return -EINVAL;
 	}
 
 	ret = (*dev->dev_ops->rx_queue_setup)(dev, rx_queue_id, nb_rx_desc,