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 7333241D8D for ; Mon, 27 Feb 2023 08:08:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6E59040A84; Mon, 27 Feb 2023 08:08:53 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2074.outbound.protection.outlook.com [40.107.94.74]) by mails.dpdk.org (Postfix) with ESMTP id E9622410D3 for ; Mon, 27 Feb 2023 08:08:51 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kdSyI1nqOl4lB9IQSiX0mDo8ho3NrnEk64Z2Wtr7GkZ4KB3JyfIsExaCvFODWxANVH5ojqOuX8jr7PljLS2a96n6aaZKnBxhLo2IVNptkSTaR+n1EUF6TuHRIoZNjcpexIgDRFOkCuLnbe/zmN7L9HK0FZfxnMhcp/fBKv1QDklmeQdp0uEsbqiMN/meC9JVPAp3C3IuXbB5QJ34+hedu16NTv27V96lOJ2HjmxPWynk9A1NpaDs0y+QsZqJNrlKJoSFUX9q8qDldYEX866C0DVCkyX2rLK3/GD5T/t05ciUW2psPwvEhftw1ggAWG56i2NRIjGEE6iDc8EaFr97OA== 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=jEmY/JPsw7ytw3h4SkAL+TACseLSXfc4RtB/pncNDGc=; b=K8SW+usllGT+k9zGE0Hg5WBjJw2QXQwuffCpty9WCOuVIE8ZZKEo0k1g6+YmN6JEpJtQenVe3pRyf+BZsWadhKO3EER7KoJfEzb+KOPzWGAyNVho5mPPu1ZhttJ0cbRH2hTQUpiQkErJp+nt/g/cIC7NNaQfUJ0fhpN/fAxZOiXQwanqcnjh+2mBGNdYqO6RzErXlfC93ewec3fRUfLKSZ+Eyn3FLuUnt6PcSqgroGn37wpm8qQ3XVqKjYk4jiALjuH6YuJty1xLt+uPYgijmOpN6u7LNhq6Ocn1f9RW4ZV5cHVj1ePsJBe5UFKcK/ZGHJeMJ9jNOQuE9/QThlOPoQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=marvell.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=jEmY/JPsw7ytw3h4SkAL+TACseLSXfc4RtB/pncNDGc=; b=mB/30NiaSVXvLvPK6hw80ayj/AhuilWqyGRl7apIT79gbV/s849UpXGN6YGkIgi89pLXXTDl+Jb0ym6EUuvcB3i97OO81snfzOaU+kcXuPi3zijzFK0fmYfasQYYjfcV9kuIK0CaQ3GglY3eqZmyRhGjYm+nHDccrs+h15MyMo7EuJZbm2MQYxs4ZsEsgd9V4FTzbLp3wsf3K26K6QFJksDcs4hjCFzMqDFlbmqD5D+emqSvPuUB5ykDSHIS5mCbgCoaYqgYusWn8Fw1O1SE/L21/gflY4oI3HZF5BicmxR9CZX6oVczOldH2VbQ5c/vrWH3+Pff85Cq1pD1gyOLFw== Received: from MW4P221CA0006.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::11) by DM4PR12MB5964.namprd12.prod.outlook.com (2603:10b6:8:6b::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.26; Mon, 27 Feb 2023 07:08:49 +0000 Received: from CO1NAM11FT038.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8b:cafe::42) by MW4P221CA0006.outlook.office365.com (2603:10b6:303:8b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.29 via Frontend Transport; Mon, 27 Feb 2023 07:08:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1NAM11FT038.mail.protection.outlook.com (10.13.174.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.16 via Frontend Transport; Mon, 27 Feb 2023 07:08:48 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Sun, 26 Feb 2023 23:08:32 -0800 Received: from nvidia.com (10.126.230.37) 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; Sun, 26 Feb 2023 23:08:30 -0800 From: Xueming Li To: Nithin Dabilpuram CC: dpdk stable Subject: patch 'net/cnxk: fix packet type for IPv6 packets post decryption' has been queued to stable release 22.11.2 Date: Mon, 27 Feb 2023 14:59:37 +0800 Message-ID: <20230227070107.15664-69-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230227070107.15664-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230227070107.15664-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.37] 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: CO1NAM11FT038:EE_|DM4PR12MB5964:EE_ X-MS-Office365-Filtering-Correlation-Id: fc7803df-c6f2-4283-756c-08db1891793a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2fopJyiFc1o8ge6ZTTzf97nZ1QCXRUDieL7woPWIebKAlGH9JJuuMn0MWbw6q0xq1OsAAv1bZSjWCIW1Ox5QNNv8qfTy0uoiquK1oW+7Duja9TA/pcBcjFb+6AMYofWW+fUf+SKB9vo3rFiGIt8KMM83qpzVHSEd6Rkn+KRqJmrG7Lc9RDeEVfXzIbpKvBLjdPzGXKs7UQxy1qh/gBSBmoIbp6vP8X/8IkgCHPFGqs5lQ5tUY+GammitRE76unzU0qm98ImJcUraBkkNyS1LCrN6m3LHIidp26GRIcHlEKWFUcyydvsfgqz1czb99eOYCxzABbx/gZ68CTDuyjKrcZPuk6neGD5dSf1lMZdbPNXNIjsBHhsDvbz0cS3DY2e1qa9BJ4Fxk8vu2mA6pdXLk/xjcXtIpGFFkjCJBBl3dm8WGFJarunWIQgzdpNHlbzP+W4ZpKaE2XNNMgFZUQWYKjIQSc7vMhZKYms34WMsKqslm8a6r46YLnNTUrHHRqTdNEo715JC2hFJjl+d7FZ9x6nbI3hKow/NqH2hI+nqftfzd0/udbb8DHbJtzPmVHuZOXX3LOumt76wjHIMyR2n2qY3l1eSlAw0KQxuMxHNNe1lZ1auTfLsugUo/FMK7qkfkS6bbNHFlPwaf+RxbvFn/GOAM5jgCy2/RzO3o01JkFVvyJnHIthpQsJnoYyU7wpifiQYL6bfnUkBOYR8uCtW/33puFP9wH6pD9tATy/OeuRFUSXa2rr1PT1KgQP4igTzVBKwl1EqZkCmouapuAXfN0ON3YTy/2D/O50dgyfnI5615Q5Yx4/iEGJnugbw6OBN X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(346002)(396003)(136003)(39860400002)(376002)(451199018)(36840700001)(46966006)(40470700004)(16526019)(6286002)(53546011)(186003)(41300700001)(966005)(356005)(70206006)(8676002)(70586007)(86362001)(40480700001)(55016003)(36756003)(478600001)(7696005)(6916009)(40460700003)(316002)(26005)(4326008)(34020700004)(1076003)(83380400001)(426003)(8936002)(5660300002)(47076005)(82310400005)(36860700001)(2616005)(7636003)(82740400003)(336012)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2023 07:08:48.4693 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fc7803df-c6f2-4283-756c-08db1891793a 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.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT038.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5964 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.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 03/01/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=87725aa6d219f1fada76eec913983296be1e3276 Thanks. Xueming Li --- >From 87725aa6d219f1fada76eec913983296be1e3276 Mon Sep 17 00:00:00 2001 From: Nithin Dabilpuram Date: Mon, 28 Nov 2022 15:24:37 +0530 Subject: [PATCH] net/cnxk: fix packet type for IPv6 packets post decryption Cc: Xueming Li [ upstream commit 02b19349fa231846f79d118718fce2d23b4564d4 ] Update ptype properly for IPv6 packets post inline decryption. Fixes: 4440eb88ddfc ("net/cnxk: use full context IPsec structures") Signed-off-by: Nithin Dabilpuram --- drivers/net/cnxk/cn9k_rx.h | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/net/cnxk/cn9k_rx.h b/drivers/net/cnxk/cn9k_rx.h index 1a9f920b41..0e23609df5 100644 --- a/drivers/net/cnxk/cn9k_rx.h +++ b/drivers/net/cnxk/cn9k_rx.h @@ -260,8 +260,8 @@ nix_rx_sec_mbuf_err_update(const union nix_rx_parse_u *rx, uint16_t res, } static __rte_always_inline uint64_t -nix_rx_sec_mbuf_update(const struct nix_cqe_hdr_s *cq, struct rte_mbuf *m, - uintptr_t sa_base, uint64_t *rearm_val, uint16_t *len) +nix_rx_sec_mbuf_update(const struct nix_cqe_hdr_s *cq, struct rte_mbuf *m, uintptr_t sa_base, + uint64_t *rearm_val, uint16_t *len, uint32_t packet_type) { uintptr_t res_sg0 = ((uintptr_t)cq + ROC_ONF_IPSEC_INB_RES_OFF - 8); const union nix_rx_parse_u *rx = @@ -315,15 +315,18 @@ nix_rx_sec_mbuf_update(const struct nix_cqe_hdr_s *cq, struct rte_mbuf *m, ip = (struct rte_ipv4_hdr *)(data + ROC_ONF_IPSEC_INB_SPI_SEQ_SZ + ROC_ONF_IPSEC_INB_MAX_L2_SZ); + packet_type = (packet_type & ~(RTE_PTYPE_L3_MASK | RTE_PTYPE_TUNNEL_MASK)); if (((ip->version_ihl & 0xf0) >> RTE_IPV4_IHL_MULTIPLIER) == IPVERSION) { *len = rte_be_to_cpu_16(ip->total_length) + lcptr; + packet_type |= RTE_PTYPE_L3_IPV4_EXT_UNKNOWN; } else { PLT_ASSERT(((ip->version_ihl & 0xf0) >> RTE_IPV4_IHL_MULTIPLIER) == 6); ip6 = (struct rte_ipv6_hdr *)ip; *len = rte_be_to_cpu_16(ip6->payload_len) + sizeof(struct rte_ipv6_hdr) + lcptr; + packet_type |= RTE_PTYPE_L3_IPV6_EXT_UNKNOWN; } /* Update data offset */ @@ -332,6 +335,7 @@ nix_rx_sec_mbuf_update(const struct nix_cqe_hdr_s *cq, struct rte_mbuf *m, *rearm_val = *rearm_val & ~(BIT_ULL(16) - 1); *rearm_val |= data_off; + m->packet_type = packet_type; return RTE_MBUF_F_RX_SEC_OFFLOAD; } @@ -363,14 +367,7 @@ cn9k_nix_cqe_to_mbuf(const struct nix_cqe_hdr_s *cq, const uint32_t tag, /* Get SA Base from lookup mem */ sa_base = cnxk_nix_sa_base_get(port, lookup_mem); - ol_flags |= nix_rx_sec_mbuf_update(cq, mbuf, sa_base, &val, - &len); - - /* Only Tunnel inner IPv4 is supported */ - packet_type = (packet_type & - ~(RTE_PTYPE_L3_MASK | RTE_PTYPE_TUNNEL_MASK)); - packet_type |= RTE_PTYPE_L3_IPV4_EXT_UNKNOWN; - mbuf->packet_type = packet_type; + ol_flags |= nix_rx_sec_mbuf_update(cq, mbuf, sa_base, &val, &len, packet_type); goto skip_parse; } -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-27 14:08:43.140408200 +0800 +++ 0070-net-cnxk-fix-packet-type-for-IPv6-packets-post-decry.patch 2023-02-27 14:08:40.799237000 +0800 @@ -1 +1 @@ -From 02b19349fa231846f79d118718fce2d23b4564d4 Mon Sep 17 00:00:00 2001 +From 87725aa6d219f1fada76eec913983296be1e3276 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 02b19349fa231846f79d118718fce2d23b4564d4 ] @@ -9 +11,0 @@ -Cc: stable@dpdk.org