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 A93FD43DF8 for ; Thu, 4 Apr 2024 11:52:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A42D3402E9; Thu, 4 Apr 2024 11:52:38 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 1065A402D8 for ; Thu, 4 Apr 2024 11:52:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712224356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JRP3q8FEbXn0QPdzavhgqyDnetNamg1z8xfDzGXr+X0=; b=JoS3qOibHy7Thvh/7pp2aD0KxURFDAs7FjLeSQ9fpNhvtiZqBKX7L7oDf/3ZVmKjYC8aZq BF/AjNpaUjOx1yhav+y6EjgPoe2aNxmRpfZhd6a+nYNHyFtAZz7GUKwnaQDb+svh8Kw9O2 7rwP7OJFliAYC46WijH1n8kD24P1K6c= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-359-RSwMtHwlP2WkHhKLxP9pVw-1; Thu, 04 Apr 2024 05:52:35 -0400 X-MC-Unique: RSwMtHwlP2WkHhKLxP9pVw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E47E738041D0; Thu, 4 Apr 2024 09:52:34 +0000 (UTC) Received: from rh.Home (unknown [10.39.192.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 458A73C21; Thu, 4 Apr 2024 09:52:34 +0000 (UTC) From: Kevin Traynor To: Bing Zhao Cc: Ori Kam , dpdk stable Subject: patch 'net/mlx5: fix age position in hairpin split' has been queued to stable release 21.11.7 Date: Thu, 4 Apr 2024 10:51:40 +0100 Message-ID: <20240404095155.155427-10-ktraynor@redhat.com> In-Reply-To: <20240404095155.155427-1-ktraynor@redhat.com> References: <20240404095155.155427-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 21.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/165b252b21bdc04bbaac67f4ad76e36f9e16cfce Thanks. Kevin --- >From 165b252b21bdc04bbaac67f4ad76e36f9e16cfce 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 6399d93b93..533cc13f2a 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -4760,4 +4760,5 @@ 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, diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index e3132995a3..1bf9517638 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -17682,6 +17682,5 @@ flow_dv_get_aged_flows(struct rte_eth_dev *dev, 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.44.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-04-04 10:49:34.249701898 +0100 +++ 0010-net-mlx5-fix-age-position-in-hairpin-split.patch 2024-04-04 10:49:33.737457703 +0100 @@ -1 +1 @@ -From 4c89815eab7471b98388dc958b95777d341f05fc Mon Sep 17 00:00:00 2001 +From 165b252b21bdc04bbaac67f4ad76e36f9e16cfce 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 6399d93b93..533cc13f2a 100644 @@ -39 +40 @@ -@@ -5400,4 +5400,5 @@ flow_hairpin_split(struct rte_eth_dev *dev, +@@ -4760,4 +4760,5 @@ flow_hairpin_split(struct rte_eth_dev *dev, @@ -46 +47 @@ -index 80239bebee..4badde1a9a 100644 +index e3132995a3..1bf9517638 100644 @@ -49 +50 @@ -@@ -19362,6 +19362,5 @@ flow_dv_get_aged_flows(struct rte_eth_dev *dev, +@@ -17682,6 +17682,5 @@ flow_dv_get_aged_flows(struct rte_eth_dev *dev,