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 A529241EA5 for ; Wed, 15 Mar 2023 23:48:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C22040A7A; Wed, 15 Mar 2023 23:48:13 +0100 (CET) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mails.dpdk.org (Postfix) with ESMTP id CA70440141 for ; Wed, 15 Mar 2023 23:48:09 +0100 (CET) Received: by mail-wr1-f53.google.com with SMTP id l1so18664044wry.12 for ; Wed, 15 Mar 2023 15:48:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678920489; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7bqH+FUGO6AxZ3/+Fz6EmLoNlFQLFAhrLOwQk2SrTqM=; b=X4ECFofB37y6hFcVnJc1IgTx0ucrI5W4fJmf/ZdnoVdVLHAhVlTxNH50RMfe4uRXpi jW8paYzY7SYf7azuRU2zsLOXmA2LmUj4bQY90gYDbZFbhFYRIuTVJ4FOIUrC1QDntfju J/oT1MIyROhyc3iKlysWdAgtz7rax08+Pb/qDwbbTZej1W37FlQyIvNmahE6TxPDlVFw OodfLOidbcCSq6113QXgzsR94UoWGA0iGMsT2FsfAYyHRmuDL/c3v8D6DlgQbOwrK1aJ 0FaCGyFbzhB+yvPob/LDH9HdDy1796w0Ib4kSH9esK+rgn8v2ZeTCYrWvsvEZBZ7a8Tx 0qAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678920489; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7bqH+FUGO6AxZ3/+Fz6EmLoNlFQLFAhrLOwQk2SrTqM=; b=7r5D1L0tt2e98oZjkVFYVieqOyuDMvKJgOL0bwFdU1vrYko7GYh12/01REGS50+CoW 81PL3r43CSwJyCNzFx3/aILG7M76f4xfm0NUu5SBo6PrEGGlxkRy6CkFJROSex5gmQl9 MhShdBxrlCg6cwWWkGMUWOtTrLfBHGPKSG1YzKBG5O/HJxwvC9EaAQQ/X2+EJ6D+Z3iV OwePkQsCL89MFXF9bIoYpmzF6EGF5mZCiaOR9y3QprjDpRXS304BqoBtUREAy2vHSqBC OCWF+/eE1owmXSr5MWjRZhbr3lJhuHoMO2yomDQz0cR0p5FQr2C8f/yGwXakwLZUw6bb EcFA== X-Gm-Message-State: AO0yUKUwOQEXz8AtkZ9dhGZTwUHu2avbLaf8d8nhJnJc7lAv0EZH96Zw IjJNgAYj8RuCSEBhP2RWH+1c/pTptZRWZQ== X-Google-Smtp-Source: AK7set+3NXbnPZ1lRuoE6ybU9hL2d+kE+ysAauAOe2WR8uiBp6TKcOz/eC+nYBX3cDhSv+obhFYgNg== X-Received: by 2002:adf:e64e:0:b0:2cf:6b4:3726 with SMTP id b14-20020adfe64e000000b002cf06b43726mr2946663wrn.67.1678920489474; Wed, 15 Mar 2023 15:48:09 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id h13-20020a056000000d00b002cfec8b7f89sm5184498wrx.77.2023.03.15.15.48.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 15:48:09 -0700 (PDT) From: luca.boccassi@gmail.com To: Huisong Li Cc: Dongdong Liu , dpdk stable Subject: patch 'net/hns3: save hash algo to RSS filter list node' has been queued to stable release 20.11.8 Date: Wed, 15 Mar 2023 22:46:26 +0000 Message-Id: <20230315224631.1025649-35-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315224631.1025649-1-luca.boccassi@gmail.com> References: <20230223093715.3926893-71-luca.boccassi@gmail.com> <20230315224631.1025649-1-luca.boccassi@gmail.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 20.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/17/23. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/49069daba240878ef2f9830fa55b6a91c8dbd7b1 Thanks. Luca Boccassi --- >From 49069daba240878ef2f9830fa55b6a91c8dbd7b1 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Fri, 10 Mar 2023 17:35:14 +0800 Subject: [PATCH] net/hns3: save hash algo to RSS filter list node [ upstream commit 9d34b8a181bf022fe3a3a3ae8511f3d921fc5c67 ] Save hash algo from rte flow RSS rule to RSS filter list node instead of struct hns3_rss_conf. Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_flow.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index 15f3172cbb..40a202db20 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1407,7 +1407,7 @@ hns3_disable_rss(struct hns3_hw *hw) } static int -hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function func, +hns3_parse_rss_algorithm(struct hns3_hw *hw, struct hns3_rss_conf *rss_conf, uint8_t *hash_algo) { const uint8_t hash_func_map[] = { @@ -1419,7 +1419,7 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function func, uint8_t key[HNS3_RSS_KEY_SIZE_MAX] = {0}; int ret; - if (func == RTE_ETH_HASH_FUNCTION_DEFAULT) { + if (rss_conf->conf.func == RTE_ETH_HASH_FUNCTION_DEFAULT) { ret = hns3_rss_get_algo_key(hw, hash_algo, key, hw->rss_key_size); if (ret != 0) { @@ -1434,20 +1434,21 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function func, * rte_flow_hash_algo) when this rule is delivered. */ if (__atomic_load_n((uint16_t *)&hw->reset.resetting, __ATOMIC_RELAXED) && - *hash_algo != hw->rss_info.rte_flow_hash_algo) - *hash_algo = hw->rss_info.rte_flow_hash_algo; + *hash_algo != rss_conf->rte_flow_hash_algo) + *hash_algo = rss_conf->rte_flow_hash_algo; return 0; } - *hash_algo = hash_func_map[func]; + *hash_algo = hash_func_map[rss_conf->conf.func]; return 0; } static int -hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) +hns3_hw_rss_hash_set(struct hns3_hw *hw, struct hns3_rss_conf *conf) { + struct rte_flow_action_rss *rss_config = &conf->conf; uint8_t rss_key[HNS3_RSS_KEY_SIZE_MAX] = {0}; bool use_default_key = false; uint64_t flow_types; @@ -1461,7 +1462,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) use_default_key = true; } - ret = hns3_parse_rss_algorithm(hw, rss_config->func, &hash_algo); + ret = hns3_parse_rss_algorithm(hw, conf, &hash_algo); if (ret) return ret; @@ -1470,7 +1471,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) hw->rss_key_size); if (ret) return ret; - hw->rss_info.rte_flow_hash_algo = hash_algo; + conf->rte_flow_hash_algo = hash_algo; /* Filter the unsupported flow types */ flow_types = rss_config->types ? @@ -1547,7 +1548,7 @@ hns3_config_rss_filter(struct hns3_hw *hw, struct hns3_rss_conf *conf) } /* Set hash algorithm and flow types by the user's config */ - return hns3_hw_rss_hash_set(hw, rss_act); + return hns3_hw_rss_hash_set(hw, conf); } static int -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-03-15 22:44:51.635473740 +0000 +++ 0035-net-hns3-save-hash-algo-to-RSS-filter-list-node.patch 2023-03-15 22:44:49.655851770 +0000 @@ -1 +1 @@ -From 9d34b8a181bf022fe3a3a3ae8511f3d921fc5c67 Mon Sep 17 00:00:00 2001 +From 49069daba240878ef2f9830fa55b6a91c8dbd7b1 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9d34b8a181bf022fe3a3a3ae8511f3d921fc5c67 ] + @@ -9,2 +10,0 @@ -Cc: stable@dpdk.org - @@ -18 +18 @@ -index 3700d073b1..527874df44 100644 +index 15f3172cbb..40a202db20 100644 @@ -21 +21 @@ -@@ -1439,7 +1439,7 @@ hns3_disable_rss(struct hns3_hw *hw) +@@ -1407,7 +1407,7 @@ hns3_disable_rss(struct hns3_hw *hw) @@ -30 +30 @@ -@@ -1451,7 +1451,7 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function func, +@@ -1419,7 +1419,7 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function func, @@ -39 +39 @@ -@@ -1466,20 +1466,21 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function func, +@@ -1434,20 +1434,21 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function func, @@ -42 +42 @@ - if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED) && + if (__atomic_load_n((uint16_t *)&hw->reset.resetting, __ATOMIC_RELAXED) && @@ -65 +65 @@ -@@ -1493,7 +1494,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) +@@ -1461,7 +1462,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) @@ -74 +74 @@ -@@ -1502,7 +1503,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) +@@ -1470,7 +1471,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) @@ -83 +83 @@ -@@ -1579,7 +1580,7 @@ hns3_config_rss_filter(struct hns3_hw *hw, struct hns3_rss_conf *conf) +@@ -1547,7 +1548,7 @@ hns3_config_rss_filter(struct hns3_hw *hw, struct hns3_rss_conf *conf)