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

Message ID 1526055955-14027-4-git-send-email-arybchenko@solarflare.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Andrew Rybchenko May 11, 2018, 4:25 p.m. UTC
  Return of error was removed to mitigate possible breakage of old
applications which are not converted to the new offload API yet.
However, 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. Device
level Rx offloads are removed from queue offloads, so Rx queue
offloads should be empty if old Rx offload API is used.

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

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

Patch

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 60577efcf..938ec5638 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -1580,6 +1580,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,