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 277CD42D46 for ; Sun, 25 Jun 2023 08:41:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 216EF40ED8; Sun, 25 Jun 2023 08:41:56 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by mails.dpdk.org (Postfix) with ESMTP id BEDE140A7F for ; Sun, 25 Jun 2023 08:41:54 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Go4gE7oHf9YhMMEcVrNp54KuxBM94eBNmyfD4gyld/cWorjODZ+KwH89biCIgB1aJAdXIhIq8d5U7m9hIieV/Kcs+qels66qTJTyQ31VPsU3ws/gw9JFiNwfqBKEINTaj9gwEXA+EtaLwRdb1W69UWJIYNue3whSsIUqihpFKzy2fAVKOGl4YcUo8ZywCjZVwaAXhzlaMF3yQUFcS0F9Ey5QrszMW7Dcwy05UqJWOSgphBqoSXWP3T68BmyW+pNQytqZkXp/OFCFLVoDNogP3Jq4r8pZFNG8F+SHPvFkwrReXmqy3W+Iv1fvr6n7Ez1C1nUv0JeSW34eBdVhflh/5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3ai0FE04acdcYrPOltPBEtTLdyaHzwN6UuenKOFas0Y=; b=ZC93JFkRg4UB2DlPrBxFo5uarzD36rURB7xHrs9AZhoF7JpfgUaEIlXB1Eh426cFuPbJRnSUK5K6jhNztwgLXTQdpMe+KLbopp8bUlp14el0LWk83z69IG4FfyUtnVRjS2Jm8nOh3BJi/WjR7ZxGq2RIR7f8++PCNdbTozU6Ed65IbP/OYnoLrQ+RJjm5H2LjnH4FWOaWGIIQ15m2zmJLjMzosLd7AXBwUQb1xPycKVexcZJmGss2VsI3W37zP5ikY+TnqxDGifA6bNlcNIEqWMHSpqJIhh5LY5mbk6n0ZYbcx5QlsahDnyY2LPETWIeIRSHFb+pR1R+zTj/wMv+VA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=corigine.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3ai0FE04acdcYrPOltPBEtTLdyaHzwN6UuenKOFas0Y=; b=GarFUQljV3yBLrK6TyLtxR4CkQqqPmWGr0AquiV0TM8JMrxHiPw0pbuTRp0c5I9tGVYEKFzl7+Zlz5If/jN/aXY7X0m8pku4BWBSd+bLEvto0+aE2naizr5/eWPNOXmlgnyy+TuvjJlJTT1+hDQVUQd3g0uBTvOkg0kwtgCUZPwMBtDsqRYjFhxG3VdkHEC/Voi3Y2qXKdg4Mh/bScnNuJjTVvSfUD2Hn00en2mycY/XKlLzXzzxoPW5HSpAIuOI2VZ0h8Et9MINtNPvCstz43ijXU9nLJ7O/+e2EW70lrvv5ACcBG2IERQzFoAsjG//F6kMQHPVCFK1OotdmI3XDA== Received: from MW4P220CA0018.NAMP220.PROD.OUTLOOK.COM (2603:10b6:303:115::23) by SJ0PR12MB6831.namprd12.prod.outlook.com (2603:10b6:a03:47d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Sun, 25 Jun 2023 06:41:53 +0000 Received: from CO1NAM11FT048.eop-nam11.prod.protection.outlook.com (2603:10b6:303:115:cafe::5a) by MW4P220CA0018.outlook.office365.com (2603:10b6:303:115::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.32 via Frontend Transport; Sun, 25 Jun 2023 06:41:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CO1NAM11FT048.mail.protection.outlook.com (10.13.175.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.47 via Frontend Transport; Sun, 25 Jun 2023 06:41:52 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Sat, 24 Jun 2023 23:41:45 -0700 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Sat, 24 Jun 2023 23:41:44 -0700 From: Xueming Li To: Chaoyong He CC: =?UTF-8?q?Niklas=20S=C3=B6derlund?= , "dpdk stable" Subject: patch 'net/nfp: fix TP flow action for UDP' has been queued to stable release 22.11.3 Date: Sun, 25 Jun 2023 14:34:46 +0800 Message-ID: <20230625063544.11183-69-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230625063544.11183-1-xuemingl@nvidia.com> References: <20230625063544.11183-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT048:EE_|SJ0PR12MB6831:EE_ X-MS-Office365-Filtering-Correlation-Id: 1f11322d-3cdd-4447-7110-08db754742e6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gYCyDot7ZQPFJZMEqU0lgUSlFvKQ//5hYYUwMjvtsndaSHM8CGDavBR+QvOI4Yu4cWKQx4z/ZjsgIZGbJwKa4maWJxOftlhNKUHBVuGATuXJQ/V21Dktkw4eRo/Rhd4SfKYPgJ1AUJG07mcO0vN0gfETd/CyO7hTRntm/Rsq3q6+nhHPTwqqUYVBcx8ufd0ZJuEZHC3cxEw9/XR2kcu6Phi7Wb5uFFeIw3Jr1TRV2JjHlBp2kncumKSiJZ9WSjKkiidJJqaqO2QzQSqsfb3S0FHRRyuuIn3v51K4t6pewnoXakNwoKhmSes5VZQ7pa5sxLINNOSffwJXEl76WZNX+zhZNl2d0+IU6ZhD0V7D/b39uNQUei8cwA9saTdIChJzadD0h4mMZqVoqtELwJPsUxEC2/bAvFOw0YHbNSuvM9bb6yQFRhm9oBg26ANn9I4H7aha0nDIa5VU1P79XDbfio7dHHY/J9xTpeLX3sSXn6YqslVNTSyrz4fWwj03HqHnjWSpYzBXmFreNczPF69feYRSmLfE4Mikmowb/2WiM+6rbMYUCPi2Jeie84j7Yrj4AC/3eTSGIci7LpyEhFtJb2gr7lkLJ0OSriKZA7OED0dW4jU8TImgM1Gp7jzDwEFgda0Yxgrp1My5ETb4yGbPYHwE05RQ6zeuLRmTXxE4xluizaZNJJB0mu10ZAuNNs0NNkZgI7ZX0eMDKavSHlpNoRI7dgQFBcJslEXK5cEGpuFYn7hFO5hC02kuzzSUuwq6c+7efbx3uA4YfDaY+XNMhA== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(136003)(346002)(396003)(39860400002)(376002)(451199021)(46966006)(36840700001)(40470700004)(36860700001)(82310400005)(19627235002)(66574015)(47076005)(966005)(478600001)(7696005)(2616005)(54906003)(426003)(83380400001)(336012)(26005)(53546011)(1076003)(186003)(16526019)(6286002)(2906002)(5660300002)(40460700003)(36756003)(70206006)(356005)(4326008)(7636003)(70586007)(82740400003)(55016003)(40480700001)(316002)(8936002)(8676002)(41300700001)(86362001)(6916009); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2023 06:41:52.7487 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1f11322d-3cdd-4447-7110-08db754742e6 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT048.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6831 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 22.11.3 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/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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=c40b9a9873ae43010e4732f94d86b4f15e79ffd5 Thanks. Xueming Li --- >From c40b9a9873ae43010e4732f94d86b4f15e79ffd5 Mon Sep 17 00:00:00 2001 From: Chaoyong He Date: Fri, 9 Jun 2023 14:22:19 +0800 Subject: [PATCH] net/nfp: fix TP flow action for UDP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Xueming Li [ upstream commit 0896b1a22a5b23895af6fabbfdc5df528b24cecd ] The former logic can't distinguish the TCP and UDP set action, and only send a TCP type ctrl message to firmware, which cause the set action of UDP can't offload. Fixes: fc185097bbe6 ("net/nfp: support TP source flow action") Fixes: 87986df09d75 ("net/nfp: support TP destination flow action") Signed-off-by: Chaoyong He Reviewed-by: Niklas Söderlund --- drivers/net/nfp/nfp_flow.c | 30 ++++++++++++++++++++++++++---- drivers/net/nfp/nfp_flow.h | 1 + 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c index 5b562a1086..1700aeec9d 100644 --- a/drivers/net/nfp/nfp_flow.c +++ b/drivers/net/nfp/nfp_flow.c @@ -1898,6 +1898,19 @@ nfp_flow_inner_item_get(const struct rte_flow_item items[], return false; } +static bool +nfp_flow_tcp_flag_check(const struct rte_flow_item items[]) +{ + const struct rte_flow_item *item; + + for (item = items; item->type != RTE_FLOW_ITEM_TYPE_END; ++item) { + if (item->type == RTE_FLOW_ITEM_TYPE_TCP) + return true; + } + + return false; +} + static int nfp_flow_compile_item_proc(struct nfp_flower_representor *repr, const struct rte_flow_item items[], @@ -1993,6 +2006,9 @@ nfp_flow_compile_items(struct nfp_flower_representor *representor, mbuf_off_mask += sizeof(struct nfp_flower_ext_meta); } + if (nfp_flow_tcp_flag_check(items)) + nfp_flow->tcp_flag = true; + /* Check if this is a tunnel flow and get the inner item*/ is_tun_flow = nfp_flow_inner_item_get(items, &loop_item); if (is_tun_flow) @@ -2164,7 +2180,8 @@ static void nfp_flow_action_set_tp(char *act_data, const struct rte_flow_action *action, bool tp_src_flag, - bool tp_set_flag) + bool tp_set_flag, + bool tcp_flag) { size_t act_size; struct nfp_fl_act_set_tport *set_tp; @@ -2176,7 +2193,10 @@ nfp_flow_action_set_tp(char *act_data, set_tp = (struct nfp_fl_act_set_tport *)act_data; act_size = sizeof(struct nfp_fl_act_set_tport); - set_tp->head.jump_id = NFP_FL_ACTION_OPCODE_SET_TCP; + if (tcp_flag) + set_tp->head.jump_id = NFP_FL_ACTION_OPCODE_SET_TCP; + else + set_tp->head.jump_id = NFP_FL_ACTION_OPCODE_SET_UDP; set_tp->head.len_lw = act_size >> NFP_FL_LW_SIZ; set_tp->reserved = 0; @@ -3394,7 +3414,8 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor, break; case RTE_FLOW_ACTION_TYPE_SET_TP_SRC: PMD_DRV_LOG(DEBUG, "Process RTE_FLOW_ACTION_TYPE_SET_TP_SRC"); - nfp_flow_action_set_tp(position, action, true, tp_set_flag); + nfp_flow_action_set_tp(position, action, true, + tp_set_flag, nfp_flow->tcp_flag); if (!tp_set_flag) { position += sizeof(struct nfp_fl_act_set_tport); tp_set_flag = true; @@ -3402,7 +3423,8 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor, break; case RTE_FLOW_ACTION_TYPE_SET_TP_DST: PMD_DRV_LOG(DEBUG, "Process RTE_FLOW_ACTION_TYPE_SET_TP_DST"); - nfp_flow_action_set_tp(position, action, false, tp_set_flag); + nfp_flow_action_set_tp(position, action, false, + tp_set_flag, nfp_flow->tcp_flag); if (!tp_set_flag) { position += sizeof(struct nfp_fl_act_set_tport); tp_set_flag = true; diff --git a/drivers/net/nfp/nfp_flow.h b/drivers/net/nfp/nfp_flow.h index 8071243b86..314ff2083a 100644 --- a/drivers/net/nfp/nfp_flow.h +++ b/drivers/net/nfp/nfp_flow.h @@ -224,6 +224,7 @@ struct rte_flow { uint32_t hash_key; uint32_t port_id; bool install_flag; + bool tcp_flag; /**< Used in the SET_TP_* action */ enum nfp_flow_type type; }; -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-06-25 14:32:00.337762800 +0800 +++ 0068-net-nfp-fix-TP-flow-action-for-UDP.patch 2023-06-25 14:31:58.425773900 +0800 @@ -1 +1 @@ -From 0896b1a22a5b23895af6fabbfdc5df528b24cecd Mon Sep 17 00:00:00 2001 +From c40b9a9873ae43010e4732f94d86b4f15e79ffd5 Mon Sep 17 00:00:00 2001 @@ -7,0 +8,3 @@ +Cc: Xueming Li + +[ upstream commit 0896b1a22a5b23895af6fabbfdc5df528b24cecd ] @@ -15 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +27 @@ -index 359423dc28..14749f03a2 100644 +index 5b562a1086..1700aeec9d 100644 @@ -28 +30 @@ -@@ -1908,6 +1908,19 @@ nfp_flow_inner_item_get(const struct rte_flow_item items[], +@@ -1898,6 +1898,19 @@ nfp_flow_inner_item_get(const struct rte_flow_item items[], @@ -48 +50 @@ -@@ -2003,6 +2016,9 @@ nfp_flow_compile_items(struct nfp_flower_representor *representor, +@@ -1993,6 +2006,9 @@ nfp_flow_compile_items(struct nfp_flower_representor *representor, @@ -58 +60 @@ -@@ -2174,7 +2190,8 @@ static void +@@ -2164,7 +2180,8 @@ static void @@ -68 +70 @@ -@@ -2186,7 +2203,10 @@ nfp_flow_action_set_tp(char *act_data, +@@ -2176,7 +2193,10 @@ nfp_flow_action_set_tp(char *act_data, @@ -80 +82 @@ -@@ -3443,7 +3463,8 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor, +@@ -3394,7 +3414,8 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor, @@ -90 +92 @@ -@@ -3451,7 +3472,8 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor, +@@ -3402,7 +3423,8 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor, @@ -101 +103 @@ -index d352671c2c..414bd4573b 100644 +index 8071243b86..314ff2083a 100644 @@ -104,2 +106,2 @@ -@@ -225,6 +225,7 @@ struct rte_flow { - uint32_t mtr_id; +@@ -224,6 +224,7 @@ struct rte_flow { + uint32_t hash_key;