From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C3FCBA09FF; Thu, 24 Dec 2020 02:00:22 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E10CFC9CC; Thu, 24 Dec 2020 02:00:20 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 80ED4C9C8 for ; Thu, 24 Dec 2020 02:00:18 +0100 (CET) IronPort-SDR: uweA74ZPAjZysZzJ+zUKkiedHBE/flkhKugEzPo5g+/nfLh2kyE36Vaj2gerbg4i+39CbD8w3l ceOYMPfOzRtg== X-IronPort-AV: E=McAfee;i="6000,8403,9844"; a="176190899" X-IronPort-AV: E=Sophos;i="5.78,443,1599548400"; d="scan'208";a="176190899" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Dec 2020 17:00:16 -0800 IronPort-SDR: Aw0MXotd+/nIzJB4VdGToawfyqI4tZOyk6VVbfWRHEae+pBNKeoM5PxHcfPNsqr3yC+m/I1VR0 Ri/ZlE8VjLyQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,443,1599548400"; d="scan'208";a="374186300" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga008.jf.intel.com with ESMTP; 23 Dec 2020 17:00:16 -0800 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 23 Dec 2020 17:00:15 -0800 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX606.ccr.corp.intel.com (10.109.6.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 24 Dec 2020 09:00:13 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.1713.004; Thu, 24 Dec 2020 09:00:13 +0800 From: "Zhang, Qi Z" To: "Amber, Kumar" , "dev@dpdk.org" CC: "Zhao1, Wei" Thread-Topic: [dpdk-dev] [PATCH v4] net/i40e: fix argument in RSS action Thread-Index: AQHWuOFod5U/912a2kS36HnxU5dVHqoFrDeg Date: Thu, 24 Dec 2020 01:00:13 +0000 Message-ID: <14f80db083464cb7adcbd2d8bcfccede@intel.com> References: <20201111101031.52758-1-kumar.amber@intel.com> <20201112104245.91324-1-kumar.amber@intel.com> In-Reply-To: <20201112104245.91324-1-kumar.amber@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4] 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" > -----Original Message----- > From: dev On Behalf Of Kumar Amber > Sent: Thursday, November 12, 2020 6:43 PM > To: dev@dpdk.org > Cc: Zhao1, Wei > Subject: [dpdk-dev] [PATCH v4] net/i40e: fix argument in RSS action >=20 > 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. >=20 > Bugzilla ID: 573 > Fixes: 9486d60b94b5 ("net/i40e: fix flow RSS queue index check") > Cc: wei.zhao1@intel.com >=20 > Signed-off-by: Kumar Amber > --- > drivers/net/i40e/i40e_flow.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) >=20 > diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c = index > 5bec0c7a84..397ed0ae77 100644 > --- a/drivers/net/i40e/i40e_flow.c > +++ b/drivers/net/i40e/i40e_flow.c > @@ -4917,6 +4917,18 @@ i40e_flow_parse_rss_action(struct rte_eth_dev > *dev, > NEXT_ITEM_OF_ACTION(act, actions, index); > rss =3D act->conf; >=20 > + /** > + * Check if Queue number is specified > + * in argument else throw an error. > + */ > + if (!rss->queue || !rss->queue_num) { > + rte_flow_error_set(error, EINVAL, > + RTE_FLOW_ERROR_TYPE_ACTION, > + act, > + "no valid queues"); > + return -rte_errno; > + } I'm not sure if this is the right solution, the case we may have is: apply = a RSS for a specific pattern for all enabled queues, so an empty queue conf= igure that implicit for all enabled queues could still be acceptable. Can y= ou share what kind of expected failure you are looking for? > + > /** > * RSS only supports forwarding, > * check if the first not void action is RSS. > -- > 2.17.1