DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Shahaf Shuler <shahafs@mellanox.com>, Wei Dai <wei.dai@intel.com>
Subject: [dpdk-dev] [PATCH v2 3/3] ethdev: fail if Rx queue offload is not supported
Date: Mon, 14 May 2018 08:36:18 +0100	[thread overview]
Message-ID: <1526283378-30507-4-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1526283378-30507-1-git-send-email-arybchenko@solarflare.com>

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(-)

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,
-- 
2.17.0

  parent reply	other threads:[~2018-05-14  7:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-11 16:25 [dpdk-dev] [PATCH 0/3] ethdev: fail if requested " Andrew Rybchenko
2018-05-11 16:25 ` [dpdk-dev] [PATCH 1/3] ethdev: fail configure " Andrew Rybchenko
2018-05-11 16:25 ` [dpdk-dev] [PATCH 2/3] ethdev: fail if Tx queue offload is not supported at all Andrew Rybchenko
2018-05-13  5:37   ` Shahaf Shuler
2018-05-13 13:30     ` Shahaf Shuler
2018-05-14  6:54     ` Andrew Rybchenko
2018-05-11 16:25 ` [dpdk-dev] [PATCH 3/3] ethdev: fail if Rx queue offload is not supported Andrew Rybchenko
2018-05-14  7:36 ` [dpdk-dev] [PATCH v2 0/3] ethdev: fail if requested " Andrew Rybchenko
2018-05-14  7:36   ` [dpdk-dev] [PATCH v2 1/3] ethdev: fail configure " Andrew Rybchenko
2018-05-14  7:36   ` [dpdk-dev] [PATCH v2 2/3] ethdev: fail if Tx queue " Andrew Rybchenko
2018-05-14  7:36   ` Andrew Rybchenko [this message]
2018-05-14  7:51   ` [dpdk-dev] [PATCH v2 0/3] ethdev: fail if requested " Shahaf Shuler
2018-05-14 14:48     ` Ferruh Yigit
2018-06-18  8:43       ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1526283378-30507-4-git-send-email-arybchenko@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=shahafs@mellanox.com \
    --cc=thomas@monjalon.net \
    --cc=wei.dai@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).