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 4DD3DA0032 for ; Fri, 24 Jun 2022 17:02:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 498B24069D; Fri, 24 Jun 2022 17:02:37 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id DE3714069D for ; Fri, 24 Jun 2022 17:02:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656082955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=El+L4QVPeT8OJLzuKzk1RyLxJqto6AvXm8z100LjSCY=; b=NTzgHZHpCA5hGE1cBP5WKQZh3+geuR/UiYyl7XzWISv5q9QDY6r1DnV+D1LXlf5KcKDgYS arGdhO1RmhL46D7jYwKn6FmnYke8RlnYFGejqZOteFkH9GTNtCZZmsSBluUgH2mwpOrQjQ n8ZFIQQoJ62x8ccI2j7Y8jOMn/VPasI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-259-3FmDSiIQP_GMdEjrLrsxEw-1; Fri, 24 Jun 2022 11:02:32 -0400 X-MC-Unique: 3FmDSiIQP_GMdEjrLrsxEw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B87BC919942; Fri, 24 Jun 2022 15:02:31 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.194.217]) by smtp.corp.redhat.com (Postfix) with ESMTP id AEFAD9D63; Fri, 24 Jun 2022 15:02:30 +0000 (UTC) From: Kevin Traynor To: Huisong Li Cc: Dongdong Liu , dpdk stable Subject: patch 'test/bonding: fix RSS test when disable RSS' has been queued to stable release 21.11.2 Date: Fri, 24 Jun 2022 16:01:33 +0100 Message-Id: <20220624150148.1855580-25-ktraynor@redhat.com> In-Reply-To: <20220624150148.1855580-1-ktraynor@redhat.com> References: <20220624150148.1855580-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 21.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/27/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/8854374c9ed2eb371ba9e4816a89eaa19b369cb0 Thanks. Kevin --- >From 8854374c9ed2eb371ba9e4816a89eaa19b369cb0 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 7228965ced..b3d71c6f3a 100644 --- a/app/test/test_link_bonding_rssconf.c +++ b/app/test/test_link_bonding_rssconf.c @@ -469,5 +469,5 @@ 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(); @@ -476,6 +476,76 @@ test_rss(void) } + /** - * Test propagation logic, when RX_RSS mq_mode is turned off for bonding port + * 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 RSS function logic, when RX_RSS mq_mode is turned off for bonding port */ static int @@ -498,7 +568,5 @@ test_rss_lazy(void) "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.34.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-24 15:51:09.740055183 +0100 +++ 0030-test-bonding-fix-RSS-test-when-disable-RSS.patch 2022-06-24 15:51:08.900984160 +0100 @@ -1 +1 @@ -From 6496922368fe03be9ab4137f2d615dba1a766f39 Mon Sep 17 00:00:00 2001 +From 8854374c9ed2eb371ba9e4816a89eaa19b369cb0 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 6496922368fe03be9ab4137f2d615dba1a766f39 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org