From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 1205DA0096 for ; Thu, 9 May 2019 05:34:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DC02944C3; Thu, 9 May 2019 05:34:56 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 6B4C2DE3; Thu, 9 May 2019 05:34:54 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 May 2019 20:34:53 -0700 X-ExtLoop1: 1 Received: from kmsmsx157.gar.corp.intel.com ([172.21.138.134]) by fmsmga004.fm.intel.com with ESMTP; 08 May 2019 20:34:52 -0700 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.111]) by kmsmsx157.gar.corp.intel.com ([169.254.5.17]) with mapi id 14.03.0415.000; Thu, 9 May 2019 11:34:51 +0800 From: "Zhao1, Wei" To: "dev@dpdk.org" CC: "stable@dpdk.org" , "Zhang, Qi Z" , "Peng, Yuan" , "Li, WenjieX A" Thread-Topic: [PATCH] net/i40e: fix error when create two RSS flow rule Thread-Index: AQHVBhdKfmf1KANdZkO4PLxLR/YOpKZiI6cw Date: Thu, 9 May 2019 03:34:50 +0000 Message-ID: References: <1557370770-16508-1-git-send-email-wei.zhao1@intel.com> In-Reply-To: <1557370770-16508-1-git-send-email-wei.zhao1@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix error when create two RSS flow rule 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" Message-ID: <20190509033450.b_4inIzVkLcRS1KDrXwiROQD6-Q22Zow0_dAGATBWh0@z> Tested-by: Li WenjieX > -----Original Message----- > From: Zhao1, Wei > Sent: Thursday, May 9, 2019 11:00 AM > To: dev@dpdk.org > Cc: stable@dpdk.org; Zhang, Qi Z ; Peng, Yuan > ; Zhao1, Wei > Subject: [PATCH] net/i40e: fix error when create two RSS flow rule >=20 > There is need to refuse to create the second RSS flow rule as only one RS= S key > and HASH register for each PF port. > Users should delete the first rule before setup the second rule. >=20 > Fixes: ecad87d22383 ("net/i40e: move RSS to flow API") > Cc: stable@dpdk.org >=20 > Signed-off-by: Wei Zhao > --- > drivers/net/i40e/i40e_flow.c | 8 ++++++++ > 1 file changed, 8 insertions(+) >=20 > diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c = index > 5447e4e..bca93b6 100644 > --- a/drivers/net/i40e/i40e_flow.c > +++ b/drivers/net/i40e/i40e_flow.c > @@ -4444,6 +4444,14 @@ i40e_flow_parse_rss_action(struct rte_eth_dev > *dev, > } > } >=20 > + if (rss_info->conf.queue_num) { > + rte_flow_error_set(error, EINVAL, > + RTE_FLOW_ERROR_TYPE_ACTION, > + act, > + "rss only allow one valid rule"); > + return -rte_errno; > + } > + > /* Parse RSS related parameters from configuration */ > if (rss->func !=3D RTE_ETH_HASH_FUNCTION_DEFAULT) > return rte_flow_error_set > -- > 2.7.5