From patchwork Thu Nov 12 10:41:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Amber, Kumar" X-Patchwork-Id: 84055 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 22635A09D3; Thu, 12 Nov 2020 11:46:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CC58D592B; Thu, 12 Nov 2020 11:46:41 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 5281A5928 for ; Thu, 12 Nov 2020 11:46:40 +0100 (CET) IronPort-SDR: piemuhDJkQn9iqwH6Zfo6PjhkLGKcGx1/PGs0+9G+CnOolLl/OTk8Rhi3w23Pp1aPY4UymmFYj KqCTc315rVAg== X-IronPort-AV: E=McAfee;i="6000,8403,9802"; a="149563093" X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="149563093" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2020 02:46:38 -0800 IronPort-SDR: 9YSXIKYb5f6Ko5fFBEY+U83x4rNwoWgSEAbT/jL0reXB38i07c9gP5HCk85NBLsxNZBfRsxuFO CTbPZmBdMO2A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="429168595" Received: from unknown (HELO localhost.localdomain) ([10.190.212.185]) by fmsmga001.fm.intel.com with ESMTP; 12 Nov 2020 02:46:37 -0800 From: Kumar Amber To: dev@dpdk.org Cc: wei.zhao1@intel.com Date: Thu, 12 Nov 2020 16:11:05 +0530 Message-Id: <20201112104105.91080-1-kumar.amber@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201111101031.52758-1-kumar.amber@intel.com> References: <20201111101031.52758-1-kumar.amber@intel.com> Subject: [dpdk-dev] [PATCH v3] net/i40e: fix argument in RSS action X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. Bugzilla ID: 573 Fixes: 9486d60b94b5 ("net/i40e: fix flow RSS queue index check") Cc: wei.zhao1@intel.com Signed-off-by: Kumar Amber --- 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.