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 CA0E0A0524 for ; Fri, 5 Feb 2021 12:37:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C21A34067B; Fri, 5 Feb 2021 12:37:21 +0100 (CET) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mails.dpdk.org (Postfix) with ESMTP id E96FC4067B for ; Fri, 5 Feb 2021 12:37:20 +0100 (CET) Received: by mail-wr1-f48.google.com with SMTP id m13so7282375wro.12 for ; Fri, 05 Feb 2021 03:37:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EmFwSrx03IV4RbbOvKaAMeap+4+KAd5OdzwIWYag2RA=; b=RItrsvXxQ91nhN9cl5vgAn3+A+IrCRs68duyvlr/hi6LlJolY1fg/2t4D7mXT1WW5Q +1wUW7IGOmoYIGRf2IzsRgN1amPzpW61d+CLBniNYXdMzgE7FpGdBjZUvJWuZi1wsaZX PhG45nRaSWAXP+6yXvatnvCQvtGMrBc7lVnYY5GY5lNPK263lhByRF0HpEvBuTN2ZFdv /vToaJyN7TOk+B8FZijsrtPUZcAiuGFdf78MPSagVgATHG2DT1FmQIFzDSo+9re4Wjwq ChGE7YnfEvtaZ/Lj4ZfRb4gAUvSx/2OidPnsqE+HATHCbnuR2ZEinyjcrWtcNn69B2aG +Awg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EmFwSrx03IV4RbbOvKaAMeap+4+KAd5OdzwIWYag2RA=; b=XAy0x8RHG9HLECcZ1PeKdPK666rMJurmiXnEsSjRXe6CKrZFS6atfSn4oTFqehN8ac GaG4ADuQD7gQsv9rHT/IkX16aOfwSe+5HEBUNQ8TiWerqn036p74XByLJkY95KZjKryF sXur8RpFceMYcowKFZDZIoFbRyrKmsn0Dh7E4LIsssAyU29mBnPf0uLXJq5/gDPzugYK 6AVoTOtIE9SFWNuOCFUWah8OA2uvQxYLBixXokmaX06RpKZEFuHHAnXfvsglHhD1j7Ez BPrJa2yxEZq0SyzxAmESw2wZOXnuAjElJRaZwIgeCGidc9MW6olQoJY/0QoYGVF3eDCj UQNQ== X-Gm-Message-State: AOAM530eqD+xYm3cJ1I2hGYalK2sV8mmw2xWivnjrtT4O+r7vIsI3fyz rZHtATI95h89feqNyLRylC8= X-Google-Smtp-Source: ABdhPJwtR8mcfM9YeVl7UclIJ6ZkOSLkRTl8CvOz27iCU4NrMX63B9mzV36uz4yoHUZGPbQoIAie/A== X-Received: by 2002:a05:6000:2aa:: with SMTP id l10mr4540044wry.368.1612525040706; Fri, 05 Feb 2021 03:37:20 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id f4sm11823841wrs.34.2021.02.05.03.37.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:37:20 -0800 (PST) From: luca.boccassi@gmail.com To: Dekel Peled Cc: Matan Azrad , dpdk stable Date: Fri, 5 Feb 2021 11:18:32 +0000 Message-Id: <20210205111920.1272063-226-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix flow split combined with age action' has been queued to stable release 20.11.1 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.1 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/07/21. 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/d4336647554aa4cd22583d40219afdd9d8be10e2 Thanks. Luca Boccassi --- >From d4336647554aa4cd22583d40219afdd9d8be10e2 Mon Sep 17 00:00:00 2001 From: Dekel Peled Date: Sun, 17 Jan 2021 11:40:45 +0200 Subject: [PATCH] net/mlx5: fix flow split combined with age action [ upstream commit 14ccfd2ed1686fa6bb42117b0461be278816eca6 ] Currently, for a flow containing an age action, if flow is split to sub-flows, a new age action will be created for each sub-flow. However only the action created for the last sub-flow will be queried on flow query and cleared on flow removal. This behavior is wrong, causing a leak of resources. Need to create just one action per flow, and use it for all sub-flows. This patch adds the required check to make sure an age action is created just once per flow, and used by all sub-flows. Fixes: f935ed4b645a ("net/mlx5: support flow hit action for aging") Signed-off-by: Dekel Peled Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow_dv.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index ab9aaab4ec..ae836c6a52 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -9897,14 +9897,22 @@ flow_dv_translate(struct rte_eth_dev *dev, break; case RTE_FLOW_ACTION_TYPE_AGE: if (priv->sh->flow_hit_aso_en && attr->group) { - flow->age = flow_dv_translate_create_aso_age - (dev, action->conf, error); - if (!flow->age) - return rte_flow_error_set + /* + * Create one shared age action, to be used + * by all sub-flows. + */ + if (!flow->age) { + flow->age = + flow_dv_translate_create_aso_age + (dev, action->conf, + error); + if (!flow->age) + return rte_flow_error_set (error, rte_errno, RTE_FLOW_ERROR_TYPE_ACTION, NULL, "can't create ASO age action"); + } dev_flow->dv.actions[actions_n++] = (flow_aso_age_get_by_idx (dev, flow->age))->dr_action; -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:39.137016022 +0000 +++ 0226-net-mlx5-fix-flow-split-combined-with-age-action.patch 2021-02-05 11:18:29.198698575 +0000 @@ -1 +1 @@ -From 14ccfd2ed1686fa6bb42117b0461be278816eca6 Mon Sep 17 00:00:00 2001 +From d4336647554aa4cd22583d40219afdd9d8be10e2 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 14ccfd2ed1686fa6bb42117b0461be278816eca6 ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -27 +28 @@ -index 012d5893ba..f32d6c12df 100644 +index ab9aaab4ec..ae836c6a52 100644 @@ -30 +31 @@ -@@ -10344,14 +10344,22 @@ flow_dv_translate(struct rte_eth_dev *dev, +@@ -9897,14 +9897,22 @@ flow_dv_translate(struct rte_eth_dev *dev,