[v1] net/i40e: argument in RSS action should have queue
Checks
Commit Message
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(+)
@@ -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.