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 B45F3A04E1; Tue, 22 Sep 2020 11:51:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 085E11DB4B; Tue, 22 Sep 2020 11:51:33 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60068.outbound.protection.outlook.com [40.107.6.68]) by dpdk.org (Postfix) with ESMTP id E046D1C29F for ; Tue, 22 Sep 2020 11:51:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NfU0knnR8vY+iRhUNXnvIu/tp2HeyPl/SuAKvBIqhik=; b=AZl72KfbyK0CIZ9+YF1amAx3e8jYbz9CFEksOJtH9IWiCLv/6hX6O7C1so3uNxz2stPYZneO6X2CeXKw0jDXbSQ6ll3kGsBlOB9qFtias70QIZCsXabvFn2/muK4XiwC/D2N1Nrxo+p8zrz8w1GuFQHRnadevqr6stJB8VbVrmc= Received: from AM5PR0301CA0035.eurprd03.prod.outlook.com (2603:10a6:206:14::48) by AM0PR08MB3491.eurprd08.prod.outlook.com (2603:10a6:208:d3::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.14; Tue, 22 Sep 2020 09:51:29 +0000 Received: from VE1EUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:14:cafe::f) by AM5PR0301CA0035.outlook.office365.com (2603:10a6:206:14::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.14 via Frontend Transport; Tue, 22 Sep 2020 09:51:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=timeout (key query timeout) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT049.mail.protection.outlook.com (10.152.19.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.15 via Frontend Transport; Tue, 22 Sep 2020 09:51:27 +0000 Received: ("Tessian outbound 7a6fb63c1e64:v64"); Tue, 22 Sep 2020 09:51:26 +0000 X-CR-MTA-TID: 64aa7808 Received: from 1b13f3f685f4.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 68E702BF-2C02-427A-B956-4C5B4ABAE532.1; Tue, 22 Sep 2020 09:51:21 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1b13f3f685f4.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 22 Sep 2020 09:51:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AcW6fN735260XUM/Uvco7UMVDcSNyR5cPO0E05pWm3H1zM6qu7XcbBD4dH2iYqNc0ZA4/ORM6AuhDN+69zCuWhO6zP1UXF0pU53UvL5TR9JwvA0l87Wg9mv3ocNIdu1VdhplIfBEj7SUvZL7bXc35gaRHYs00ZirRfvBgQ9Mie3CrS4vhR3wdm87gSnDYRcyYF0MzIGE96BjeJP3DOb/qGK7CE6jb3yr6KiWPhsoX5ZQtdluDzrnrJWWXfnsfQYS0WFCJ8S3bBwHzYecT6bRrN9lT7JvS4k4flcK8H3SmZbxOepb6KaVYL75azq8lwsYzSQWUyoIvx1o/QGPuMmDgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NfU0knnR8vY+iRhUNXnvIu/tp2HeyPl/SuAKvBIqhik=; b=XhCwdSFRQ1VyVDACSWIEV6zzDJBSplH5SxRwn9XLtL1k+jMfCajSMoTfnlBS5ONL4ic6nwBXK+HOE/o+gC2a0sMJtvttTOio0E4C2vrMDATs2fdAQqBitTc0xujJ/rk6k8ze0c7YreBULqmU8uGaIjLW5Sdm2AS59rmgDqmvtN6TgyV/wQQ50FscguFSUM1VQeS8GDEbKhakiXE2Li8bcOw1qY/wpaUAiFJm87SCnLL2S3v/VZU7IRTBCCwYU4aC54QOZovSgsTK+Cm+E5Tp0R5qxGvoc5aZlQeJxzauqQ87LTvZ4Rr/kFfL0DFrBVGlNRz4yIo7oBPVMA+tIN+3sw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NfU0knnR8vY+iRhUNXnvIu/tp2HeyPl/SuAKvBIqhik=; b=AZl72KfbyK0CIZ9+YF1amAx3e8jYbz9CFEksOJtH9IWiCLv/6hX6O7C1so3uNxz2stPYZneO6X2CeXKw0jDXbSQ6ll3kGsBlOB9qFtias70QIZCsXabvFn2/muK4XiwC/D2N1Nrxo+p8zrz8w1GuFQHRnadevqr6stJB8VbVrmc= Received: from DB7PR08MB3865.eurprd08.prod.outlook.com (2603:10a6:10:74::25) by DB7PR08MB3722.eurprd08.prod.outlook.com (2603:10a6:10:33::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.11; Tue, 22 Sep 2020 09:51:18 +0000 Received: from DB7PR08MB3865.eurprd08.prod.outlook.com ([fe80::519c:72bd:e189:625b]) by DB7PR08MB3865.eurprd08.prod.outlook.com ([fe80::519c:72bd:e189:625b%7]) with mapi id 15.20.3391.027; Tue, 22 Sep 2020 09:51:18 +0000 From: Phil Yang To: Lijun Ou , "wenzhuo.lu@intel.com" , "beilei.xing@intel.com" , "adrien.mazarguil@6wind.com" , "ferruh.yigit@intel.com" CC: "dev@dpdk.org" , "linuxarm@huawei.com" , nd , nd Thread-Topic: [dpdk-dev] [PATCH v3] app/testpmd: fix the default RSS key configuration Thread-Index: AQHWhxVDh0brphwk7UKHX7lxgtum6Kl0dYIA Date: Tue, 22 Sep 2020 09:51:17 +0000 Message-ID: References: <1599702678-11142-1-git-send-email-oulijun@huawei.com> In-Reply-To: <1599702678-11142-1-git-send-email-oulijun@huawei.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 0D08F1BAFB03E548A6BAAC1AC8EA09B7.0 x-checkrecipientchecked: true Authentication-Results-Original: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [203.126.0.111] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: eebe9efc-05e9-4378-90ec-08d85edd12f5 x-ms-traffictypediagnostic: DB7PR08MB3722:|AM0PR08MB3491: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:5236;OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: nnpZ2WE/LXHiXWm93OWA30pLkXjZXHdTkAeO33QQmACxVpztjf0E2nbLIMAC3Ma/wMcXM7VfokhBZFOk3NJFB2RWy7tGhOS/bOsDOm4eegcDdcKQcJXr/qyBaK5qJR3DWr2aATWCC7/LUDoV+5l354WpBU9jl/OVkelVVyhujjQr7XBr0PO1JQHCJO24X8ChCjJ0VyEAcXBm2OcAQ2yYWAxz0THIzr9tA9nGYf7W3Vai5SQWJZuDTz2O8V5IgV8fUf7sxSTCK0Wl9bV8rcTkzVRkU9ogjZPkb3Ky68KukFKqLAjBvQMpSTXxGTtKZvymBz/uc+xNCWsX+2CIN/5HJIxP8P/qoj2CAHc0B0IsEXBmlraETiYj9Qz4iNy5POEESLgTd6v7SnzBpfUcJmQ3cbG1cCYOJ49Gvu4oh7FWcdGENq9cqyc7W2kudQNUPc467XHY4VsocvFpDDsnlAdR/A== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB7PR08MB3865.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(376002)(39850400004)(346002)(136003)(396003)(54906003)(110136005)(83380400001)(8936002)(316002)(76116006)(4326008)(966005)(66446008)(66476007)(64756008)(66556008)(2906002)(66946007)(478600001)(71200400001)(55016002)(9686003)(26005)(6506007)(186003)(33656002)(7696005)(5660300002)(53546011)(86362001)(52536014)(21314003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: aZhEbeRxNSuA0H/eeaTfrSEqQtrSe1C1l9Fjab3J25EsdZsL/LpmxI8/2jYdWt8INOeeiphaQhK12cV5dkK/bCzmOzGil+o4KId5DcYQNMX217PNpLZFJdjIVR7v9PkbTANcN74oto5QgPtJ6wgHP2RY+YOV7P5DQP6dtj+Bl3Bk8/hXpyFGDVMA/b3Ok3q1Yke+3o+SsvQjqetA1OQ0t6nfT0O42Wyx7UakdyGliml+5ZQo0F9zfR7Cao8NwpiHmwvIdZOTDa+bMuKVSqxEpU0eJTGJU+wzBQ83DR+hVLtT1trAbGGrxyBTnD1wkkNTpqIvpVkxrcTjwpUzerMYhnke05ayBV6XxekcgzCbw462BezqfpYnYPum+IQrGCeAuFRSIyds6Q4YDKBOgus2QrT6LJ1VmfJnP9uqI5oTP63aqe2p1Turf8HzpeVyHk8BpTJkso7B/N0+BmGHqnMlCttPJUc6dsXUrE8BXeRabjDZU+bINbl9MzHlQN0UN9X11b8Ld05AtasKWE4owV3vftC2HiMmwy48NLrWdUxe3Y6H0xDdZHJT9sKKaaoGguG3IFgAdxaNuUPhN/afbzq02zJvTdycUP7bS6jdk5lwRRaMW/QwQTGx97dxMTgKRFToGvUEo+YuCBhDINpPBRWOrg== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3722 Original-Authentication-Results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT049.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 9264c120-ab99-417e-21fc-08d85edd0d90 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nVsoHAnzdp9BA44AwLENp752e7jGrb1OdqI5rD6wMGIscKdTLl1SdnYMwZoiKpU33T65eLlnkKTVrRNxkOLqstrCylG3CuiLIImShoFPRpPufvGU56qTxHpLsmFmERf7fePG0QfFmR5IkZKQofcs6KKpHta0VZ0BoQomKFN6lgv/W8rZ0h0Bat8tUvhi4/p+LAVturEtjVs2m65rErdhMIPEXoZNykiEjHB7cYyi5cwPGfF3op8uMjqTMGMBoxTSCwpQ3hGa56BNstUhEM5TwsGd4nND7IM7KzN9b+AyjTU2+UcNvvtloSiqkqf8uBDZuqGCtEBJwXuyzdriQV8pMUzliC/+PdaIKJ1rp9sg3T2foc3WMpL8b4XvKKo4rvBrJj2K+zHdOjUvXo42x+OAXeHB93NPtK+4G7p1t/yolWNxURcOrlu0d+n4iLJCgx+rh2cMxf2b2aZL5WBFBl54YE8E8OPviaLUeiyVKmnNJsQSd1eOpVZYqLG/lzvQn7PA X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(376002)(346002)(39850400004)(136003)(396003)(46966005)(478600001)(82740400003)(356005)(86362001)(26005)(70586007)(2906002)(36906005)(186003)(33656002)(55016002)(53546011)(4326008)(47076004)(336012)(316002)(6506007)(9686003)(52536014)(70206006)(8936002)(966005)(110136005)(82310400003)(54906003)(5660300002)(7696005)(83380400001)(81166007)(21314003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2020 09:51:27.0672 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eebe9efc-05e9-4378-90ec-08d85edd12f5 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT049.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3491 Subject: Re: [dpdk-dev] [PATCH v3] app/testpmd: fix the default RSS key configuration 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 Lijun Ou > Sent: Thursday, September 10, 2020 9:51 AM > To: wenzhuo.lu@intel.com; beilei.xing@intel.com; > adrien.mazarguil@6wind.com; ferruh.yigit@intel.com > Cc: dev@dpdk.org; linuxarm@huawei.com > Subject: [dpdk-dev] [PATCH v3] app/testpmd: fix the default RSS key > configuration Hi Lijun, Please fix the coding style issues. "Must be a reply to the first patch (--in-reply-to)." >=20 > When a user runs a flow create cmd to configure an RSS rule > with specifying the empty rss actions in testpmd, this mean = ^^^ means > that the flow gets the default RSS functions from the valid > NIC default RSS hash key. However, the testpmd is not set = ^^^ is set xxx incorrectly =20 > the default RSS key incorrectly when RSS key is not specified > in flow create cmd.=20 Use the NIC valid default RSS key instead of the testpmd dummy RSS key in t= he flow configuration when the RSS key is not specified in the flow rule. I= f the NIC RSS key is invalid, it will use testpmd dummy RSS key as the defa= ult key. Is that good to put it in this way? Because I think it is not a bug, your p= atch offers an approach to update the default testpmd RSS key. I would also suggest making the commit message shorter and move the test re= sult into the cover letter. Because the checkepatch tool is not happy with the hex dumped below. http://mails.dpdk.org/archives/test-report/2020-September/151395.html Thanks, Phil > the cmdline as flows: > 1. first, startup testpmd: > testpmd> show port 0 rss-hash key > RSS functions: > all ipv4-frag ipv4-other ipv6-frag ipv6-other ip > RSS key: > 6D5A56DA255B0EC24167253D43A38FB0D0CA2BCBAE7B30B477CB2DA38030F > 20C6A42B73BBEAC01FA >=20 > 2. create a rss rule > testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end actions rss= \ > types ipv4-udp end queues end / end >=20 > 3. show rss-hash key > testpmd> show port 0 rss-hash key > RSS functions: > all ipv4-udp udp > RSS key: > 74657374706D6427732064656661756C74205253532068617368206B65792C206F > 76657272696465 >=20 > Now, it uses rte_eth_dev_rss_hash_conf_get to correctly the > default rss key. the cmdline and result as flows: > testpmd> show port 0 rss-hash key > RSS functions: > all ipv4-frag ipv4-other ipv6-frag ipv6-other ip > RSS key: > 6D5A56DA255B0EC24167253D43A38FB0D0CA2BCBAE7B30B477CB2DA38030F2 > 0C > 6A42B73BBEAC01FA > testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end actions rss= \ > types ipv4-udp end queues end / end > testpmd> show port 0 rss-hash key > RSS functions: > all ipv4-udp udp > RSS key: > 6D5A56DA255B0EC24167253D43A38FB0D0CA2BCBAE7B30B477CB2DA38030F > 20C6A42B73BBEAC01FA >=20 > Fixes: ac8d22de2394 ("ethdev: flatten RSS configuration in flow API") > Cc: stable@dpdk.org >=20 > Signed-off-by: Lijun Ou > --- > V2->V3: > -fix checkpatch warning. >=20 > V1->V2: > -fix the commit. > --- > app/test-pmd/cmdline_flow.c | 8 ++++++++ > 1 file changed, 8 insertions(+) >=20 > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > index 6263d30..e6648da 100644 > --- a/app/test-pmd/cmdline_flow.c > +++ b/app/test-pmd/cmdline_flow.c > @@ -4312,6 +4312,7 @@ parse_vc_action_rss(struct context *ctx, const > struct token *token, > 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_rss_conf rss_conf =3D {0}; > struct rte_eth_dev_info info; > int ret2; >=20 > @@ -4322,6 +4323,13 @@ parse_vc_action_rss(struct context *ctx, const > struct token *token, > action_rss_data->conf.key_len =3D > RTE_MIN(sizeof(action_rss_data->key), > info.hash_key_size); > + > + rss_conf.rss_key_len =3D sizeof(action_rss_data->key); > + rss_conf.rss_key =3D action_rss_data->key; > + ret2 =3D rte_eth_dev_rss_hash_conf_get(ctx->port, > &rss_conf); > + if (ret2 !=3D 0) > + return ret2; > + action_rss_data->conf.key =3D rss_conf.rss_key; > } > action->conf =3D &action_rss_data->conf; > return ret; > -- > 2.7.4