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 DAC754624E for ; Mon, 17 Feb 2025 18:06:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4E47402BC; Mon, 17 Feb 2025 18:06:43 +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 C9CBA4025F for ; Mon, 17 Feb 2025 18:06:42 +0100 (CET) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4394036c0efso27562885e9.2 for ; Mon, 17 Feb 2025 09:06:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739812002; x=1740416802; 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=hFEv55MpEzGA7Z6XqtKu3zS+TQTB9AZQ/zTUvi/D7Hs=; b=hXQfMSNT+j1LUyPzfNqIWUMr7c70tAmfNmlM4sI0tJUdOtc3nvK9zb10eP6/xGcTCT U6ieO2UfgH52g/kA5jUZhMjIPGAm8tIert++FJ64d7IYFX9qzCrN39TBuV/gwBDIPPfy fr0UlNrnjhbL/b6cGxGDQcNTulbi1iL+sIC+8IZof4ouTA6assZ/fSOg1Kr0k/2py7Xp dMqbY/TZd9w4gWmoc48vPAVVgbRlDxoaYwjv5Ooz+j+n9OuxYlE7lIkgs+H2FraXsA+j +VgC1skCbKl7uUJf4dnVPOb69P/4cDIxsjuz6pWrdTq4GG+OsSJYGCSiv1xaNOlW2hxr G1SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739812002; x=1740416802; 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=hFEv55MpEzGA7Z6XqtKu3zS+TQTB9AZQ/zTUvi/D7Hs=; b=aCBittay4ieZLhHV33AiluPn84gVB514lXd4zqnYNUqmDVuIDxcMgjTOrK231IKfWk //h0QPzFrsttocTuNI5Ebuwsu/qIMqhlDCLdf4gKudRS9T4XcH/uhaNqyhTfInv8xoLE wzsOv6n0l4H0Clvsdn+Q0CpjCe67prHEKWyUpjemTZRlTrsU2SyPSVylos3+C3VFxNZa nMzCf5vJ3BOx6FPMOPDOxqlfHOvc/GA9+p2J2pwlP8X8UqaCmPv+j+vuKxSXAl8g/l6L /0GNmhHtg4deFvXgSL/AMvxYRJE5inw5G0OXXI9IYVQ1Lk9kC3bZDX12xYOrj8t41NQ2 IOVA== X-Forwarded-Encrypted: i=1; AJvYcCUkleLximD45ZM9xZOIlUvlhTmtpl1PULBZbpgZEHNq8wLaV4Jmt5kNaLFcsXMtaLACcX2hHdc=@dpdk.org X-Gm-Message-State: AOJu0YzEtMpwtJsA60Hv5W5LnRpDeTAKe8F/Tbt3wYsXlbloZz4UJ3PW oXtRmkwXkhoVN+S2dKXQqxjL1axA3WcNTtnQS4/sJ1tXCa4oZPeiR2BRgAPzNRgt4Q== X-Gm-Gg: ASbGncv93eMoFG/lwhVoKYQ1sNo+kA3njDCfOAMRhH7kpXrsWNiDN2SERvndGaUAnD3 KgVxCbBo6HOj4BJZSZX5fJiukiupR3TNrjUqb+VDhFO5csvlWG+e/q6z6W4relqTBs76AszDZOo 4ua0CGKtiF83ZeZ0pJSNyaznfvsKNzFZDT9y/sb2q65BoQ/CofKBAmXZJNhcFwDvghXzHgiACkS pUSyVGHTEyKo7n6YXPY2oodOL/eeTPJkQpw6X6yC/D/GbwAZIDyAFyPGAzxiP65XnWtC/MfhmFm BiN3qIUenH4fMOAghPtNxQ== X-Google-Smtp-Source: AGHT+IG8bnhonqsPt6t++6Dx35c6H2+FRkKslT2mhg+AOU9JPTJTq0LF4zEbuxfDEwfN8SRl7nsY6Q== X-Received: by 2002:a05:600c:4688:b0:439:8b19:fa92 with SMTP id 5b1f17b1804b1-4398b19fd66mr26144495e9.3.1739812001871; Mon, 17 Feb 2025 09:06:41 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:f83c:95e7:29fd:a997]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-4395cf084d5sm108428775e9.1.2025.02.17.09.06.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2025 09:06:41 -0800 (PST) From: luca.boccassi@gmail.com To: Maayan Kashani Cc: Bing Zhao , dpdk stable Subject: patch 'net/mlx5: fix GRE flow match with SWS' has been queued to stable release 22.11.8 Date: Mon, 17 Feb 2025 17:04:06 +0000 Message-ID: <20250217170456.1068278-33-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/753eeb5b3dd93a0b6bb08c98f739c4143fc72250 Thanks. Luca Boccassi --- >From 753eeb5b3dd93a0b6bb08c98f739c4143fc72250 Mon Sep 17 00:00:00 2001 From: Maayan Kashani Date: Tue, 28 Jan 2025 09:59:30 +0200 Subject: [PATCH] net/mlx5: fix GRE flow match with SWS [ upstream commit 05db99c117e36c0cd28cda8f558309efd20055da ] The previous GRE fix was meant to handle HWS behavior and changed the behavior for SWS causing degradation. After the previous fix, in case of an empty GRE match, GRE mask was initialized with protocol full mask, Instead of the empty mask with protocol mask equals zero. The current fix handles the SWS case as before the GRE fix, and HWS according to the latest fix. Also, combined common logic. Fixes: 25ab2cbba31d ("net/mlx5: fix GRE flow item translation for root table") Signed-off-by: Maayan Kashani Acked-by: Bing Zhao --- drivers/net/mlx5/mlx5_flow_dv.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 4e0ed4415f..7e9c22acb2 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -9108,23 +9108,26 @@ flow_dv_translate_item_gre(void *key, const struct rte_flow_item *item, } gre_crks_rsvd0_ver_m, gre_crks_rsvd0_ver_v; uint16_t protocol_m, protocol_v; - if (key_type & MLX5_SET_MATCHER_M) { + /* Common logic to SWS/HWS */ + if (key_type & MLX5_SET_MATCHER_M) MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol, 0xff); - if (!gre_m) - gre_m = &rte_flow_item_gre_mask; - gre_v = gre_m; - } else { + else MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol, - IPPROTO_GRE); - if (!gre_v) { - gre_v = &empty_gre; - gre_m = &empty_gre; - } else if (!gre_m) { + IPPROTO_GRE); + /* HWS mask logic only */ + if (key_type & MLX5_SET_MATCHER_HS_M) { + if (!gre_m) gre_m = &rte_flow_item_gre_mask; - } - if (key_type == MLX5_SET_MATCHER_HS_V) - gre_m = gre_v; + gre_v = gre_m; + } else if (!gre_v) { + gre_v = &empty_gre; + gre_m = &empty_gre; + } else if (!gre_m) { + gre_m = &rte_flow_item_gre_mask; } + /* SWS logic only */ + if (key_type & MLX5_SET_MATCHER_SW_M) + gre_v = gre_m; gre_crks_rsvd0_ver_m.value = rte_be_to_cpu_16(gre_m->c_rsvd0_ver); gre_crks_rsvd0_ver_v.value = rte_be_to_cpu_16(gre_v->c_rsvd0_ver); MLX5_SET(fte_match_set_misc, misc_v, gre_c_present, -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-02-17 16:13:18.041329609 +0000 +++ 0033-net-mlx5-fix-GRE-flow-match-with-SWS.patch 2025-02-17 16:13:16.834441592 +0000 @@ -1 +1 @@ -From 05db99c117e36c0cd28cda8f558309efd20055da Mon Sep 17 00:00:00 2001 +From 753eeb5b3dd93a0b6bb08c98f739c4143fc72250 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 05db99c117e36c0cd28cda8f558309efd20055da ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -27 +28 @@ -index 41ebe0b61a..633c41e358 100644 +index 4e0ed4415f..7e9c22acb2 100644 @@ -30 +31 @@ -@@ -9839,23 +9839,26 @@ flow_dv_translate_item_gre(void *key, const struct rte_flow_item *item, +@@ -9108,23 +9108,26 @@ flow_dv_translate_item_gre(void *key, const struct rte_flow_item *item,