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 E1D51A0C49 for ; Tue, 15 Jun 2021 10:51:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AB66540140; Tue, 15 Jun 2021 10:51:50 +0200 (CEST) Received: from spider.fraudbuster.mobi (spider.fraudbuster.mobi [62.4.12.223]) by mails.dpdk.org (Postfix) with ESMTP id 3044440140 for ; Tue, 15 Jun 2021 10:51:49 +0200 (CEST) Received: from [10.8.0.214] (gypsy.fraudbuster.mobi [212.129.1.221]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by spider.fraudbuster.mobi (Postfix) with ESMTPSA id A2A5F2037C; Tue, 15 Jun 2021 10:51:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fraudbuster.mobi; s=rsa-20200712; t=1623747108; bh=9zxuDc/SDD0S7xiqyg87A12d9nsTsrFHQ6igcfCHCRM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=fyKjdorogIklTV93GRAXjkmpqF/VPdLp0RwAPKOgZXGgj4VzZujFX3GvFlujEVHNL IZcJpRr/UDBknpcGqsScoKTBl9aMJbBUn8/wOcEsUqTGgItG1bk1krnNoHGPN88/Xn 7DMzmkDC5d+DoyEXrgVn7GdqrKq4g0shMZdylGVIZchANz0MSag6bZSLdVRdrPrnyw BvnKi/9hu7+qBKwbH9eLvllBBEGdWIHiarWGNHWRaEI5z+3ORR8znbmUCRXucfT3YJ HQsXdtFofshIiDfa7oTPqG+Cc4h91YQD5dy/zZwTpFhJEiAww3z2bDpobLOQUOuead WkjkeR0ZI8NOw== To: Xueming Li , Michael Baum Cc: Luca Boccassi , Matan Azrad , dpdk stable References: <20210510160258.30982-229-xuemingl@nvidia.com> <20210611230433.8208-1-xuemingl@nvidia.com> <20210611230433.8208-57-xuemingl@nvidia.com> From: David Bouyeure Message-ID: <20b87516-eed5-1cdb-7697-9f50a45b1fa2@fraudbuster.mobi> Date: Tue, 15 Jun 2021 10:51:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <20210611230433.8208-57-xuemingl@nvidia.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Server: spider X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:12876, ipnet:212.129.0.0/18, country:FR]; IP_WHITELIST(0.00)[212.129.1.221] X-Rspamd-Queue-Id: A2A5F2037C Subject: Re: [dpdk-stable] patch 'net/mlx5: fix flow age event triggering' has been queued to stable release 20.11.2 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, thanks a lot for the information. Regards. On 6/12/21 1:02 AM, Xueming Li wrote: > Hi, > > FYI, your patch has been queued to stable release 20.11.2 > > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. > It will be pushed if I get no objections before 06/14/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/steevenlee/dpdk > > This queued commit can be viewed at: > https://github.com/steevenlee/dpdk/commit/cb6f74724dc2f6539709210fd1dc1725d8712718 > > Thanks. > > Xueming Li > > --- > From cb6f74724dc2f6539709210fd1dc1725d8712718 Mon Sep 17 00:00:00 2001 > From: Michael Baum > Date: Thu, 29 Apr 2021 12:55:41 +0300 > Subject: [PATCH] net/mlx5: fix flow age event triggering > Cc: Luca Boccassi > > [ upstream commit 447d4d797d21b35185d511b7c280d7fe171b29bd ] > > A FLOW_AGE event should be invoked when a new aged-out flow is detected > by the PMD after the last user get-aged query calling. > The PMD manages 2 flags for this information and check them in order to > decide if an event should be invoked: > MLX5_AGE_EVENT_NEW - a new aged-out flow was detected. after the last > check. > MLX5_AGE_TRIGGER - get-aged query was called after the last aged-out > flow. > The 2 flags were unset after the event invoking. > > When the user calls get-aged query from the event callback, the TRIGGER > flag was set inside the user callback and unset directly after the > callback what may stop the event invoking forever. > > Unset the TRIGGER flag before the event invoking in order to allow set > it by the user callback. > > Fixes: f935ed4b645a ("net/mlx5: support flow hit action for aging") > > Reported-by: David Bouyeure > Signed-off-by: Michael Baum > Acked-by: Matan Azrad > --- > drivers/net/mlx5/mlx5.c | 8 +++++--- > drivers/net/mlx5/mlx5.h | 2 ++ > 2 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c > index b8f31497b2..f5c1c800fc 100644 > --- a/drivers/net/mlx5/mlx5.c > +++ b/drivers/net/mlx5/mlx5.c > @@ -549,11 +549,13 @@ mlx5_age_event_prepare(struct mlx5_dev_ctx_shared *sh) > age_info = &sh->port[i].age_info; > if (!MLX5_AGE_GET(age_info, MLX5_AGE_EVENT_NEW)) > continue; > - if (MLX5_AGE_GET(age_info, MLX5_AGE_TRIGGER)) > + MLX5_AGE_UNSET(age_info, MLX5_AGE_EVENT_NEW); > + if (MLX5_AGE_GET(age_info, MLX5_AGE_TRIGGER)) { > + MLX5_AGE_UNSET(age_info, MLX5_AGE_TRIGGER); > rte_eth_dev_callback_process > (&rte_eth_devices[sh->port[i].devx_ih_port_id], > RTE_ETH_EVENT_FLOW_AGED, NULL); > - age_info->flags = 0; > + } > } > } > > @@ -562,7 +564,7 @@ mlx5_age_event_prepare(struct mlx5_dev_ctx_shared *sh) > * > * @param[in] sh > * Pointer to mlx5_dev_ctx_shared object. > - * @param[in] sh > + * @param[in] config > * Pointer to user dev config. > */ > static void > diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h > index 35f9bece05..9437f45480 100644 > --- a/drivers/net/mlx5/mlx5.h > +++ b/drivers/net/mlx5/mlx5.h > @@ -538,6 +538,8 @@ struct mlx5_aso_age_mng { > #define MLX5_AGE_TRIGGER 2 > #define MLX5_AGE_SET(age_info, BIT) \ > ((age_info)->flags |= (1 << (BIT))) > +#define MLX5_AGE_UNSET(age_info, BIT) \ > + ((age_info)->flags &= ~(1 << (BIT))) > #define MLX5_AGE_GET(age_info, BIT) \ > ((age_info)->flags & (1 << (BIT))) > #define GET_PORT_AGE_INFO(priv) \