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 29A8446A9C for ; Mon, 30 Jun 2025 14:26:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 23EBE40656; Mon, 30 Jun 2025 14:26:39 +0200 (CEST) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mails.dpdk.org (Postfix) with ESMTP id EF8CB40669 for ; Mon, 30 Jun 2025 14:26:35 +0200 (CEST) Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-3a54700a463so2621239f8f.1 for ; Mon, 30 Jun 2025 05:26:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751286395; x=1751891195; darn=dpdk.org; 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=EgiqJxmtURi9EiOZBeqmVuIt7q9qiz83FGi7XmtzIs8=; b=j18NqVdW771qRJZi4EWg5fEtqH4bKTqlvjiI0MElsnLijWFPVTyHW8VNjMm0K+zs46 7g/q2gAHUMbDr1wYYDaw/T8qktuthHWiY7gjvhn14ThtWETksRb8va3qftL6AmXY3Tk/ A2C8oYovDNpbo7zoRRPqF3zKz4yWR7IbJxxdWBdEnqKn4F/WWpGN7epeAEkeE+lKTg1A zJ9+uChJJIw0oLSwQsweoL1Njudbp4FRU9CVYM/vOkmZgx1S94B2FegsbIBOCeeSiboS BVFZ3D3PG5UAurO4uffiCwZdAOm5fiw70NDQkZSpf+Sj/A/9tbeVgaF4FadNu2OidQWB byXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751286395; x=1751891195; 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=EgiqJxmtURi9EiOZBeqmVuIt7q9qiz83FGi7XmtzIs8=; b=C2VyAjM1q54L0ketNPvdEzIkl3MClqjzJdaEIVlTO7nYzIiR3uKu4XrRCfxGXFlaue ct3/vYYMaBmMCSRZtyNaQWwWiY+pkSjZEtX+sxS+GkjA0OgcTq0/kwbdIzp8PMI08+QA Lx6gl2HauyWyoBhd36BcIm7DF0dGCg8uFGXp4u4cilDHwn+Gpp0NMBNaw90Bbrpgur9s bxukOUsbdXZyTdfQlFjW92HNjZ2POuCJTzdquIzSuzRvDxElW4DcpJUl78R8f7XdOJUm OEcJWBCXhRvcY1axrZTov2DyhtCJqp7xbE+DL5giphcUeIYORyHQ4K1BHTqG6gF78WYe rMIQ== X-Forwarded-Encrypted: i=1; AJvYcCUfgdYPzp7ljFBEAdYqBJjVz1zaNKqA3VybjV0Oi3hdHdEkAUfO9PGf5149sz3FEE3GLUBqhRo=@dpdk.org X-Gm-Message-State: AOJu0YxfVTT/aR3fFk6r5QSXF35cOOrct3WFFjNudSsYhvnWbYM3/Sko NoRJcDOR5cdsAwgAJ6HKt1ltlsZaBW/AQt90s2euGGtm3FPjXggyG3WjggrglkIN X-Gm-Gg: ASbGncvW4qFi0C4yT16mOG4OiMq1IpmDYLMLtpaZEie7tvHU3N+CgaLfmrx/GDFL2SP dQzA5wSl9A8Gfwe1pbyW4oRoTSbi+pcM83RZqLAFbgz+ZBbJ3TnX7VWwC6IeGyGmT+vmMv6tvpt Ap5LgmCjUiMPD8EKjEgRaAMB+/sRVgGwCR9GTtuiMYxb3djcpHG4AghRULWVbk5K++vsPaQn/ww nQ/4biK7CiKCUJ5jL91XiXnKMJBOf3rbRjBSOp0NQRoB6t00KXjMOGM2B/54lrU48EcHWA0w8cI 1tAsJtfz0ZeYYv9Xa6KlO9qXj80XU9APtQX4oE+jZ+/ShV2pUxOHDbuFr3zIcK3Lh5o= X-Google-Smtp-Source: AGHT+IHu1mSGK7/wRj7nzczwxssHPYgJW0ij4yzT/4NlQgvVzY7ZpGMC3eT0+xNCNzZbMWCbJ4FU/A== X-Received: by 2002:a05:6000:290a:b0:3a6:d95e:f37c with SMTP id ffacd0b85a97d-3a97fcd282fmr10701876f8f.2.1751286395436; Mon, 30 Jun 2025 05:26:35 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:ded1:f637:68f:c2a6]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-3a892e598ddsm10265722f8f.78.2025.06.30.05.26.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jun 2025 05:26:34 -0700 (PDT) From: luca.boccassi@gmail.com To: Rakesh Kudurumalla Cc: Akhil Goyal , dpdk stable Subject: patch 'examples/ipsec-secgw: fix crash in event vector mode' has been queued to stable release 22.11.9 Date: Mon, 30 Jun 2025 13:25:44 +0100 Message-ID: <20250630122556.1133654-14-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250630122556.1133654-1-luca.boccassi@gmail.com> References: <20250612210733.2506558-72-luca.boccassi@gmail.com> <20250630122556.1133654-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 22.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/02/25. 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/c866c4cc9a0c059367e1406177692020ab29e967 Thanks. Luca Boccassi --- >From c866c4cc9a0c059367e1406177692020ab29e967 Mon Sep 17 00:00:00 2001 From: Rakesh Kudurumalla Date: Wed, 18 Jun 2025 14:00:06 +0530 Subject: [PATCH] examples/ipsec-secgw: fix crash in event vector mode [ upstream commit 811383ef109d8dae04c0681b84de09c51f153543 ] Launching ipsec-secgw application in event vector mode after traffic has started results in segfault because we are receiving few IPSec packet and application is trying to decrypt IPsec packets using lookaside protocol. This contradicts inline event mode.This patch fixes the same by freeing IPsec packets and processing only plain packets. Fixes: 1d5078c6cf19 ("examples/ipsec-secgw: support event vector in lookaside mode") Signed-off-by: Rakesh Kudurumalla Acked-by: Akhil Goyal --- examples/ipsec-secgw/ipsec_worker.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/ipsec-secgw/ipsec_worker.c b/examples/ipsec-secgw/ipsec_worker.c index 7e4db87caf..f2380f1499 100644 --- a/examples/ipsec-secgw/ipsec_worker.c +++ b/examples/ipsec-secgw/ipsec_worker.c @@ -705,6 +705,9 @@ ipsec_ev_inbound_route_pkts(struct rte_event_vector *vec, struct rte_ipsec_session *sess; struct rte_mbuf *pkt; struct ipsec_sa *sa; + uint8_t mask = (1UL << RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO) | + (1UL << RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL); + j = ipsec_ev_route_ip_pkts(vec, rt, t); @@ -712,7 +715,7 @@ ipsec_ev_inbound_route_pkts(struct rte_event_vector *vec, for (i = 0; i < t->ipsec.num; i++) { pkt = t->ipsec.pkts[i]; sa = ipsec_mask_saptr(t->ipsec.saptr[i]); - if (unlikely(sa == NULL)) { + if (unlikely(sa == NULL) || ((1UL << sa->sessions[0].type) & mask)) { free_pkts(&pkt, 1); continue; } -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-06-30 13:21:22.288482284 +0100 +++ 0014-examples-ipsec-secgw-fix-crash-in-event-vector-mode.patch 2025-06-30 13:21:21.751057449 +0100 @@ -1 +1 @@ -From 811383ef109d8dae04c0681b84de09c51f153543 Mon Sep 17 00:00:00 2001 +From c866c4cc9a0c059367e1406177692020ab29e967 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 811383ef109d8dae04c0681b84de09c51f153543 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index e0690fc8d9..04609964cd 100644 +index 7e4db87caf..f2380f1499 100644 @@ -26 +27 @@ -@@ -700,6 +700,9 @@ ipsec_ev_inbound_route_pkts(struct rte_event_vector *vec, +@@ -705,6 +705,9 @@ ipsec_ev_inbound_route_pkts(struct rte_event_vector *vec, @@ -36 +37 @@ -@@ -707,7 +710,7 @@ ipsec_ev_inbound_route_pkts(struct rte_event_vector *vec, +@@ -712,7 +715,7 @@ ipsec_ev_inbound_route_pkts(struct rte_event_vector *vec,