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 57FB341EA5 for ; Wed, 15 Mar 2023 23:47:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 530DC410DD; Wed, 15 Mar 2023 23:47:53 +0100 (CET) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mails.dpdk.org (Postfix) with ESMTP id 8FCDC40EE4 for ; Wed, 15 Mar 2023 23:47:51 +0100 (CET) Received: by mail-wr1-f50.google.com with SMTP id m2so5911831wrh.6 for ; Wed, 15 Mar 2023 15:47:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678920471; 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=DsP9EcDJuJ/5/vCbhFFJ7Ci/Mz2JCqs4nto89UL3Onw=; b=SOQWMOcypScitq+1bii8IZ4czgnxp37cqIPuRR5ITmHNSZK2/GK1LIZNlIxztf6Iag mOhp5BPdw65sdqTr/RTns8FTSxTQZYdActG3MFIv6+I8butpRgOUdyWtrqUX12Gz9wAU Y9Ey4TzGkTFseemQF+YR3eFbdA8eIUdQ35OY9k+TFvgiMegpDaiopj8MDW7F2elxbskY VAXcleHznsJNXSmeYwM4GOe6A7OXaXzG3incatFnSK0zEoy+93dtb82slXxLWDOxP/8F 8DcdEbVl6MhrIr81+BV+aeGcjcutxprmvvxjGu3Rjs61QbjgEuSTH5qIdwT/qPIMEOgl 6gmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678920471; 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=DsP9EcDJuJ/5/vCbhFFJ7Ci/Mz2JCqs4nto89UL3Onw=; b=dJw9cKY8J/Czel2CLOF0W7UdCwxvt4h2WrxhiP69SDRZ5uy4bYp3wxg2nfcvu2n0DW mNe6Iv86ajD3q3oqSn9XEllMKovPGZqKLuJfky0Y5eLs4R+x42KgA6xPH3z9y9WO4+/Y hPODjd7FYR8LtYP1YeXDRAplJ6bSp3AWS6HuK9kroPJoyI4BuMPbqQnjEiI/hZJIt0bz iuRXMxxjbQnk4hQdV3lv4z/PQrvKYLjkcCdR92htg6GO3MGXkMeA2SitAF9TyO+M6xGu F1UT8XmZ6LEl9FIROnakOIaS2Vmtr0sUsTM6yZRXmW4nlAfMl5aHcLlAkIR39oWhlAqK cEug== X-Gm-Message-State: AO0yUKXfPdkSEcBMohXX8kzyi3Hxg5E5q3X1ZxVD0+s/c5ZLt9b1RjU6 J/rhAVK3Ft/4C6eelv6ss6qdRJ89ac/vFA== X-Google-Smtp-Source: AK7set/0yflinvrQ/GGqkPmq0Mj7/ZGCImZquvjTsUNRsFRjimJUZ50MK0qgcLbtxyNmWnF5rnPwRQ== X-Received: by 2002:a5d:4c8f:0:b0:2c7:d7ca:4c89 with SMTP id z15-20020a5d4c8f000000b002c7d7ca4c89mr2965745wrs.58.1678920471242; Wed, 15 Mar 2023 15:47:51 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id u18-20020a5d4352000000b002d1daafea30sm393042wrr.34.2023.03.15.15.47.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 15:47:50 -0700 (PDT) From: luca.boccassi@gmail.com To: Huisong Li Cc: Dongdong Liu , dpdk stable Subject: patch 'net/hns3: use hardware config to report hash types' has been queued to stable release 20.11.8 Date: Wed, 15 Mar 2023 22:46:18 +0000 Message-Id: <20230315224631.1025649-27-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/3aa8f6400b61ed6a210fb32ce7948b9f7893f8be Thanks. Luca Boccassi --- >From 3aa8f6400b61ed6a210fb32ce7948b9f7893f8be Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Fri, 10 Mar 2023 17:35:06 +0800 Subject: [PATCH] net/hns3: use hardware config to report hash types [ upstream commit 406b25c7ffd2d84b1e09665872f69755c75e7d89 ] Use the configuration in hardware to report hash types instead of data maintained in software. Fixes: c37ca66f2b27 ("net/hns3: support RSS") Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_rss.c | 260 ++++++++++++++++++++++++++++-------- drivers/net/hns3/hns3_rss.h | 1 + 2 files changed, 208 insertions(+), 53 deletions(-) diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c index e624df073e..7c2b4bcd1f 100644 --- a/drivers/net/hns3/hns3_rss.c +++ b/drivers/net/hns3/hns3_rss.c @@ -70,6 +70,17 @@ enum hns3_tuple_field { HNS3_RSS_FIELD_IPV6_FRAG_IP_S }; +#define HNS3_RSS_TUPLE_IPV4_TCP_M GENMASK(3, 0) +#define HNS3_RSS_TUPLE_IPV4_UDP_M GENMASK(11, 8) +#define HNS3_RSS_TUPLE_IPV4_SCTP_M GENMASK(20, 16) +#define HNS3_RSS_TUPLE_IPV4_NONF_M GENMASK(25, 24) +#define HNS3_RSS_TUPLE_IPV4_FLAG_M GENMASK(27, 26) +#define HNS3_RSS_TUPLE_IPV6_TCP_M GENMASK(35, 32) +#define HNS3_RSS_TUPLE_IPV6_UDP_M GENMASK(43, 40) +#define HNS3_RSS_TUPLE_IPV6_SCTP_M GENMASK(52, 48) +#define HNS3_RSS_TUPLE_IPV6_NONF_M GENMASK(57, 56) +#define HNS3_RSS_TUPLE_IPV6_FLAG_M GENMASK(59, 58) + enum hns3_rss_tuple_type { HNS3_RSS_IP_TUPLE, HNS3_RSS_IP_L4_TUPLE, @@ -79,200 +90,249 @@ static const struct { uint64_t rss_types; uint16_t tuple_type; uint64_t rss_field; + uint64_t tuple_mask; } hns3_set_tuple_table[] = { /* IPV4-FRAG */ { ETH_RSS_FRAG_IPV4 | ETH_RSS_L3_SRC_ONLY, HNS3_RSS_IP_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_FRAG_IP_S) }, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_FRAG_IP_S), + HNS3_RSS_TUPLE_IPV4_FLAG_M }, { ETH_RSS_FRAG_IPV4 | ETH_RSS_L3_DST_ONLY, HNS3_RSS_IP_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_FRAG_IP_D) }, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_FRAG_IP_D), + HNS3_RSS_TUPLE_IPV4_FLAG_M }, { ETH_RSS_FRAG_IPV4, HNS3_RSS_IP_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_FRAG_IP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_FRAG_IP_D) }, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_FRAG_IP_D), + HNS3_RSS_TUPLE_IPV4_FLAG_M }, /* IPV4 */ { ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY, HNS3_RSS_IP_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) }, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S), + HNS3_RSS_TUPLE_IPV4_NONF_M }, { ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY, HNS3_RSS_IP_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) }, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D), + HNS3_RSS_TUPLE_IPV4_NONF_M }, { ETH_RSS_IPV4, HNS3_RSS_IP_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) }, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D), + HNS3_RSS_TUPLE_IPV4_NONF_M }, /* IPV4-OTHER */ { ETH_RSS_NONFRAG_IPV4_OTHER | ETH_RSS_L3_SRC_ONLY, HNS3_RSS_IP_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) }, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S), + HNS3_RSS_TUPLE_IPV4_NONF_M }, { ETH_RSS_NONFRAG_IPV4_OTHER | ETH_RSS_L3_DST_ONLY, HNS3_RSS_IP_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) }, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D), + HNS3_RSS_TUPLE_IPV4_NONF_M }, { ETH_RSS_NONFRAG_IPV4_OTHER, HNS3_RSS_IP_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) }, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D), + HNS3_RSS_TUPLE_IPV4_NONF_M }, /* IPV4-TCP */ { ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY, HNS3_RSS_IP_L4_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_IP_S) }, + BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_IP_S), + HNS3_RSS_TUPLE_IPV4_TCP_M }, { ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY, HNS3_RSS_IP_L4_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_IP_D) }, + BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_IP_D), + HNS3_RSS_TUPLE_IPV4_TCP_M }, { ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_SRC_ONLY, HNS3_RSS_IP_L4_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_TCP_S) }, + BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_TCP_S), + HNS3_RSS_TUPLE_IPV4_TCP_M }, { ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_DST_ONLY, HNS3_RSS_IP_L4_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_TCP_D) }, + BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_TCP_D), + HNS3_RSS_TUPLE_IPV4_TCP_M }, { ETH_RSS_NONFRAG_IPV4_TCP, HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_IP_S) | BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_IP_D) | BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_TCP_S) | - BIT_ULL(HNS3_RSS_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T_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_VER) }, + BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_VER), + HNS3_RSS_TUPLE_IPV4_SCTP_M }, /* IPV6-FRAG */ { ETH_RSS_FRAG_IPV6 | ETH_RSS_L3_SRC_ONLY, HNS3_RSS_IP_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV6_FRAG_IP_S) }, + BIT_ULL(HNS3_RSS_FIELD_IPV6_FRAG_IP_S), + HNS3_RSS_TUPLE_IPV6_FLAG_M }, { ETH_RSS_FRAG_IPV6 | ETH_RSS_L3_DST_ONLY, HNS3_RSS_IP_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV6_FRAG_IP_D) }, + BIT_ULL(HNS3_RSS_FIELD_IPV6_FRAG_IP_D), + HNS3_RSS_TUPLE_IPV6_FLAG_M }, { ETH_RSS_FRAG_IPV6, HNS3_RSS_IP_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV6_FRAG_IP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV6_FRAG_IP_D) }, + BIT_ULL(HNS3_RSS_FIELD_IPV6_FRAG_IP_D), + HNS3_RSS_TUPLE_IPV6_FLAG_M }, /* IPV6 */ { ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY, HNS3_RSS_IP_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) }, + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S), + HNS3_RSS_TUPLE_IPV6_NONF_M }, { ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY, HNS3_RSS_IP_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) }, + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D), + HNS3_RSS_TUPLE_IPV6_NONF_M }, { ETH_RSS_IPV6, HNS3_RSS_IP_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) }, + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D), + HNS3_RSS_TUPLE_IPV6_NONF_M }, /* IPV6-OTHER */ { ETH_RSS_NONFRAG_IPV6_OTHER | ETH_RSS_L3_SRC_ONLY, HNS3_RSS_IP_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) }, + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S), + HNS3_RSS_TUPLE_IPV6_NONF_M }, { ETH_RSS_NONFRAG_IPV6_OTHER | ETH_RSS_L3_DST_ONLY, HNS3_RSS_IP_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) }, + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D), + HNS3_RSS_TUPLE_IPV6_NONF_M }, { ETH_RSS_NONFRAG_IPV6_OTHER, HNS3_RSS_IP_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) }, + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D), + HNS3_RSS_TUPLE_IPV6_NONF_M }, /* IPV6-TCP */ { ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY, HNS3_RSS_IP_L4_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV6_TCP_EN_IP_S) }, + BIT_ULL(HNS3_RSS_FIELD_IPV6_TCP_EN_IP_S), + HNS3_RSS_TUPLE_IPV6_TCP_M }, { ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_DST_ONLY, HNS3_RSS_IP_L4_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV6_TCP_EN_IP_D) }, + BIT_ULL(HNS3_RSS_FIELD_IPV6_TCP_EN_IP_D), + HN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_SCTP | ETH_RSS_L4_SRC_ONLY, HNS3_RSS_IP_L4_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S) }, + BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S), + HNS3_RSS_TUPLE_IPV6_SCTP_M }, { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_DST_ONLY, HNS3_RSS_IP_L4_TUPLE, - BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_D) }, + BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_D), + HNS3_RSS_TUPLE_IPV6_SCTP_M }, { ETH_RSS_NONFRAG_IPV6_SCTP, HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S) | BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_D) | BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_D) | BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER) }, + BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER), + HNS3_RSS_TUPLE_IPV6_SCTP_M }, }; /* @@ -576,6 +636,96 @@ set_tuple_fail: return ret; } +int +hns3_get_rss_tuple_field(struct hns3_hw *hw, uint64_t *tuple_fields) +{ + struct hns3_rss_input_tuple_cmd *req; + struct hns3_cmd_desc desc; + int ret; + + hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RSS_INPUT_TUPLE, true); + req = (struct hns3_rss_input_tuple_cmd *)desc.data; + ret = hns3_cmd_send(hw, &desc, 1); + if (ret != 0) { + hns3_err(hw, "fail to get RSS hash tuple fields from firmware, ret = %d", + ret); + return ret; + } + + *tuple_fields = rte_le_to_cpu_64(req->tuple_field); + + return 0; +} + +static uint64_t +hns3_rss_tuple_fields_to_rss_hf(struct hns3_hw *hw, uint64_t tuple_fields) +{ + uint64_t ipv6_sctp_l4_mask = + BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_D) | + BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S); + uint64_t rss_hf = 0; + uint64_t tuple_mask; + uint32_t i; + + for (i = 0; i < RTE_DIM(hns3_set_tuple_table); i++) { + tuple_mask = hns3_set_tuple_table[i].tuple_mask; + /* + * The RSS hash of the packet type is disabled if its tuples is + * zero. + */ + if ((tuple_fields & tuple_mask) == 0) + continue; + + /* + * Some hardware don't support to use src/dst port fields to + * hash for IPV6-SCTP packet. + */ + if ((hns3_set_tuple_table[i].rss_types & + ETH_RSS_NONFRAG_IPV6_SCTP) && + !hw->rss_info.ipv6_sctp_offload_supported) + tuple_mask &= ~ipv6_sctp_l4_mask; + + /* + * The framework (ethdev ops) or driver (rte flow API) ensure + * that both L3_SRC/DST_ONLY and L4_SRC/DST_ONLY cannot be set + * to driver at the same time. But if user doesn't specify + * anything L3/L4_SRC/DST_ONLY, driver enables all tuple fields. + * In this case, driver should not report L3/L4_SRC/DST_ONLY. + */ + if ((tuple_fields & tuple_mask) == tuple_mask) { + /* Skip the item enabled part tuples. */ + if ((tuple_fields & hns3_set_tuple_table[i].rss_field) != + tuple_mask) + continue; + + rss_hf |= hns3_set_tuple_table[i].rss_types; + continue; + } + + /* Match the item enabled part tuples.*/ + if ((tuple_fields & hns3_set_tuple_table[i].rss_field) == + hns3_set_tuple_table[i].rss_field) + rss_hf |= hns3_set_tuple_table[i].rss_types; + } + + return rss_hf; +} + +static int +hns3_rss_hash_get_rss_hf(struct hns3_hw *hw, uint64_t *rss_hf) +{ + uint64_t tuple_fields; + int ret; + + ret = hns3_get_rss_tuple_field(hw, &tuple_fields); + if (ret != 0) + return ret; + + *rss_hf = hns3_rss_tuple_fields_to_rss_hf(hw, tuple_fields); + + return 0; +} + /* * Get rss key and rss_hf types set of RSS hash configuration. * @param dev @@ -591,28 +741,32 @@ hns3_dev_rss_hash_conf_get(struct rte_eth_dev *dev, { struct hns3_adapter *hns = dev->data->dev_private; struct hns3_hw *hw = &hns->hw; - struct hns3_rss_conf *rss_cfg = &hw->rss_info; uint8_t hash_algo; int ret; rte_spinlock_lock(&hw->lock); - rss_conf->rss_hf = rss_cfg->conf.types; + ret = hns3_rss_hash_get_rss_hf(hw, &rss_conf->rss_hf); + if (ret != 0) { + hns3_err(hw, "obtain hash tuples failed, ret = %d", ret); + goto out; + } /* Get the RSS Key required by the user */ if (rss_conf->rss_key && rss_conf->rss_key_len >= hw->rss_key_size) { ret = hns3_rss_get_algo_key(hw, &hash_algo, rss_conf->rss_key, hw->rss_key_size); if (ret != 0) { - rte_spinlock_unlock(&hw->lock); hns3_err(hw, "obtain hash algo and key failed, ret = %d", ret); - return ret; + goto out; } rss_conf->rss_key_len = hw->rss_key_size; } + +out: rte_spinlock_unlock(&hw->lock); - return 0; + return ret; } /* diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h index 5af3005653..b724490fe2 100644 --- a/drivers/net/hns3/hns3_rss.h +++ b/drivers/net/hns3/hns3_rss.h @@ -114,6 +114,7 @@ int hns3_rss_reset_indir_table(struct hns3_hw *hw); int hns3_config_rss(struct hns3_adapter *hns); void hns3_rss_uninit(struct hns3_adapter *hns); int hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf); +int hns3_get_rss_tuple_field(struct hns3_hw *hw, uint64_t *tuple_fields); int hns3_set_rss_algo_key(struct hns3_hw *hw, uint8_t hash_algo, const uint8_t *key, uint8_t key_len); int hns3_restore_filter(struct hns3_adapter *hns); -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-03-15 22:44:51.190290473 +0000 +++ 0027-net-hns3-use-hardware-config-to-report-hash-types.patch 2023-03-15 22:44:49.623851099 +0000 @@ -1 +1 @@ -From 406b25c7ffd2d84b1e09665872f69755c75e7d89 Mon Sep 17 00:00:00 2001 +From 3aa8f6400b61ed6a210fb32ce7948b9f7893f8be Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 406b25c7ffd2d84b1e09665872f69755c75e7d89 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index a8ea5150ab..9addc00a67 100644 +index e624df073e..7c2b4bcd1f 100644 @@ -48 +49 @@ - { RTE_ETH_RSS_FRAG_IPV4 | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_FRAG_IPV4 | ETH_RSS_L3_SRC_ONLY, @@ -53 +54 @@ - { RTE_ETH_RSS_FRAG_IPV4 | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_FRAG_IPV4 | ETH_RSS_L3_DST_ONLY, @@ -58 +59 @@ - { RTE_ETH_RSS_FRAG_IPV4, + { ETH_RSS_FRAG_IPV4, @@ -66 +67 @@ - { RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY, @@ -71 +72 @@ - { RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY, @@ -76 +77 @@ - { RTE_ETH_RSS_IPV4, + { ETH_RSS_IPV4, @@ -84 +85 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_OTHER | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV4_OTHER | ETH_RSS_L3_SRC_ONLY, @@ -89 +90 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_OTHER | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_NONFRAG_IPV4_OTHER | ETH_RSS_L3_DST_ONLY, @@ -94 +95 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_OTHER, + { ETH_RSS_NONFRAG_IPV4_OTHER, @@ -102 +103 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_TCP | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY, @@ -107 +108 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_TCP | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY, @@ -112 +113 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_TCP | RTE_ETH_RSS_L4_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_SRC_ONLY, @@ -117 +118 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_TCP | RTE_ETH_RSS_L4_DST_ONLY, + { ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_DST_ONLY, @@ -122 +123 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_TCP, + { ETH_RSS_NONFRAG_IPV4_TCP, @@ -132 +133 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_UDP | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY, @@ -137 +138 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_UDP | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY, @@ -142 +143 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_UDP | RTE_ETH_RSS_L4_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L4_SRC_ONLY, @@ -147 +148 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_UDP | RTE_ETH_RSS_L4_DST_ONLY, + { ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L4_DST_ONLY, @@ -152 +153 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_UDP, + { ETH_RSS_NONFRAG_IPV4_UDP, @@ -162 +163 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_SCTP | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_SRC_ONLY, @@ -167 +168 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_SCTP | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_DST_ONLY, @@ -172 +173 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_SCTP | RTE_ETH_RSS_L4_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L4_SRC_ONLY, @@ -177 +178 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_SCTP | RTE_ETH_RSS_L4_DST_ONLY, + { ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L4_DST_ONLY, @@ -182 +183 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_SCTP, + { ETH_RSS_NONFRAG_IPV4_SCTP, @@ -193 +194 @@ - { RTE_ETH_RSS_FRAG_IPV6 | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_FRAG_IPV6 | ETH_RSS_L3_SRC_ONLY, @@ -198 +199 @@ - { RTE_ETH_RSS_FRAG_IPV6 | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_FRAG_IPV6 | ETH_RSS_L3_DST_ONLY, @@ -203 +204 @@ - { RTE_ETH_RSS_FRAG_IPV6, + { ETH_RSS_FRAG_IPV6, @@ -211 +212 @@ - { RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY, @@ -216 +217 @@ - { RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY, @@ -221 +222 @@ - { RTE_ETH_RSS_IPV6, + { ETH_RSS_IPV6, @@ -229 +230 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_OTHER | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV6_OTHER | ETH_RSS_L3_SRC_ONLY, @@ -234 +235 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_OTHER | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_NONFRAG_IPV6_OTHER | ETH_RSS_L3_DST_ONLY, @@ -239 +240 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_OTHER, + { ETH_RSS_NONFRAG_IPV6_OTHER, @@ -247 +248 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_TCP | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY, @@ -252 +253 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_TCP | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_DST_ONLY, @@ -257 +258 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_TCP | RTE_ETH_RSS_L4_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L4_SRC_ONLY, @@ -262 +263 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_TCP | RTE_ETH_RSS_L4_DST_ONLY, + { ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L4_DST_ONLY, @@ -267 +268 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_TCP, + { ETH_RSS_NONFRAG_IPV6_TCP, @@ -277 +278 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_UDP | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY, @@ -282 +283 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_UDP | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_DST_ONLY, @@ -287 +288 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_UDP | RTE_ETH_RSS_L4_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L4_SRC_ONLY, @@ -292 +293 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_UDP | RTE_ETH_RSS_L4_DST_ONLY, + { ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L4_DST_ONLY, @@ -297 +298 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_UDP, + { ETH_RSS_NONFRAG_IPV6_UDP, @@ -307 +308 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_SCTP | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY, @@ -312 +313 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_SCTP | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_DST_ONLY, @@ -317 +318 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_SCTP | RTE_ETH_RSS_L4_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_SRC_ONLY, @@ -322 +323 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_SCTP | RTE_ETH_RSS_L4_DST_ONLY, + { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_DST_ONLY, @@ -327 +328 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_SCTP, + { ETH_RSS_NONFRAG_IPV6_SCTP, @@ -388 +389 @@ -+ RTE_ETH_RSS_NONFRAG_IPV6_SCTP) && ++ ETH_RSS_NONFRAG_IPV6_SCTP) && @@ -475 +476 @@ -index be0141f602..17473e70e2 100644 +index 5af3005653..b724490fe2 100644 @@ -478 +479 @@ -@@ -110,6 +110,7 @@ int hns3_rss_reset_indir_table(struct hns3_hw *hw); +@@ -114,6 +114,7 @@ int hns3_rss_reset_indir_table(struct hns3_hw *hw); @@ -483 +484 @@ - int hns3_rss_set_algo_key(struct hns3_hw *hw, uint8_t hash_algo, + int hns3_set_rss_algo_key(struct hns3_hw *hw, uint8_t hash_algo, @@ -485 +486 @@ - int hns3_rss_get_algo_key(struct hns3_hw *hw, uint8_t *hash_algo, + int hns3_restore_filter(struct hns3_adapter *hns);