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 74D6C468E4 for ; Thu, 12 Jun 2025 23:10:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6E9D742E56; Thu, 12 Jun 2025 23:10:19 +0200 (CEST) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mails.dpdk.org (Postfix) with ESMTP id 60A7542E54 for ; Thu, 12 Jun 2025 23:10:18 +0200 (CEST) Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-3a5096158dcso1258763f8f.1 for ; Thu, 12 Jun 2025 14:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1749762618; x=1750367418; 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=9IwE5kSxyIVHh+rEbayh20j2UzMP5koYyruA6L0zWVE=; b=co4Ga9CMLDz0KjwDFfSlfN7JtqK7tXdCxKqGWPn08p/EzolKvCwzum4jz0dw6c0xpg /i19yNFfo7VN7SfgNItKZlkguuQRdtLxmlNLQOM+wHrvwO8Z11OHae3VmW7FjOtcO4Es yX8hMUHWeVKcPX0e7VPyRzGDr9ouF5B0ZAzqs94F8v+0a7JtPwzcIqDIXZHob6B9GwLk /P1jvHjDsIPfJeRMYlHdAhBuKm5y9Dwv1fDqAir/HKw782E+tsxVGXnGr6OAVXshTMuf Qt22YStD67sxJm+o6U2aWqysWEPse6fg++hwLh7VzjqeLO0yV/WzzzqxLhmdyji3qzq2 OQhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749762618; x=1750367418; 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=9IwE5kSxyIVHh+rEbayh20j2UzMP5koYyruA6L0zWVE=; b=HNTrvor/s0KD/DyIj8mbE8bz4q+pQSoKJWLuBE877Fg88eLPmLL8ITQp171zw3SDAR QiNnxtcLl5aMMgL8LTN31CCPDOWEZ6nyTccMpv9m2G6TtZis/6c/hfF25MjX1zF/LF6c S9hUqIYiPURn7MOLroaYFD+2Koznbx9uOiCpRZtrlDZmoOszjTcgGEbfwVEfyRA5LCf3 taElNLujmo8Bo4iF4JAr6kGHHR07yBDQBYHrmaryo6x0i0VrEqLc/9BdXbDAJGO+gs4t Z6uHcr5JUlucFhJ2OhvHg0kDMSlsrjusDAvcwF7Ma9A2e9OTNwUuD8z6rlL+gwNv8+f3 KkAg== X-Forwarded-Encrypted: i=1; AJvYcCXwAX2kpslOk5csrGWXnO92SO9p6vFo4x0kJigYL/a2IKMOE/oWZ1F3YKOldyStsrfVecCV+BM=@dpdk.org X-Gm-Message-State: AOJu0YwqbjIRvQAJjh8xIKnQUB4JtuFw23B5mSqvkm/m5ffiVKcculj+ qdUi3/O0dqJvdAb46PmsYu6IAZbSCDGT28im0woAcq75z5LZPAN3YWMD X-Gm-Gg: ASbGncszK2VHK5ErlGS+J3jqe4RqSKofxaaIdTGEI6QSJe8AC0/QWJ18x5ToLLpoK6p 7r4THdqnlA4+c7H6131QJuiE0rqnKUDTUEFaRTyoSP00x/JBEHWaiDS2tlIluuz12IMGl7kgIvX CwKNBjMUtFAjvG1nkRCnaGJvPuugkzUEiJoZhFDVn+V/OvyJYVC+Y9SzArd44XCagVclPhdno+M /Iul58G0pYsDM08/0wTaQ13HxvLayhnRonwLgiBOEY+ll+bC7DIMCymQityuAsUwxlfW5xP5nij yC23hJPcwP1xWvq7urOAmAYjiJLC52+gYzBaevsBtEJzXkxd1wokpMf2bqAU2DSNkB1z X-Google-Smtp-Source: AGHT+IETzhux+cbGkuZKpYFbGSQ4NfmlgxLRU5QedK1xAqBWIgxGSBZZkGMfK0MNMzmEX7zbVhfKjQ== X-Received: by 2002:a5d:64c5:0:b0:3a5:24a9:a5d3 with SMTP id ffacd0b85a97d-3a5686f510emr564095f8f.17.1749762617783; Thu, 12 Jun 2025 14:10:17 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:f2df:571a:ae4c:bef2]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-3a568b2b113sm365836f8f.75.2025.06.12.14.10.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jun 2025 14:10:17 -0700 (PDT) From: luca.boccassi@gmail.com To: Satheesh Paul Cc: Kiran Kumar K , dpdk stable Subject: patch 'common/cnxk: fix E-tag pattern parsing' has been queued to stable release 22.11.9 Date: Thu, 12 Jun 2025 22:07:06 +0100 Message-ID: <20250612210733.2506558-49-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250612210733.2506558-1-luca.boccassi@gmail.com> References: <20250612210733.2506558-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 06/14/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/6545751f4d31b383a9e352d0a0b277ded2e00728 Thanks. Luca Boccassi --- >From 6545751f4d31b383a9e352d0a0b277ded2e00728 Mon Sep 17 00:00:00 2001 From: Satheesh Paul Date: Thu, 22 May 2025 15:41:16 +0530 Subject: [PATCH] common/cnxk: fix E-tag pattern parsing [ upstream commit a610e32b96768b84436ba523bc97af88df4d6963 ] E-tag pattern parsing was using wrong length leading to a segfault. Fixing this by using the correct length of the pattern item. Fixes: c34ea71b878d ("common/cnxk: add NPC parsing API") Signed-off-by: Satheesh Paul Reviewed-by: Kiran Kumar K --- drivers/common/cnxk/roc_npc.c | 5 +++-- drivers/common/cnxk/roc_npc_parse.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c index a5b5f95dec..a6b62074f0 100644 --- a/drivers/common/cnxk/roc_npc.c +++ b/drivers/common/cnxk/roc_npc.c @@ -712,10 +712,11 @@ npc_parse_pattern(struct npc *npc, const struct roc_npc_item_info pattern[], pst->mcam_data = (uint8_t *)flow->mcam_data; pst->mcam_mask = (uint8_t *)flow->mcam_mask; - while (pattern->type != ROC_NPC_ITEM_TYPE_END && - layer < PLT_DIM(parse_stage_funcs)) { + while (pattern->type != ROC_NPC_ITEM_TYPE_END && layer < PLT_DIM(parse_stage_funcs)) { /* Skip place-holders */ pattern = npc_parse_skip_void_and_any_items(pattern); + if (pattern->type == ROC_NPC_ITEM_TYPE_END) + break; pst->pattern = pattern; rc = parse_stage_funcs[layer](pst); diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c index ce66d2a7d8..79fc7b3bf6 100644 --- a/drivers/common/cnxk/roc_npc_parse.c +++ b/drivers/common/cnxk/roc_npc_parse.c @@ -453,6 +453,7 @@ npc_parse_lb(struct npc_parse_state *pst) */ lt = NPC_LT_LB_ETAG; lflags = 0; + info.len = pattern->size; last_pattern = pst->pattern; pattern = npc_parse_skip_void_and_any_items(pst->pattern + 1); @@ -467,7 +468,6 @@ npc_parse_lb(struct npc_parse_state *pst) lflags = NPC_F_ETAG_CTAG; last_pattern = pattern; } - info.len = pattern->size; } else if (pst->pattern->type == ROC_NPC_ITEM_TYPE_QINQ) { info.hw_mask = NULL; info.len = pattern->size; -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-06-12 22:06:25.675737255 +0100 +++ 0049-common-cnxk-fix-E-tag-pattern-parsing.patch 2025-06-12 22:06:23.878044807 +0100 @@ -1 +1 @@ -From a610e32b96768b84436ba523bc97af88df4d6963 Mon Sep 17 00:00:00 2001 +From 6545751f4d31b383a9e352d0a0b277ded2e00728 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a610e32b96768b84436ba523bc97af88df4d6963 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 1f2461e026..50106b8773 100644 +index a5b5f95dec..a6b62074f0 100644 @@ -24 +25 @@ -@@ -995,10 +995,11 @@ npc_parse_pattern(struct npc *npc, const struct roc_npc_item_info pattern[], +@@ -712,10 +712,11 @@ npc_parse_pattern(struct npc *npc, const struct roc_npc_item_info pattern[], @@ -39 +40 @@ -index b52024f434..37b43995db 100644 +index ce66d2a7d8..79fc7b3bf6 100644 @@ -42 +43 @@ -@@ -531,6 +531,7 @@ npc_parse_lb(struct npc_parse_state *pst) +@@ -453,6 +453,7 @@ npc_parse_lb(struct npc_parse_state *pst) @@ -50 +51 @@ -@@ -545,7 +546,6 @@ npc_parse_lb(struct npc_parse_state *pst) +@@ -467,7 +468,6 @@ npc_parse_lb(struct npc_parse_state *pst)