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 DE9C8A04B5; Tue, 22 Sep 2020 17:44:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7C1F41DAF4; Tue, 22 Sep 2020 17:44:45 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2062.outbound.protection.outlook.com [40.107.20.62]) by dpdk.org (Postfix) with ESMTP id 620FB1D5AA for ; Tue, 22 Sep 2020 17:44:44 +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=xs3+RsbrrZ8Yx2/t/5HbZFahsffKqkD2CJkMAw0effM=; b=KjA3UBNRJBPp0IVrOMMMVW/3ukv/FVb28dOeEwtcCwyd3jDKI+DbY7G2eV9g4z7XDHVA0ZbCAI1MaK5SJBJA07wH+433Pvh3tgo3311LyKdqjDHT7H9Tc4lpQpS45vjWlY7cdcCmg6z0PM99Bs+i9qk/VPEXG2fZ6MrISAHU5j0= Received: from MR2P264CA0140.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:30::32) by DB7PR08MB3099.eurprd08.prod.outlook.com (2603:10a6:5:26::29) 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 15:44:42 +0000 Received: from VE1EUR03FT018.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:30:cafe::a8) by MR2P264CA0140.outlook.office365.com (2603:10a6:500:30::32) 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 15:44:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) 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 VE1EUR03FT018.mail.protection.outlook.com (10.152.18.135) 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 15:44:42 +0000 Received: ("Tessian outbound 7fc8f57bdedc:v64"); Tue, 22 Sep 2020 15:44:41 +0000 X-CR-MTA-TID: 64aa7808 Received: from 729bcebbd67d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0D6426E1-46AB-450C-B682-56EF571650A8.1; Tue, 22 Sep 2020 15:44:36 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 729bcebbd67d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 22 Sep 2020 15:44:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=af1ys2n9oiagFojjvNLyKcY7LI2xlRnmiVo2UfjKyEIj+Vvw8MTXS3YGG9HXhREC+9x8kI1wGf82vxPb8xrWWvrCkKLiBot4OYGOuibbRcOXVAzx4OzegVTGfJ8KYlTHtoDQUscK9e349G8B8ATzxQFFsx+whASLKoIODDbGl/GU2dHpOlZTm3SBWz3t6sdwsBr2elxmOhP5KNt/BnVFMvaShMvdwEBsw1fZut9iGwy1PCPp+Bc/dtyFJvFsTLusPZsAQevyI/oMJDPAKabPkg+8L+YAkjANXSJHWuUbc6+p9rvs+f9IZU4UfZTPIEmq5ChaZRfKA80GHEFDO9W20Q== 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=xs3+RsbrrZ8Yx2/t/5HbZFahsffKqkD2CJkMAw0effM=; b=YBVZgwbNYIOcy46vnhTdgAYjqtc7uKxYrGKXJYKm+L5c2kYemcCWV8xejQkNkQhQA4iTHJ477hRcdEPk2D8wkKcGmxxrGLKzZvSBqEifi782B8m86Kp1hdZIQgodo1e4GW/VGn31K2wA1OCr1QCRvSyVvf7Zok9N17ds7pW7SZnIP7qbEUt4ihzy99FVvEs8cojOC0+QLi8X72XxAmc4dOhw4zgr4BP7WLB7tFUg3umYSebO29wCQmpnYUFIj84Ux+ndjpshcDKOUaESsjw0bs7DUdfs+SzuKf7KLvzxi41153hHj+OXHq46WrcTmtjPE6Ssqe5EeCKO8VdK6WOmkA== 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=xs3+RsbrrZ8Yx2/t/5HbZFahsffKqkD2CJkMAw0effM=; b=KjA3UBNRJBPp0IVrOMMMVW/3ukv/FVb28dOeEwtcCwyd3jDKI+DbY7G2eV9g4z7XDHVA0ZbCAI1MaK5SJBJA07wH+433Pvh3tgo3311LyKdqjDHT7H9Tc4lpQpS45vjWlY7cdcCmg6z0PM99Bs+i9qk/VPEXG2fZ6MrISAHU5j0= Received: from DB7PR08MB3865.eurprd08.prod.outlook.com (2603:10a6:10:74::25) by DB7PR08MB3545.eurprd08.prod.outlook.com (2603:10a6:10:27::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.15; Tue, 22 Sep 2020 15:44:30 +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 15:44:30 +0000 From: Phil Yang To: oulijun , "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: AQHWkOdafn4ZG07Tt0anUQWjfKazNKl0wCOw Date: Tue, 22 Sep 2020 15:44:29 +0000 Message-ID: References: <1599702678-11142-1-git-send-email-oulijun@huawei.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: FEF7138908E47A479EC5618566C029D4.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: [114.85.108.161] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8a3d0e7a-1bc1-4ed9-d822-08d85f0e6c41 x-ms-traffictypediagnostic: DB7PR08MB3545:|DB7PR08MB3099: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:8882;OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: MFIiMchn5z5S7qDlfQtcqpTNbyRf12x4mbO+l/rwQw1vXMdVc+LyYE3995rnkiCItAwAtJ8NVfsiamDzOjF9ft8t9XSMWkaTvI0ITDotPL4ojnasEsYb8uwNhwTbmGfJVtYmUTipS3SmKOOW8Lgb+qIbeB+xL1SmoKCobtqRHD8jPn81FoiphUFhRJC94SyFSqLBKsFzjGU/79ZcRVCpiBFHUDAUqsP4DptcrJ+DbrZ+6PpCQdcxsT8b+qmZTDPaTi3mnwS+v7toRqgFlE3K7fHFDjoZanuH24iW8upSGcLY3McqndQDuqZEsYeNsfRNIjwzdWdD41XEyv8KY49eh7Gw05Gm4oowH9+06pgOuItxdpjdNUnG7De1TUz5Xi+tZe9rRy/hZcPSjfLXKvRX5BtZGuwFwnFzGldyrOdD0cgRTgOjWNfaAs6V7kUzmWUwUeIYY3O3hPO67L2abKqRBA== 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)(136003)(346002)(376002)(396003)(39860400002)(366004)(83380400001)(478600001)(110136005)(8936002)(7696005)(71200400001)(5660300002)(54906003)(8676002)(26005)(6506007)(55016002)(186003)(64756008)(66946007)(66556008)(66476007)(4326008)(33656002)(52536014)(2906002)(66446008)(9686003)(316002)(966005)(76116006)(86362001)(21314003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: GJE/geHJtJDMOeB+043NpgFOFXN43jn5cAhvvNi/T09TosG1J+UuzenTEIO1Yw55DABYOW25xzOHl5PcW/8nR/X0jXI2uSwfLgBeMt8nzl3YUDpm7d16kE9r0XTvRSo8EtI8WtwSPK2XOmir5BT02zTtyn8tbCIatjKmCekSM3uM5qWwRcVQe3CM5MaQzn4KCdYKkh8x3vFfBuR/HpYgOEndCi2rED0zv+E62dIWMpjU6V6nbd3NINiHCHgrEht7u+wottOLY56vW508VlBfyg+OCS/pVrjTcPR1bsMHJ6ICeAgmkT8nqcZGsB4+sW+eftSJ4u8Lip/tYbtEDUA/5y30no4vxNdCIoeumBzn9L8PG+0p1Va4x+nHA37V1OfbrgndKYgq80pY1lXFctTghwWOwe5TAEOzHypG945Mw9FNkXA0+CW8hX/2HKvs8ciCCvJardM4RAndQcYhxgs10khKSdTvbxvmaTaE6PcSxjUveE9zs+82i8iFgHWxs+GzAr4jGcEMwtw1rYE5xpsUTuRZqK2ipA/L+sB81UlEoiz4ZlAO14MqxcWsdhDChfFITmAHGs+JlD5l0k4oKlj1JhUAar212y66T990NUwtfWBAV09RE2U/aDcG3zKKaW7mCZ0WljniixlinMqDVlNQqw== 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: DB7PR08MB3545 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: VE1EUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 00845fe3-cbda-484f-1e58-08d85f0e64f9 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0F78k2NR7DQo65OWiLxxuJ/fj00lnRB1/nLeTRUkpKTbooaJ3KcoX0SUXGBKhxff0wsmYvPh0+NqupmcXdr97WRCpl/0tase1563imUQIQpN3paRD3yW/MbX/2Nbhc/0DAjEUOXpzwnaNUZYj+nXQu9wlcOAPrdV6fr/abl+W/5P7uQmcb3CUrnXVgXvr0mAc4UwLH720zqFBHMZBzV3EvK2UW5TiuuV+VOcjUUDxSWzMuhR34m31aUJo4cRmXvIao3CA6SI9RZ0OdezsN+AMzoWCRZwBLjJRMrOO993Dt1aeeiucrgJXPDaSIuxn3YpKBzQM93X3ive2iI0ZtUdSEsTnuNjQPZxTV+OKMy0HZ0/tUCJMGC4ulSI2B+bDh+Dnxv/jOyms3P68ppWmCNuMMw8UsQ9V1Y238qOwqyJCpOojKaWLUjnIjdP/lBZh8cuOqT4CgWzzeIjH+NhgxecNXd7sBBVQ2XJSKo9Wk9aDtFyeF1QTbdcT2Qp9haDftYO 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)(396003)(39850400004)(346002)(136003)(376002)(46966005)(478600001)(36906005)(966005)(8936002)(26005)(7696005)(4326008)(110136005)(316002)(356005)(83380400001)(86362001)(186003)(8676002)(336012)(6506007)(82310400003)(81166007)(54906003)(5660300002)(70586007)(2906002)(70206006)(47076004)(52536014)(33656002)(9686003)(82740400003)(55016002)(21314003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2020 15:44:42.2301 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8a3d0e7a-1bc1-4ed9-d822-08d85f0e6c41 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: VE1EUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3099 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" dev On Behalf Of Lijun Ou writes: > >> 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)." > > > > > >> > >> 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 > >> the default RSS key incorrectly when RSS key is not specified > >> in flow create cmd. > > > > Use the NIC valid default RSS key instead of the testpmd dummy RSS key = in > the flow configuration when the RSS key is not specified in the flow rule= . If > 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, yo= ur patch > offers an approach to update the default testpmd RSS key. > > > Do you have any better advice? or don't use my approach? I think the No, I think you misunderstood me. I agree with your proposal and your patch= looks good to me. My suggestion is to reword the commit message to highlight that you mare ma= king testpmd use the valid NIC RSS key as the default flow RSS key in this = patch.=20 In my perspective, if you don't specify any RSS key in your flow rule, it s= hould allow any available RSS key work as the default key.=20 So use a dummy RSS key is correct as well. > previous methods are easy to misunderstand.Can we use the NUL KEY > solution and fix the problem that the length is 0 and the RSS key is not > NULL ? >=20 > Thanks > Lijun Ou > > I would also suggest making the commit message shorter and move the > test result 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 > >> > >> 2. create a rss rule > >> testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end actions = rss \ > >> types ipv4-udp end queues end / end > >> > >> 3. show rss-hash key > >> testpmd> show port 0 rss-hash key > >> RSS functions: > >> all ipv4-udp udp > >> RSS key: > >> > 74657374706D6427732064656661756C74205253532068617368206B65792C206F > >> 76657272696465 > >> > >> 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 > >> > >> Fixes: ac8d22de2394 ("ethdev: flatten RSS configuration in flow API") > >> Cc: stable@dpdk.org > >> > >> Signed-off-by: Lijun Ou > >> --- > >> V2->V3: > >> -fix checkpatch warning. > >> > >> V1->V2: > >> -fix the commit. > >> --- > >> app/test-pmd/cmdline_flow.c | 8 ++++++++ > >> 1 file changed, 8 insertions(+) > >> > >> 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; > >> > >> @@ -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 > > > > . > >