From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 6A75E11A4 for ; Wed, 14 Nov 2018 06:25:00 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2018 21:24:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,231,1539673200"; d="scan'208";a="85674221" Received: from pgsmsx107.gar.corp.intel.com ([10.221.44.105]) by fmsmga007.fm.intel.com with ESMTP; 13 Nov 2018 21:24:56 -0800 Received: from pgsmsx101.gar.corp.intel.com ([169.254.1.244]) by PGSMSX107.gar.corp.intel.com ([169.254.7.2]) with mapi id 14.03.0415.000; Wed, 14 Nov 2018 13:24:55 +0800 From: "Zhao1, Wei" To: Ophir Munk , "Lu, Wenzhuo" , "Wu, Jingjing" , "Iremonger, Bernard" , "dev@dpdk.org" , "Peng, Yuan" CC: Asaf Penso , Shahaf Shuler , Thomas Monjalon , Olga Shern , Yongseok Koh Thread-Topic: [PATCH v1] app/testpmd: set default RSS key as NULL Thread-Index: AQHUc42KKl7n13UNvk+JpU+G+ZKXoKVOzRbQ Date: Wed, 14 Nov 2018 05:24:55 +0000 Message-ID: References: <1541260478-4621-1-git-send-email-ophirmu@mellanox.com> In-Reply-To: <1541260478-4621-1-git-send-email-ophirmu@mellanox.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 v1] app/testpmd: set default RSS key as NULL 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: Wed, 14 Nov 2018 05:25:01 -0000 Hi, Ophir Munk Peng yuan has find this problem with patch , if you use the following tes= t step, You will find the problem. She is using i40e nic. ./x86_64-native-linuxapp-gcc/app/testpmd -c 1ffff -n 4 - -i --nb-cores=3D8 = --rxq=3D4 --txq=3D4 --port-topology=3Dchained ............... testpmd> start testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp end = key 67108863 / end Segmentation fault (core dumped) > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ophir Munk > Sent: Saturday, November 3, 2018 11:55 PM > To: Lu, Wenzhuo ; Wu, Jingjing > ; Iremonger, Bernard > ; dev@dpdk.org > Cc: Asaf Penso ; Shahaf Shuler > ; Thomas Monjalon ; > Olga Shern ; Ophir Munk ; > Yongseok Koh > Subject: [dpdk-dev] [PATCH v1] app/testpmd: set default RSS key as NULL >=20 > When creating an RSS rule without specifying a key (see [1]) it is expect= ed > that the device will use the default key. > A NULL key is uded to indicate to a PMD it should use its default key, > however testpmd assigns a non-NULL dummy key (see [2]) instead. > This does not enable testing any PMD behavior when the RSS key is not > specified. This commit fixes this limitation by setting key to NULL. >=20 > [1] > RSS rule example without specifying a key: > flow create 0 ingress / end actions rss queues 0 1 end / end [2= ] > Testpmd default key assignment: > .key=3D "testpmd's default RSS hash key, " > "override it for better balancing" >=20 > Signed-off-by: Ophir Munk > --- > v1: Initial version >=20 > app/test-pmd/cmdline_flow.c | 15 ++------------- > 1 file changed, 2 insertions(+), 13 deletions(-) >=20 > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > index 23ea7cc..91e2e35 100644 > --- a/app/test-pmd/cmdline_flow.c > +++ b/app/test-pmd/cmdline_flow.c > @@ -3248,26 +3248,15 @@ static int comp_vc_action_rss_queue(struct > context *, const struct token *, > .func =3D RTE_ETH_HASH_FUNCTION_DEFAULT, > .level =3D 0, > .types =3D rss_hf, > - .key_len =3D sizeof(action_rss_data->key), > + .key_len =3D 0, > .queue_num =3D RTE_MIN(nb_rxq, > ACTION_RSS_QUEUE_NUM), > - .key =3D action_rss_data->key, > + .key =3D NULL, > .queue =3D action_rss_data->queue, > }, > - .key =3D "testpmd's default RSS hash key, " > - "override it for better balancing", > .queue =3D { 0 }, > }; > for (i =3D 0; i < action_rss_data->conf.queue_num; ++i) > action_rss_data->queue[i] =3D i; > - if (!port_id_is_invalid(ctx->port, DISABLED_WARN) && > - ctx->port !=3D (portid_t)RTE_PORT_ALL) { > - struct rte_eth_dev_info info; > - > - rte_eth_dev_info_get(ctx->port, &info); > - action_rss_data->conf.key_len =3D > - RTE_MIN(sizeof(action_rss_data->key), > - info.hash_key_size); > - } > action->conf =3D &action_rss_data->conf; > return ret; > } > -- > 1.8.3.1