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 6646E43C60 for ; Thu, 7 Mar 2024 02:35:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 603BE42EE3; Thu, 7 Mar 2024 02:35:04 +0100 (CET) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mails.dpdk.org (Postfix) with ESMTP id 0A45042EED for ; Thu, 7 Mar 2024 02:35:03 +0100 (CET) Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-33d118a181fso151039f8f.1 for ; Wed, 06 Mar 2024 17:35:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709775302; x=1710380102; 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=gVHtpwC0j/st4S4DfntuOPBRPiABYEuo0I0N0PPfkRc=; b=Dp6GjLQtYzh7Ld6sMW7CVvoxDnKD1jFanZczC6DF4yssfbNUNiJuewfeh3OQ2D9kab 8gUa93J8fUlufSVLFO6Q6zp8Tlf1xvQrUguR4wjxy6WT4rXcYyi/eFbufWv8ThyS0kmy w9NAkcBzmbrpnUVhuU8wenQEREMKpYGeFxv3uZxSzZ+yHulk6HH22q6babhngPf+tKN/ Pzbr7HSnvOWzqzcR9x8ex7Bojb9X86zsGkW7/YH38IhalSH5Suo434R/NRu4l/q4yJkJ QeXTTVGK15kNWDu/MXLmtJEdcjfkafLv6eypywzJRTyfJf9Wxkw8w/ixuDZwYmosNCHO 1l3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709775302; x=1710380102; 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=gVHtpwC0j/st4S4DfntuOPBRPiABYEuo0I0N0PPfkRc=; b=mRbd0qGiTkoApxe2Vwp1oicgrxL/oMZsnjFh32YIBJp017Ugx0Dm6mVyStpkgRpPF5 GuDiRgF1h4zdF0sX/NPeLxKZgeevaEdlHe86rdVeMQPqQO3YTjKVaEMx2+CJ6xIPB/XV BMZ6AI//03mumQnGCaXJKy0Dy6kEjWer0UBl5eZdWswv0Pg+XUZqGsCpRW5W2orfe2sy hxYfTMljB7RPoOrc1j9Hqkz7/8WdslzKJ82p0Owy6viHJAKWP9yfEQVvnBhro0DMbALf VK0nDGWjb1HT+zHstw4N+nnZFAX2AK1bOh/vOOGMu8hSr9+sXIms3XxlCGgJXJYW0+42 sJpw== X-Forwarded-Encrypted: i=1; AJvYcCV9icO53kCDK1rI/euOaS7Yh6L3eZVnn9QWMq2UcJVh4qOduUBBJZLRkGyBI+QVjH3hHON84e3WTAUpgsTnSPA= X-Gm-Message-State: AOJu0YxV9vQoG9c4IM1XoTXGgmP5W9a7aO+4ounqcGb/oJxYO+dcCJJu 52dJ9rQqidv2byzouOLNw33FeOWM8lKTttYqxlr3UoS8hsHq34KO X-Google-Smtp-Source: AGHT+IEa/93q/nbiSC4HgP8PXLEGNvWrj7veM/GAWUidqGA7gXf/D3JYiSlwxV8A7gF2f+5IAf12hg== X-Received: by 2002:adf:ed02:0:b0:33e:867:b288 with SMTP id a2-20020adfed02000000b0033e0867b288mr11099137wro.63.1709775302611; Wed, 06 Mar 2024 17:35:02 -0800 (PST) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id u11-20020a056000038b00b0033e456848f4sm7385412wrf.82.2024.03.06.17.35.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 17:35:02 -0800 (PST) From: luca.boccassi@gmail.com To: Anoob Joseph Cc: Konstantin Ananyev , Akhil Goyal , dpdk stable Subject: patch 'examples/ipsec-secgw: fix width of variables' has been queued to stable release 22.11.5 Date: Thu, 7 Mar 2024 01:31:07 +0000 Message-Id: <20240307013159.1735343-50-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240307013159.1735343-1-luca.boccassi@gmail.com> References: <20240307013159.1735343-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.5 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/09/24. 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/c5db2d6897f145cd812f8586e4d2b33899f797c5 Thanks. Luca Boccassi --- >From c5db2d6897f145cd812f8586e4d2b33899f797c5 Mon Sep 17 00:00:00 2001 From: Anoob Joseph Date: Tue, 19 Dec 2023 10:59:22 +0530 Subject: [PATCH] examples/ipsec-secgw: fix width of variables [ upstream commit 6b9dabfdffee7ff1efa83e9548b4063fab0819c5 ] 'rte_eth_rx_burst' returns uint16_t. The same value need to be passed to 'process_packets' functions which performs further processing. Having this function use 'uint8_t' can result in issues when MAX_PKT_BURST is larger. The route functions (route4_pkts & route6_pkts) take uint8_t as the argument. The caller can pass larger values as the field that is passed is of type uint32_t. And the function can work with uint32_t as it loops through the packets and sends it out. Using uint8_t can result in silent packet drops. Fixes: 4fbfa6c7c921 ("examples/ipsec-secgw: update eth header during route lookup") Signed-off-by: Anoob Joseph Acked-by: Konstantin Ananyev Acked-by: Akhil Goyal --- examples/ipsec-secgw/ipsec-secgw.c | 5 ++--- examples/ipsec-secgw/ipsec_worker.h | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index 82a4916fb2..86ad2b0ea5 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -568,7 +568,7 @@ process_pkts_outbound_nosp(struct ipsec_ctx *ipsec_ctx, static inline void process_pkts(struct lcore_conf *qconf, struct rte_mbuf **pkts, - uint8_t nb_pkts, uint16_t portid, struct rte_security_ctx *ctx) + uint16_t nb_pkts, uint16_t portid, struct rte_security_ctx *ctx) { struct ipsec_traffic traffic; @@ -695,8 +695,7 @@ ipsec_poll_mode_worker(void) struct rte_mbuf *pkts[MAX_PKT_BURST]; uint32_t lcore_id; uint64_t prev_tsc, diff_tsc, cur_tsc; - int32_t i, nb_rx; - uint16_t portid; + uint16_t i, nb_rx, portid; uint8_t queueid; struct lcore_conf *qconf; int32_t rc, socket_id; diff --git a/examples/ipsec-secgw/ipsec_worker.h b/examples/ipsec-secgw/ipsec_worker.h index d5a68d91fa..93e5470962 100644 --- a/examples/ipsec-secgw/ipsec_worker.h +++ b/examples/ipsec-secgw/ipsec_worker.h @@ -472,7 +472,7 @@ fail: static __rte_always_inline void route4_pkts(struct rt_ctx *rt_ctx, struct rte_mbuf *pkts[], - uint8_t nb_pkts, uint64_t tx_offloads, bool ip_cksum) + uint32_t nb_pkts, uint64_t tx_offloads, bool ip_cksum) { uint32_t hop[MAX_PKT_BURST * 2]; uint32_t dst_ip[MAX_PKT_BURST * 2]; @@ -560,7 +560,7 @@ route4_pkts(struct rt_ctx *rt_ctx, struct rte_mbuf *pkts[], } static __rte_always_inline void -route6_pkts(struct rt_ctx *rt_ctx, struct rte_mbuf *pkts[], uint8_t nb_pkts) +route6_pkts(struct rt_ctx *rt_ctx, struct rte_mbuf *pkts[], uint32_t nb_pkts) { int32_t hop[MAX_PKT_BURST * 2]; uint8_t dst_ip[MAX_PKT_BURST * 2][16]; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-07 01:05:39.178597986 +0000 +++ 0050-examples-ipsec-secgw-fix-width-of-variables.patch 2024-03-07 01:05:34.798940017 +0000 @@ -1 +1 @@ -From 6b9dabfdffee7ff1efa83e9548b4063fab0819c5 Mon Sep 17 00:00:00 2001 +From c5db2d6897f145cd812f8586e4d2b33899f797c5 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 6b9dabfdffee7ff1efa83e9548b4063fab0819c5 ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -29 +30 @@ -index bf98d2618b..a61bea400a 100644 +index 82a4916fb2..86ad2b0ea5 100644 @@ -36,2 +37,2 @@ -- uint8_t nb_pkts, uint16_t portid, void *ctx) -+ uint16_t nb_pkts, uint16_t portid, void *ctx) +- uint8_t nb_pkts, uint16_t portid, struct rte_security_ctx *ctx) ++ uint16_t nb_pkts, uint16_t portid, struct rte_security_ctx *ctx) @@ -52 +53 @@ -index ac980b8bcf..8e937fda3e 100644 +index d5a68d91fa..93e5470962 100644 @@ -55 +56 @@ -@@ -469,7 +469,7 @@ fail: +@@ -472,7 +472,7 @@ fail: @@ -64 +65 @@ -@@ -557,7 +557,7 @@ route4_pkts(struct rt_ctx *rt_ctx, struct rte_mbuf *pkts[], +@@ -560,7 +560,7 @@ route4_pkts(struct rt_ctx *rt_ctx, struct rte_mbuf *pkts[],