From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 31063A00C5 for ; Wed, 20 Jul 2022 10:23:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2C85440697; Wed, 20 Jul 2022 10:23:08 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2071.outbound.protection.outlook.com [40.107.243.71]) by mails.dpdk.org (Postfix) with ESMTP id A5E2A4003C for ; Wed, 20 Jul 2022 10:23:06 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Iv/MSGIss6fgFp6jUHCiipSgkdRiEkTXjIsLvFnwy7dnSPMH0wbT2FgokBG1VyjlQSFGcNgouDyRTJh1s5o/JbTJJIDvRa+Dk7D14WdmIF8kCI0egMa45COzjBLOzZ9HEYZLFyDfCBF7BvVOOnDpVsnXh53wQ5uthP0X290FvbHs6Q88nE1EWaecbGokhfH1cuOvgzRBowixKOOr/Lo6LZleuGKNKz6tQwArPpy+1pyxeUf+odLmgw8YFaizwj7NxrKMHvAZ4+UszJB/OJDOSfU8Ks+btrv8aLrWKBPfSrK9eBgPPFzY2McdDjKFMI2ZUMNMe6rNlB5PvpSNq/TA8w== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZnPI/d+ujks+n+BeN5cQO2QhXxp3KGEowtTThzxhW+0=; b=SgS5RJ8yN01BhaGDo8HkE3Xxqb6uW91AOWufLr73UU8lg5gKSGUQHWYWTdoVKslWqcAYcuEUP4mqwoPzDrmy4fZBZnudIMKb4kxB8CfWRUMjEoxcG8iO/s0QGvyUHbYQA2MnKNRtkM5dz7Gh+Ytzy3mmmfo9hGXlHkM46NL5RGdYNepiL54A3O/HH/1iNm+r8wLXcsiadsSClMppEH3uG7XqvjDXhJxAY4zPeC5lqw90GplffiZReoZ7pzZ9wFXYCBGPCv7umRCRK89aND0N4YnmZyLgC2sQvJX4rMaiYcy41TF1GSEOCDWxFNlgejcozcIR9qtdBZTg3xvUXadIvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZnPI/d+ujks+n+BeN5cQO2QhXxp3KGEowtTThzxhW+0=; b=RFlmItLo9difcZTf4AK8ElRYsCoPbGqKzF6IIZ41l1WsxygkcHbGYfd3SQ2a5gJ6gskMgzqX7mwrZUEiSINuFMuFhDTmkcHI2G+m69mRNR6pRB6jc4SmYKAj1tyASY+ddylilx1gdKOn/oTDdmwm14DhfxOyMK7Iox9I5xr83dk/1cm2w7LpFuE4Yt0XLg3dLZZ/bcm83HA3nbvFpIjkHrgrmz+kDW3VTMozEuVic3xloZ30HLdTkjo9jmma0bDHw8sySOqq7P8u4YFfNKrPc+T2uMbZ0AuTb4wDRUFPJuXRzMePJ9CSaCrmb6swxyGL23cEjfiNQm7rubHXugd/tQ== Received: from MW3PR05CA0029.namprd05.prod.outlook.com (2603:10b6:303:2b::34) by LV2PR12MB5822.namprd12.prod.outlook.com (2603:10b6:408:179::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.23; Wed, 20 Jul 2022 08:23:05 +0000 Received: from CO1NAM11FT027.eop-nam11.prod.protection.outlook.com (2603:10b6:303:2b:cafe::af) by MW3PR05CA0029.outlook.office365.com (2603:10b6:303:2b::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.16 via Frontend Transport; Wed, 20 Jul 2022 08:23:04 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.238) by CO1NAM11FT027.mail.protection.outlook.com (10.13.174.224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5458.17 via Frontend Transport; Wed, 20 Jul 2022 08:23:04 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Wed, 20 Jul 2022 08:23:04 +0000 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Wed, 20 Jul 2022 01:23:02 -0700 From: Xueming Li To: Huisong Li CC: , Dongdong Liu , dpdk stable Subject: patch 'test/bonding: fix RSS test when disable RSS' has been queued to stable release 20.11.6 Date: Wed, 20 Jul 2022 11:20:44 +0300 Message-ID: <20220720082132.3954126-15-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220720082132.3954126-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> <20220720082132.3954126-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f334eb72-b060-4180-524c-08da6a291195 X-MS-TrafficTypeDiagnostic: LV2PR12MB5822:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?lkvXDiCG22JcTYBpmN3KRurgBeF/rpLUNx81F57Xyi6H/Hh8oXCEn6zBNaTg?= =?us-ascii?Q?yLbVnPtjEc/xhulUHOPXA3YsHcBDaFu3SefdyeN2Vvozcps6Nt+bb7ehi4WG?= =?us-ascii?Q?0SzfgtD87ASJzY4mWvAvy0OHmPKgDNb8k4AzwHjDYj+TQVXc8BP7pgM7eIpm?= =?us-ascii?Q?Wah6oFri51shZ8FbbX39z7dOEZ94oXvBWVuKVpiJBCIGjTPOuYhmSI9ptfmp?= =?us-ascii?Q?v147n6sWRToWHvRMjt6C33cREKnZCmBnkq7FhTeQ7hwUDjMCBSF4vO8U2yo9?= =?us-ascii?Q?D3VPqlkCYQWidDzvuHEJ+Jr0ywgucuCHOEK7+Vm4RaTUaZieWOtx+OO8qdRP?= =?us-ascii?Q?RPPLxrCXqG++kRN0ZGfXQZ7NORExS92cVg1B+VnzJFZ9MnNti7KM2iQCLwUd?= =?us-ascii?Q?DnTj3m9Q/dhPAzb0TjRDj9P8Wf73R/9A6ayouMy+u0HSsJ7indRROUGN0+/N?= =?us-ascii?Q?TATaB51fnVhlqHx0jTHQzIwdrk1Hb5mSdzzpkfBUASswKsw64BSNHDiC+kvI?= =?us-ascii?Q?0KDj1ufGuX+GM+jm7y+mEwUKYUeoIypSmjN5sZYkRLXtLRHEr1qgeN26ZuYh?= =?us-ascii?Q?IzidGslaXGNUE578zYzKWLKbFzyjFrGL4Xt1kXI1DbU0n0zwBdWfkuqxW695?= =?us-ascii?Q?3U63z9JKujWPXuTRWwLiskSHMCzLGpsnVaN15dWvyQ9+A3qAMRot0cG0xVa9?= =?us-ascii?Q?pIJSFFzZGGpMqz7Fvj3dlqlKjJDUJ6Dv7LX4mKJeCKobbXMVtSYXpuzGh6VG?= =?us-ascii?Q?vBconX/HM3N8j/CG5P5OlYt3kaykimyK9BINqA/O6kUuDk9pvWiPA99jDLNy?= =?us-ascii?Q?H9LbRZynFGnKgeLArDiW7f9UTmdXmxcj/2czGegmpN36OBVnCLz6JTzuAB96?= =?us-ascii?Q?R+qXdfgVlMI9XvQ/nhWJ5WjYuSfZT6s/NSv12pWWZsAeVI27nXacTvI5QzaG?= =?us-ascii?Q?4MSVYYNm8AWo7Oz5HHuCtQ=3D=3D?= X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(396003)(136003)(39860400002)(346002)(376002)(46966006)(36840700001)(40470700004)(6666004)(41300700001)(186003)(966005)(7696005)(336012)(2616005)(1076003)(478600001)(26005)(16526019)(36860700001)(83380400001)(53546011)(356005)(47076005)(81166007)(82740400003)(426003)(6916009)(6286002)(8936002)(5660300002)(2906002)(82310400005)(316002)(36756003)(4326008)(55016003)(40480700001)(86362001)(8676002)(40460700003)(70586007)(54906003)(70206006)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2022 08:23:04.6454 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f334eb72-b060-4180-524c-08da6a291195 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5822 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 20.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/22/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/1adbdac76c2277546bedfb664a37d6e7e5339721 Thanks. Xueming Li --- >From 1adbdac76c2277546bedfb664a37d6e7e5339721 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Wed, 8 Jun 2022 19:45:48 +0800 Subject: [PATCH] test/bonding: fix RSS test when disable RSS Cc: Xueming Li [ upstream commit 6496922368fe03be9ab4137f2d615dba1a766f39 ] The "test_rss_lazy" test is used for testing bonding RSS functions when bonded port disable RSS. Currently, this test case can update RSS functions of bonded and slave port if bonded port turns off RSS. It is unreasonable and has been adjusted to be non-updateable in following patch: "93e1ea6dfa99 ethdev: fix RSS update when RSS is disabled" So this patch fixes this test code. Fixes: 43b630244e7e ("app/test: add dynamic bonding RSS configuration") Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- app/test/test_link_bonding_rssconf.c | 78 ++++++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 5 deletions(-) diff --git a/app/test/test_link_bonding_rssconf.c b/app/test/test_link_bonding_rssconf.c index 5dac60ca1e..514f09bf19 100644 --- a/app/test/test_link_bonding_rssconf.c +++ b/app/test/test_link_bonding_rssconf.c @@ -466,15 +466,85 @@ test_rss(void) TEST_ASSERT_SUCCESS(test_propagate(), "Propagation test failed"); - TEST_ASSERT(slave_remove_and_add() == 1, "New slave should be synced"); + TEST_ASSERT(slave_remove_and_add() == 1, "remove and add slaves success."); remove_slaves_and_stop_bonded_device(); return TEST_SUCCESS; } + +/** + * Test RSS configuration over bonded and slaves. + */ +static int +test_rss_config_lazy(void) +{ + struct rte_eth_rss_conf bond_rss_conf = {0}; + struct slave_conf *port; + uint8_t rss_key[40]; + uint64_t rss_hf; + int retval; + uint16_t i; + uint8_t n; + + retval = rte_eth_dev_info_get(test_params.bond_port_id, + &test_params.bond_dev_info); + TEST_ASSERT((retval == 0), "Error during getting device (port %u) info: %s\n", + test_params.bond_port_id, strerror(-retval)); + + rss_hf = test_params.bond_dev_info.flow_type_rss_offloads; + if (rss_hf != 0) { + bond_rss_conf.rss_key = NULL; + bond_rss_conf.rss_hf = rss_hf; + retval = rte_eth_dev_rss_hash_update(test_params.bond_port_id, + &bond_rss_conf); + TEST_ASSERT(retval != 0, "Succeeded in setting bonded port hash function"); + } + + /* Set all keys to zero for all slaves */ + FOR_EACH_PORT(n, port) { + port = &test_params.slave_ports[n]; + retval = rte_eth_dev_rss_hash_conf_get(port->port_id, + &port->rss_conf); + TEST_ASSERT_SUCCESS(retval, "Cannot get slaves RSS configuration"); + memset(port->rss_key, 0, sizeof(port->rss_key)); + port->rss_conf.rss_key = port->rss_key; + port->rss_conf.rss_key_len = sizeof(port->rss_key); + retval = rte_eth_dev_rss_hash_update(port->port_id, + &port->rss_conf); + TEST_ASSERT(retval != 0, "Succeeded in setting slaves RSS keys"); + } + + /* Set RSS keys for bonded port */ + memset(rss_key, 1, sizeof(rss_key)); + bond_rss_conf.rss_hf = rss_hf; + bond_rss_conf.rss_key = rss_key; + bond_rss_conf.rss_key_len = sizeof(rss_key); + + retval = rte_eth_dev_rss_hash_update(test_params.bond_port_id, + &bond_rss_conf); + TEST_ASSERT(retval != 0, "Succeeded in setting bonded port RSS keys"); + + /* Test RETA propagation */ + for (i = 0; i < RXTX_QUEUE_COUNT; i++) { + FOR_EACH_PORT(n, port) { + port = &test_params.slave_ports[n]; + retval = reta_set(port->port_id, (i + 1) % RXTX_QUEUE_COUNT, + port->dev_info.reta_size); + TEST_ASSERT(retval != 0, "Succeeded in setting slaves RETA"); + } + + retval = reta_set(test_params.bond_port_id, i % RXTX_QUEUE_COUNT, + test_params.bond_dev_info.reta_size); + TEST_ASSERT(retval != 0, "Succeeded in setting bonded port RETA"); + } + + return TEST_SUCCESS; +} + /** - * Test propagation logic, when RX_RSS mq_mode is turned off for bonding port + * Test RSS function logic, when RX_RSS mq_mode is turned off for bonding port */ static int test_rss_lazy(void) @@ -495,9 +565,7 @@ test_rss_lazy(void) TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params.bond_port_id), "Failed to start bonding port (%d).", test_params.bond_port_id); - TEST_ASSERT_SUCCESS(test_propagate(), "Propagation test failed"); - - TEST_ASSERT(slave_remove_and_add() == 0, "New slave shouldn't be synced"); + TEST_ASSERT_SUCCESS(test_rss_config_lazy(), "Succeeded in setting RSS hash when RX_RSS mq_mode is turned off"); remove_slaves_and_stop_bonded_device(); -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-20 15:00:59.472228269 +0800 +++ 0015-test-bonding-fix-RSS-test-when-disable-RSS.patch 2022-07-20 15:00:58.677667217 +0800 @@ -1 +1 @@ -From 6496922368fe03be9ab4137f2d615dba1a766f39 Mon Sep 17 00:00:00 2001 +From 1adbdac76c2277546bedfb664a37d6e7e5339721 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 6496922368fe03be9ab4137f2d615dba1a766f39 ] @@ -16 +18,0 @@ -Cc: stable@dpdk.org @@ -25 +27 @@ -index 7228965ced..b3d71c6f3a 100644 +index 5dac60ca1e..514f09bf19 100644 @@ -28 +30 @@ -@@ -468,15 +468,85 @@ test_rss(void) +@@ -466,15 +466,85 @@ test_rss(void) @@ -116 +118 @@ -@@ -497,9 +567,7 @@ test_rss_lazy(void) +@@ -495,9 +565,7 @@ test_rss_lazy(void)