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 39B76A0540 for ; Thu, 7 Jul 2022 09:58:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35AAD40A7B; Thu, 7 Jul 2022 09:58:36 +0200 (CEST) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 02EA740A7B for ; Thu, 7 Jul 2022 09:58:35 +0200 (CEST) Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id D14CE402B9 for ; Thu, 7 Jul 2022 07:58:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657180714; bh=jrXXptUf0Xza1HsPeFa0IOPkp1Wb3JiUO8PU8SOfseI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EpWslRHzlA99SusJp+L6GbJtE7lqAcBAMVmRN4PMxQxFSb5U/JQN7FSXoMYT359fg /lUODwkWG1bW7Utge3adZpzsaDlvEPfgwPtHRzUPLEj1fgLwPJH8d1Qs66TEqaS8Li wMVT8M0Lpw6LoFdm+ZQobGg4GqsdfKQxc0GIUIUewtBn+nsjjWXzlL93bT2nMRGiC4 QMlwRm+FYBgu/xuPgf0SWQ813VW1K89sp2WhR8ZU0czbZGjZHqEwzm7KFobtLNWlSE gQKOFzVa2StFiwspX+S0k/vDifKgOl6lGJo5E1kF0fAg0HunGwZH0Q8LuGD6ARyBnT PrxqQ9Bk2INlg== Received: by mail-ed1-f71.google.com with SMTP id w13-20020a05640234cd00b0043a991fb3f3so937104edc.3 for ; Thu, 07 Jul 2022 00:58:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jrXXptUf0Xza1HsPeFa0IOPkp1Wb3JiUO8PU8SOfseI=; b=ZsCjLk94dOvMJooNej8OLlISJ8C4UtiaH9z09u0DTeRqHPCrp1Vs1sJC5LT4Ly3iaz /hX7lwqooov5rh6j5AxTr8mY23WHBypgipXGVgkG+LsIi+jiuosK64/7X4qjgsTa/yCN k4i0WoMZjowzbQqrsM1R8GHJH76BX+fBdYw7A+4KJPGe+cVrFUC6h4COWiYoaWx0azio 6T5TixRHUQkxs49xxlHBWKx9D5qYl/MqEnfHBo+CtSqvLlfpWRc5AiwMVZQo+vrQMgfR XgyQ85it8DVDdeHyQxHA6tHgN87icHLc9skVGzBv2bFZTTQ9wIRuCA9FuYHrM1B/ZElR n0LA== X-Gm-Message-State: AJIora+r0rLFqp4Xj1ubEDjZpxrRPNdbyrsmxqS+B5/K6eKzxaDYdPtO ylJUxhqq5QBj5ytGxJ2BoUJmPo5aa4rbtAcKGjNqJtGiwYv6M3PYom18SpPVqjWeAu/7w6QgSeY o2RSufDPWsRJHl6obz+70FleD X-Received: by 2002:a17:906:6a25:b0:727:b02:4743 with SMTP id qw37-20020a1709066a2500b007270b024743mr41327305ejc.688.1657180713555; Thu, 07 Jul 2022 00:58:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1svfWXwlikPMX8SspzSAWAmTHEzcSbsbDQatWqAHqJnx9hgOeY2FLGTqCY3Eim1G18i1NtNmQ== X-Received: by 2002:a17:906:6a25:b0:727:b02:4743 with SMTP id qw37-20020a1709066a2500b007270b024743mr41327284ejc.688.1657180713330; Thu, 07 Jul 2022 00:58:33 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2a02:6d40:3a4f:7b00:c19b:938e:7c97:afe2]) by smtp.gmail.com with ESMTPSA id w2-20020a170906384200b00722f8d02928sm18667444ejc.174.2022.07.07.00.58.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 00:58:32 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Huisong Li Cc: Dongdong Liu , dpdk stable Subject: patch 'test/bonding: fix RSS test when disable RSS' has been queued to stable release 19.11.13 Date: Thu, 7 Jul 2022 09:54:57 +0200 Message-Id: <20220707075522.194223-62-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220707075522.194223-1-christian.ehrhardt@canonical.com> References: <20220707075522.194223-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 19.11.13 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/09/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/530bf55366b6aa2859154add679fd01955280d02 Thanks. Christian Ehrhardt --- >From 530bf55366b6aa2859154add679fd01955280d02 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 [ 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 1a9571e5c6..32391e7ad7 100644 --- a/app/test/test_link_bonding_rssconf.c +++ b/app/test/test_link_bonding_rssconf.c @@ -465,15 +465,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) @@ -494,9 +564,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.37.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-07 09:54:13.751841826 +0200 +++ 0062-test-bonding-fix-RSS-test-when-disable-RSS.patch 2022-07-07 09:54:10.969824641 +0200 @@ -1 +1 @@ -From 6496922368fe03be9ab4137f2d615dba1a766f39 Mon Sep 17 00:00:00 2001 +From 530bf55366b6aa2859154add679fd01955280d02 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 6496922368fe03be9ab4137f2d615dba1a766f39 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index 7228965ced..b3d71c6f3a 100644 +index 1a9571e5c6..32391e7ad7 100644 @@ -28 +29 @@ -@@ -468,15 +468,85 @@ test_rss(void) +@@ -465,15 +465,85 @@ test_rss(void) @@ -116 +117 @@ -@@ -497,9 +567,7 @@ test_rss_lazy(void) +@@ -494,9 +564,7 @@ test_rss_lazy(void)