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 E742743CE7 for ; Mon, 18 Mar 2024 16:40:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE268402B8; Mon, 18 Mar 2024 16:40:42 +0100 (CET) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by mails.dpdk.org (Postfix) with ESMTP id 79EDA40289 for ; Mon, 18 Mar 2024 16:40:40 +0100 (CET) Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4140aadfe2eso12126835e9.1 for ; Mon, 18 Mar 2024 08:40:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710776440; x=1711381240; 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=3kzQNAP8ePswacoRVWZhetBckLja9EQ8SQKwPxtSiMk=; b=Pw3PuuSXTUg96+tvnTIzBSYaRuz0/Tw+M9m2Xuy2/ejbBDjnujCBIi0/2qhOu8WrtA xHK/gdUx+fbFoF+u8BzuKE30PoOj3mJfSN/J/Lr751qjUAOwsQMmdCzdiPtdkNdJ2PLI yDcL+oKLX9QNwJ08IMcjpaqy5nbLturK24AgeTUx7uw4wFLhXl5tBeGTllVPMbG3eQvT zcc9khU2Zp35WMk1hMJbwSxqzpEG4NW0jSRUKHyaBoMpbyCxO0Ca7hkzdO5GJ1OVfqEh t0zu6zrnm9YlYqLD+i4gGfS/S9mIUcILf/aqiiWmD8lT8Y2IqCkMJQm6j9Il26bzTB+p Q2Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710776440; x=1711381240; 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=3kzQNAP8ePswacoRVWZhetBckLja9EQ8SQKwPxtSiMk=; b=u8eCGFQu0TJw08tpSyh8UJDltKPx2a3/WsofFUgVImnGKl0jkTnfj61BAJ+O2xBI+E rtd8mEkfKq1ENZhcCw7AcNRD/O8e7+8JndPKDuclYPRtk3j8bFh10pJaA95ZxTDdiCZT C+tCV6CocLYgUwKWP0uw0qO/PcX1c0kbVycf3+H/WKH+1Wj1jgpxOBSJtnPrZ9iDj6lV f83oW3FsTxXSOiCrGI4TEUG8WLRTQo/EQBl2ac+qPRWEgH8dgD79vy1dmOY3YNldyca1 wUXPyJqKKEHHK/SYvCNXrK/Vgk27Y2bW1AefnZclQ/4kdsBshNdhJpfNTLJuYPrSL5Hd TMVg== X-Forwarded-Encrypted: i=1; AJvYcCWPc2NkTO4+9rmgJkVhh+f7cKYEeWlzdy9GwTZKFkMXlSkhypDiEIGoUJF3gWMidI7FCt+2MmaiCESxuVUbf6s= X-Gm-Message-State: AOJu0Yz4rxb+/vA6R0ePvG4lHgU2Inpa80ZRG1Xz/Doi8XxhokdR5xfF FE54bz/UAE/W20d2I/vG8d1rce9yAHkOoW27Dq8xvEXNnsusr5s2 X-Google-Smtp-Source: AGHT+IH2SBOsHqgmBf1Ng3leJgIjqr6gljXms0c9Ir/pTAOENpDVypqlZgojyFndjAQmOBD2KyHpcw== X-Received: by 2002:a05:600c:548d:b0:413:fff2:f40d with SMTP id iv13-20020a05600c548d00b00413fff2f40dmr7885258wmb.31.1710776440033; Mon, 18 Mar 2024 08:40:40 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id q13-20020a05600c46cd00b00412e5f32591sm14989292wmo.28.2024.03.18.08.40.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 08:40:39 -0700 (PDT) From: luca.boccassi@gmail.com To: Bing Zhao Cc: Ori Kam , dpdk stable Subject: patch 'net/mlx5: fix age position in hairpin split' has been queued to stable release 22.11.5 Date: Mon, 18 Mar 2024 15:39:14 +0000 Message-Id: <20240318153919.3407921-24-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240318153919.3407921-1-luca.boccassi@gmail.com> References: <20240314000957.2810803-61-luca.boccassi@gmail.com> <20240318153919.3407921-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/20/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/0ddc41f5c64f3f473f562d8bea8a5b8a68b05a32 Thanks. Luca Boccassi --- >From 0ddc41f5c64f3f473f562d8bea8a5b8a68b05a32 Mon Sep 17 00:00:00 2001 From: Bing Zhao Date: Thu, 7 Mar 2024 10:09:24 +0200 Subject: [PATCH] net/mlx5: fix age position in hairpin split [ upstream commit 4c89815eab7471b98388dc958b95777d341f05fc ] When splitting a hairpin rule implicitly, the count action will be on either Tx or Rx subflow based on the encapsulation checking. Once there is a flow rule with both count and age action, one counter will be reused. If there is only age action and the ASO flow hit is supported, the flow hit will be chosen instead of a counter. In the previous flow splitting, the age would always be in the Rx part, while the count would be on the Tx part when there is an encap. Before this commit, 2 issues can be observed with a hairpin split: 1. On the root table, one counter was used on both Rx and Tx parts for age and count actions. Then one ingress packet will be counted twice. 2. On the non-root table, an extra ASO flow hit was used on the Rx part. This would cause some overhead. The age and count actions should be in the same subflow instead of 2. Fixes: daed4b6e3db2 ("net/mlx5: use aging by counter when counter exists") Signed-off-by: Bing Zhao Acked-by: Ori Kam --- drivers/net/mlx5/mlx5_flow.c | 1 + drivers/net/mlx5/mlx5_flow_dv.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 89c98f95f9..1e8d9ac978 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -5135,6 +5135,7 @@ flow_hairpin_split(struct rte_eth_dev *dev, } break; case RTE_FLOW_ACTION_TYPE_COUNT: + case RTE_FLOW_ACTION_TYPE_AGE: if (encap) { rte_memcpy(actions_tx, actions, sizeof(struct rte_flow_action)); diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 68d3ee0c36..85dcc399c2 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -18585,8 +18585,7 @@ flow_dv_get_aged_flows(struct rte_eth_dev *dev, LIST_FOREACH(act, &age_info->aged_aso, next) { nb_flows++; if (nb_contexts) { - context[nb_flows - 1] = - act->age_params.context; + context[nb_flows - 1] = act->age_params.context; if (!(--nb_contexts)) break; } -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-18 12:58:40.319119761 +0000 +++ 0024-net-mlx5-fix-age-position-in-hairpin-split.patch 2024-03-18 12:58:39.251348516 +0000 @@ -1 +1 @@ -From 4c89815eab7471b98388dc958b95777d341f05fc Mon Sep 17 00:00:00 2001 +From 0ddc41f5c64f3f473f562d8bea8a5b8a68b05a32 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4c89815eab7471b98388dc958b95777d341f05fc ] + @@ -26 +27,0 @@ -Cc: stable@dpdk.org @@ -36 +37 @@ -index 6484874c35..f31fdfbf3d 100644 +index 89c98f95f9..1e8d9ac978 100644 @@ -39 +40 @@ -@@ -5399,6 +5399,7 @@ flow_hairpin_split(struct rte_eth_dev *dev, +@@ -5135,6 +5135,7 @@ flow_hairpin_split(struct rte_eth_dev *dev, @@ -48 +49 @@ -index 80239bebee..4badde1a9a 100644 +index 68d3ee0c36..85dcc399c2 100644 @@ -51 +52 @@ -@@ -19361,8 +19361,7 @@ flow_dv_get_aged_flows(struct rte_eth_dev *dev, +@@ -18585,8 +18585,7 @@ flow_dv_get_aged_flows(struct rte_eth_dev *dev,