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 EA4F7A00C2 for ; Thu, 3 Nov 2022 10:33:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E0E73427ED; Thu, 3 Nov 2022 10:33:00 +0100 (CET) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mails.dpdk.org (Postfix) with ESMTP id 6528540694 for ; Thu, 3 Nov 2022 10:32:59 +0100 (CET) Received: by mail-wr1-f45.google.com with SMTP id h9so1795957wrt.0 for ; Thu, 03 Nov 2022 02:32:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=bYuau+0Ttph4wQpFBDZN1fBT5RgRekrscTT6ysZ2n/M=; b=XRPca+Pq/EXyj8YT3vm1kj3HQbehn2OfLH2BdzrGlQm73R57+f9enCCEuxsUwkWZ6b s1XisZ75V98uYCgDJOEBBJwI+KAO7y1u2TQlMqtddcU2CV/c5WV2KgrnqiEofDS97nvt 3VMlYIw/U5KBaP0ctNeVYkdLVCrthQqp17cv+DdfbQKHl4K7yG+/2zIMqky0hOUMqK9V csKp36i1NMuyWr2QSUPzLXDXEiL+Cq8KW6HhBh2Zj6XvvVYd1Ot8syDLv8lv62SY842v E02Z6HusYc0SU9CyzjC9QFaUdKmb8WSjQJaXrkf/P7mojTCD3LpeT05NE00ZjzqGneOP impg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=bYuau+0Ttph4wQpFBDZN1fBT5RgRekrscTT6ysZ2n/M=; b=S1Jk/KP+FsZGSeqZ3ked+4ASQfeqNNeR9Xls6ZQjqDaqfI3aeNXx/h1YK/lXb7eFiI ctkR/DsNxdT3CK4QjjhV2JAePsFRytJEDfYqEkkKLODBFm4fTRBiJ5UK412kmWJb1Tev lUWpG3uYre8d6+QDSvzNL6P9VizuZcJ1bZzUSKnLY8efZSnzUTGMyDppVZnsqkE5eCMl ds6vUiWqR0qBTioBDXGTXN5fUbJsPizrKPlHMq4c6QV4LdCXBbWcMsW0ra1jCcER6Iwv Y6l6Rw7ipk1/5sCjzWaWSk+Q1+01EjtAnAnt6IJxsHUgNO3evoYs3V5yv9h8Eq8Vpd4R WoRQ== X-Gm-Message-State: ACrzQf0LEXHNwKqVlRABQ3esRhKSsTUQ5FoH5S1hdsPj41nWgQlbGawb 3kISzC+e8cr07kYlBsnTZtVTAD3FIBUSPs8/ X-Google-Smtp-Source: AMsMyM5hmeRl2V1nGrUWvlBaqarY4zcN6hYp8jz1i+aOoWAmN5MK60dkptpoh+RlWVcnNvn6C7DeQA== X-Received: by 2002:adf:ded2:0:b0:236:bad7:c850 with SMTP id i18-20020adfded2000000b00236bad7c850mr15825673wrn.565.1667467979159; Thu, 03 Nov 2022 02:32:59 -0700 (PDT) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id h7-20020a5d4307000000b00236883f2f5csm335149wrq.94.2022.11.03.02.32.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 02:32:58 -0700 (PDT) From: luca.boccassi@gmail.com To: Huisong Li Cc: dpdk stable Subject: patch 'net/hns3: add L3 and L4 RSS types' has been queued to stable release 20.11.7 Date: Thu, 3 Nov 2022 09:27:46 +0000 Message-Id: <20221103092758.1099402-88-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103092758.1099402-1-luca.boccassi@gmail.com> References: <20221103092758.1099402-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.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/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/5ad4f4fb46c63e36675430d26b6e1c430766ec17 Thanks. Luca Boccassi --- >From 5ad4f4fb46c63e36675430d26b6e1c430766ec17 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Fri, 30 Sep 2022 15:22:17 +0800 Subject: [PATCH] net/hns3: add L3 and L4 RSS types [ upstream commit 13c3993240c86446f876ea99fca8482ed511e7a8 ] When user set 'L3_SRC/DST_ONLY' or 'L4_SRC/DST_ONLY' to 'rss_hf' and do not specify the packet type, these types will be set to hardware. Fixes: 806f1d5ab0e3 ("net/hns3: set RSS hash type input configuration") Signed-off-by: Huisong Li --- drivers/net/hns3/hns3_rss.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c index cec152baa4..c105072f24 100644 --- a/drivers/net/hns3/hns3_rss.c +++ b/drivers/net/hns3/hns3_rss.c @@ -400,8 +400,34 @@ hns3_rss_reset_indir_table(struct hns3_hw *hw) return ret; } +static void +hns3_rss_check_l3l4_types(struct hns3_hw *hw, uint64_t rss_hf) +{ + uint64_t ip_mask = ETH_RSS_IPV4 | ETH_RSS_FRAG_IPV4 | + ETH_RSS_NONFRAG_IPV4_OTHER | + ETH_RSS_IPV6 | ETH_RSS_FRAG_IPV6 | + ETH_RSS_NONFRAG_IPV6_OTHER; + uint64_t l4_mask = ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_NONFRAG_IPV4_SCTP | + ETH_RSS_NONFRAG_IPV6_TCP | + ETH_RSS_NONFRAG_IPV6_UDP | + ETH_RSS_NONFRAG_IPV6_SCTP; + uint64_t l3_src_dst_mask = ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L3_DST_ONLY; + uint64_t l4_src_dst_mask = ETH_RSS_L4_SRC_ONLY | + ETH_RSS_L4_DST_ONLY; + + if (rss_hf & l3_src_dst_mask && + !(rss_hf & ip_mask || rss_hf & l4_mask)) + hns3_warn(hw, "packet type isn't specified, L3_SRC/DST_ONLY is ignored."); + + if (rss_hf & l4_src_dst_mask && !(rss_hf & l4_mask)) + hns3_warn(hw, "packet type isn't specified, L4_SRC/DST_ONLY is ignored."); +} + static uint64_t -hns3_rss_calc_tuple_filed(uint64_t rss_hf) +hns3_rss_calc_tuple_filed(struct hns3_hw *hw, uint64_t rss_hf) { uint64_t l3_only_mask = ETH_RSS_L3_SRC_ONLY | ETH_RSS_L3_DST_ONLY; @@ -430,6 +456,7 @@ hns3_rss_calc_tuple_filed(uint64_t rss_hf) !has_l3_l4_only) tuple |= hns3_set_tuple_table[i].rss_field; } + hns3_rss_check_l3l4_types(hw, rss_hf); return tuple; } @@ -445,7 +472,7 @@ hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf) hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RSS_INPUT_TUPLE, false); req = (struct hns3_rss_input_tuple_cmd *)desc.data; - tuple_field = hns3_rss_calc_tuple_filed(rss_hf); + tuple_field = hns3_rss_calc_tuple_filed(hw, rss_hf); req->tuple_field = rte_cpu_to_le_64(tuple_field); ret = hns3_cmd_send(hw, &desc, 1); if (ret) { -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:30.828772172 +0000 +++ 0088-net-hns3-add-L3-and-L4-RSS-types.patch 2022-11-03 09:27:25.549425848 +0000 @@ -1 +1 @@ -From 13c3993240c86446f876ea99fca8482ed511e7a8 Mon Sep 17 00:00:00 2001 +From 5ad4f4fb46c63e36675430d26b6e1c430766ec17 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 13c3993240c86446f876ea99fca8482ed511e7a8 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ -index ea745c791f..ca5a129234 100644 +index cec152baa4..c105072f24 100644 @@ -28,14 +29,14 @@ -+ uint64_t ip_mask = RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_FRAG_IPV4 | -+ RTE_ETH_RSS_NONFRAG_IPV4_OTHER | -+ RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_FRAG_IPV6 | -+ RTE_ETH_RSS_NONFRAG_IPV6_OTHER; -+ uint64_t l4_mask = RTE_ETH_RSS_NONFRAG_IPV4_TCP | -+ RTE_ETH_RSS_NONFRAG_IPV4_UDP | -+ RTE_ETH_RSS_NONFRAG_IPV4_SCTP | -+ RTE_ETH_RSS_NONFRAG_IPV6_TCP | -+ RTE_ETH_RSS_NONFRAG_IPV6_UDP | -+ RTE_ETH_RSS_NONFRAG_IPV6_SCTP; -+ uint64_t l3_src_dst_mask = RTE_ETH_RSS_L3_SRC_ONLY | -+ RTE_ETH_RSS_L3_DST_ONLY; -+ uint64_t l4_src_dst_mask = RTE_ETH_RSS_L4_SRC_ONLY | -+ RTE_ETH_RSS_L4_DST_ONLY; ++ uint64_t ip_mask = ETH_RSS_IPV4 | ETH_RSS_FRAG_IPV4 | ++ ETH_RSS_NONFRAG_IPV4_OTHER | ++ ETH_RSS_IPV6 | ETH_RSS_FRAG_IPV6 | ++ ETH_RSS_NONFRAG_IPV6_OTHER; ++ uint64_t l4_mask = ETH_RSS_NONFRAG_IPV4_TCP | ++ ETH_RSS_NONFRAG_IPV4_UDP | ++ ETH_RSS_NONFRAG_IPV4_SCTP | ++ ETH_RSS_NONFRAG_IPV6_TCP | ++ ETH_RSS_NONFRAG_IPV6_UDP | ++ ETH_RSS_NONFRAG_IPV6_SCTP; ++ uint64_t l3_src_dst_mask = ETH_RSS_L3_SRC_ONLY | ++ ETH_RSS_L3_DST_ONLY; ++ uint64_t l4_src_dst_mask = ETH_RSS_L4_SRC_ONLY | ++ ETH_RSS_L4_DST_ONLY; @@ -55,2 +56,2 @@ - uint64_t l3_only_mask = RTE_ETH_RSS_L3_SRC_ONLY | - RTE_ETH_RSS_L3_DST_ONLY; + uint64_t l3_only_mask = ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L3_DST_ONLY;