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 51CCB4624E for ; Mon, 17 Feb 2025 18:08:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 47ADF402D5; Mon, 17 Feb 2025 18:08:22 +0100 (CET) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mails.dpdk.org (Postfix) with ESMTP id 8065C402D5 for ; Mon, 17 Feb 2025 18:08:21 +0100 (CET) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-43971025798so12208555e9.1 for ; Mon, 17 Feb 2025 09:08:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739812101; x=1740416901; 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=9qZOuYiVjUUef+SFrFhZgC8UsIr+oG22RL6JPmHySOg=; b=A2W28NUL96gai+BOfiiST5EN+HVh+4ElUzKHtNQdi4yXp6+CJj0NLsnaRCbnt0Pmpc pXHptto0I890hoSbcDQz2ySGjVl/YxIFkHdYk29TH4uGHGTmBWXUC+gO/R3eC0bBlONk YQqWcPv6wtZvCSAVWwSsFaHrQBPLEP5e/9OOF9WQB6WCoLtfBeoS48UIhCE26JIrGNgM R+l564t46MLvyWeOMWEbJQqgbFW5FvzKUKecMzWaCKf6fjxfYthgpsszfHj2aTNM02CJ dfZyI/SK/VjG99ZjPEz1c6Puc/1a8dxAEbezXZsC8PltcXkgvcepFxLdzjtjcUATi1IN mdlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739812101; x=1740416901; 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=9qZOuYiVjUUef+SFrFhZgC8UsIr+oG22RL6JPmHySOg=; b=Gg7DodT6RK7nirjAsVze+3eh/E5XmvCSOUvOHysbZi/LqnoB0eukrXjffpGHq7OhO1 uZriXPfNdrpDUh0enRHaOnPykGIeBQfgjM7S1W4U32Y3FWnZFM/Fh9faTBzY7BZmn1ch ScAkQ6j2DNtRivtPfvigPoNCKBnzWseMH81Ferk1NYparWvi8vg89M6VJlNtb1SmpPpm P+k9qAMRHtUOb2ZtNaNGZgmgw68PU+KfFI5QccTmq6iD6KR7aoBRxFNF7tgstm7HFbyM vo03pMPaSx3xMr+d/08PJtBjt4tPLAQazS0tA3vj8toFcgl4ic5cKE3f54ZqZ0aWSVDY Be2Q== X-Forwarded-Encrypted: i=1; AJvYcCWy+X23SrmIo5yvs6SNVwXPvjQGzERipG86XFclT+7ULa3e8+gYwp2SdkBc3WHKsJvelfdx/Bw=@dpdk.org X-Gm-Message-State: AOJu0YyPvT1S6C0udnUS+muKFHuSeaayok/GSNfZgOvokmOuh0Ucgsxk FOg4SaiPrLFxVDOQCLt+7XdnMQz1pqMZiiUK+Fsd6G85eQEnbS91 X-Gm-Gg: ASbGncuSu62jI8z76Yn2yJfTUJ6P1cfvdpqbnU4ldXslGetWzx0iA+BZA60yUFlHFHi QWAPXWPGsP6aJ/K0LdvmflG/30rkPHe/IZlaNKM9bT/l1rOim9oAGb5MRaguYshRXodB0+1QLHE j+fQ+XZp9N+riuS7Qy43hxUeD+Ng1ZFS9MrSfS4+OCddQuUGq0IAfmfjRMNmyeJBQI71knDSVS0 sfZzW68o16rc19eCVVWC57UY4nSOoEqFnDOxOs5CUZFkRdAhh4nTLZxMFRfIMEuRUcoVh2l9paP kwu8HwaJngu9noPVJf0qig== X-Google-Smtp-Source: AGHT+IHdNhuWkUys7yEbf5orqw4/cThEIuuEbyESvo/5XE0ii1h2WWQltjDr41PnyROsKDolkoWwYA== X-Received: by 2002:a05:600c:458b:b0:439:34d3:63dd with SMTP id 5b1f17b1804b1-4396e6c5d58mr94909365e9.7.1739812100963; Mon, 17 Feb 2025 09:08:20 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:f83c:95e7:29fd:a997]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-4395a06d22csm158310875e9.22.2025.02.17.09.08.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2025 09:08:20 -0800 (PST) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: Bruce Richardson , dpdk stable Subject: patch 'net/i40e: remove duplicate code' has been queued to stable release 22.11.8 Date: Mon, 17 Feb 2025 17:04:37 +0000 Message-ID: <20250217170456.1068278-64-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250217170456.1068278-1-luca.boccassi@gmail.com> References: <20250217170456.1068278-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.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/19/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/af5c1efdef046a38adadeeb0ce3b72d32e491253 Thanks. Luca Boccassi --- >From af5c1efdef046a38adadeeb0ce3b72d32e491253 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 5 Feb 2025 08:23:06 -0800 Subject: [PATCH] net/i40e: remove duplicate code [ upstream commit 8c085f702ac3074d20e51ee691b0bc967919c43e ] There are two branches in the cascading if/else that have same condition and code; remove one. Update the code to follow DPDK style where all statements in if should have brackets if any leg requires them. Link: https://pvs-studio.com/en/blog/posts/cpp/1183/ Fixes: 2ab5c84605f0 ("net/i40e: fix ESP flow creation") Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson --- drivers/net/i40e/i40e_fdir.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index afcaa593eb..1f48a63323 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -599,18 +599,16 @@ i40e_flow_fdir_fill_eth_ip_head(struct i40e_pf *pf, } else if (cus_pctype->index == I40E_CUSTOMIZED_ESP_IPV4_UDP) { len = fill_ip4_head(fdir_input, raw_pkt, IPPROTO_UDP, len, ether_type); - } else if (cus_pctype->index == I40E_CUSTOMIZED_ESP_IPV4_UDP) { - len = fill_ip4_head(fdir_input, raw_pkt, IPPROTO_UDP, - len, ether_type); - } else if (cus_pctype->index == I40E_CUSTOMIZED_ESP_IPV6) + } else if (cus_pctype->index == I40E_CUSTOMIZED_ESP_IPV6) { len = fill_ip6_head(fdir_input, raw_pkt, IPPROTO_ESP, len, ether_type); - else if (cus_pctype->index == I40E_CUSTOMIZED_ESP_IPV6_UDP) + } else if (cus_pctype->index == I40E_CUSTOMIZED_ESP_IPV6_UDP) { len = fill_ip6_head(fdir_input, raw_pkt, IPPROTO_UDP, len, ether_type); - else if (cus_pctype->index == I40E_CUSTOMIZED_IPV6_L2TPV3) + } else if (cus_pctype->index == I40E_CUSTOMIZED_IPV6_L2TPV3) { len = fill_ip6_head(fdir_input, raw_pkt, IPPROTO_L2TP, len, ether_type); + } } else { PMD_DRV_LOG(ERR, "unknown pctype %u.", fdir_input->pctype); return -1; -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-02-17 16:13:19.097732625 +0000 +++ 0064-net-i40e-remove-duplicate-code.patch 2025-02-17 16:13:16.862441592 +0000 @@ -1 +1 @@ -From 8c085f702ac3074d20e51ee691b0bc967919c43e Mon Sep 17 00:00:00 2001 +From af5c1efdef046a38adadeeb0ce3b72d32e491253 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8c085f702ac3074d20e51ee691b0bc967919c43e ] + @@ -17 +19 @@ - drivers/net/intel/i40e/i40e_fdir.c | 10 ++++------ + drivers/net/i40e/i40e_fdir.c | 10 ++++------ @@ -20,4 +22,4 @@ -diff --git a/drivers/net/intel/i40e/i40e_fdir.c b/drivers/net/intel/i40e/i40e_fdir.c -index 349627a2ed..94e3ab44e3 100644 ---- a/drivers/net/intel/i40e/i40e_fdir.c -+++ b/drivers/net/intel/i40e/i40e_fdir.c +diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c +index afcaa593eb..1f48a63323 100644 +--- a/drivers/net/i40e/i40e_fdir.c ++++ b/drivers/net/i40e/i40e_fdir.c