From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id A86C42F42 for ; Thu, 15 Nov 2018 10:54:46 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Nov 2018 01:54:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,236,1539673200"; d="scan'208";a="92240709" Received: from pgsmsx111.gar.corp.intel.com ([10.108.55.200]) by orsmga008.jf.intel.com with ESMTP; 15 Nov 2018 01:54:44 -0800 Received: from pgsmsx101.gar.corp.intel.com ([169.254.1.244]) by PGSMSX111.gar.corp.intel.com ([169.254.2.208]) with mapi id 14.03.0415.000; Thu, 15 Nov 2018 17:54:44 +0800 From: "Zhao1, Wei" To: "dev@dpdk.org" CC: "Zhang, Qi Z" , "Peng, Yuan" Thread-Topic: [PATCH] net/i40e: fix RSS key pointer initialization error Thread-Index: AQHUfMSp4UImhvm7wkyQJBAVAmyRxaVQl2QQ Date: Thu, 15 Nov 2018 09:54:43 +0000 Message-ID: References: <1542272240-24905-1-git-send-email-wei.zhao1@intel.com> In-Reply-To: <1542272240-24905-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.400.15 dlp-reaction: no-action x-originating-ip: [172.30.20.206] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix RSS key pointer initialization error 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: , X-List-Received-Date: Thu, 15 Nov 2018 09:54:47 -0000 Send on behalf of Peng, Yuan tested-by: Peng, Yuan - Tested Branch: master - Tested Commit: 3e42b6ce06a1901b1ab631df4484ec8f548091c6 - OS: 4.5.5-300.fc24.x86_64 - GCC: gcc (GCC) 5.3.1 20151207 (Red Hat 5.3.1-2) - CPU: Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz - NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [80= 86:10fb] (rev 01) Intel Corporation Ethernet Controller X710 for 10GbE SFP+ [8086:1572] = (rev 01) - Default x86_64-native-linuxapp-gcc configuration - Prerequisites: - Total 1 cases, 1 passed, 0 failed - Case: ./usertools/dpdk-devbind.py -b igb_uio 05:00.0 05:00.1 ./x86_64-native-linuxapp-gcc/app/testpmd -c 1ffff -n 4 - -i --nb-cores=3D8 = --rxq=3D4 --txq=3D4 --port-topology=3Dchained testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp end k= ey 67108863 / end Flow rule #0 created testpmd> flow flush 0 testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp end /= end Flow rule #0 created > -----Original Message----- > From: Zhao1, Wei > Sent: Thursday, November 15, 2018 4:57 PM > To: dev@dpdk.org > Cc: Zhang, Qi Z ; Peng, Yuan ; > Zhao1, Wei > Subject: [PATCH] net/i40e: fix RSS key pointer initialization error >=20 > The assignment should be done after initialization, or it will be zero. >=20 > Fixes: 264b23e3d2c1 ("net/i40e: add parameter check for RSS flow init") >=20 > Signed-off-by: Wei Zhao > --- > drivers/net/i40e/i40e_ethdev.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.c > index 790ecc3..a96d407 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -12554,8 +12554,6 @@ i40e_rss_conf_init(struct i40e_rte_flow_rss_conf > *out, > return -EINVAL; > if (!in->key && in->key_len) > return -EINVAL; > - if (in->key) > - out->conf.key =3D memcpy(out->key, in->key, in->key_len); > out->conf =3D (struct rte_flow_action_rss){ > .func =3D in->func, > .level =3D in->level, > @@ -12565,6 +12563,8 @@ i40e_rss_conf_init(struct i40e_rte_flow_rss_conf > *out, > .queue =3D memcpy(out->queue, in->queue, > sizeof(*in->queue) * in->queue_num), > }; > + if (in->key) > + out->conf.key =3D memcpy(out->key, in->key, in->key_len); > return 0; > } >=20 > -- > 2.7.5