DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kumar Amber <kumar.amber@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v1] net/i40e: argument in RSS action should have queue
Date: Tue, 10 Nov 2020 23:34:09 +0530	[thread overview]
Message-ID: <20201110180409.42133-1-kumar.amber@intel.com> (raw)

The driver must check for the queue number
in the RSS action list and if not should
return with a proper error message to user.

Signed-off-by: Kumar Amber <kumar.amber@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 5bec0c7a84..975340cb1a 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -4917,6 +4917,17 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
 	NEXT_ITEM_OF_ACTION(act, actions, index);
 	rss = act->conf;
 
+	/**
+	 * Check if Queue number is specified
+	 * in argument else throw an error.
+	 */
+	if (rss->queue == NULL) {
+		rte_flow_error_set(error, EINVAL,
+			RTE_FLOW_ERROR_TYPE_ACTION,
+			act, "Queue numbers not given.");
+		return -rte_errno;
+	}
+
 	/**
 	 * RSS only supports forwarding,
 	 * check if the first not void action is RSS.
-- 
2.17.1


             reply	other threads:[~2020-11-10 18:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10 18:04 Kumar Amber [this message]
2020-11-11 10:10 ` [dpdk-dev] [PATCH v2] net/i40e: fix argument in RSS action Kumar Amber
2020-11-12 10:41   ` [dpdk-dev] [PATCH v3] " Kumar Amber
2020-11-12 10:42   ` [dpdk-dev] [PATCH v4] " Kumar Amber
2020-12-24  1:00     ` Zhang, Qi Z
2021-01-04 10:04       ` Amber, Kumar
2020-12-17  3:20   ` [dpdk-dev] [PATCH v2] " Xing, Beilei
2020-12-17  9:06     ` Chen, BoX C

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=20201110180409.42133-1-kumar.amber@intel.com \
    --to=kumar.amber@intel.com \
    --cc=dev@dpdk.org \
    /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).