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 EBC6A43CA3 for ; Thu, 14 Mar 2024 15:12:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E203140297; Thu, 14 Mar 2024 15:12:25 +0100 (CET) Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179]) by mails.dpdk.org (Postfix) with ESMTP id B1AEF4028C for ; Thu, 14 Mar 2024 15:12:24 +0100 (CET) Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-609ff069a40so12148317b3.1 for ; Thu, 14 Mar 2024 07:12:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710425544; x=1711030344; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=V4heaIZJqBhzUpqb1PlE75UUB3qPzpaUyN/Y4kKHdBU=; b=HldnGpHnHKUqpRCF6NZjgP3L9zuyYdroqZCDyuVvH8589NTo0fjJlSLNri9xPzCrQr qbftHNAH4qsf+9z/keZjM3bwqIMT5MBQQCFXg5pDG1EgepR7NChJ9ptdfA8kgEp5GhN3 6q3W66RsFYIFVonVkGkLsWebFoylOXY9A87bY36XvvRW3AY0HfC9IPVMmz9P6K42PTbJ FyjcFHIowbo9HuJ4J1fnG5Av5mzW9Tg64E6vvg3nzXLOBpGyN+hcPTSYpKMQdrEBwbos HJVxSVz7dqedqk3FUtJSHUl5jUNsWtocmJnirXzYS41gGa+sRxaO4hv61NZM2kORSfxK Kkkw== X-Gm-Message-State: AOJu0YyWez1IUGrIpKXt/CrfafuQDHBJUXpxXEIdCs7xSAYhtXQXgKtt wVNyqhY5M7TQaCTxZN6A9X/GHLyyVuZv5tuwlcVpLjIbbluIuU7VhRnUVUI2Mr0s/A== X-Google-Smtp-Source: AGHT+IF+xEvLJShPDazy7D4x6zoewjIkgR1q+TNI0qaxnKd6oP80SfdPld4KeDK09wcT3K5irWWXvw== X-Received: by 2002:a81:8945:0:b0:60a:19b:6ce9 with SMTP id z66-20020a818945000000b0060a019b6ce9mr756936ywf.6.1710425543782; Thu, 14 Mar 2024 07:12:23 -0700 (PDT) Received: from mail-yw1-f171.google.com (mail-yw1-f171.google.com. [209.85.128.171]) by smtp.gmail.com with ESMTPSA id dg20-20020a05690c0fd400b00609f3d27022sm276569ywb.113.2024.03.14.07.12.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Mar 2024 07:12:23 -0700 (PDT) Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-60a0579a931so10352947b3.0 for ; Thu, 14 Mar 2024 07:12:23 -0700 (PDT) X-Received: by 2002:a05:690c:7005:b0:60c:d660:fa28 with SMTP id jf5-20020a05690c700500b0060cd660fa28mr274921ywb.15.1710425543252; Thu, 14 Mar 2024 07:12:23 -0700 (PDT) MIME-Version: 1.0 References: <20240314132905.409294-1-dsosnowski@nvidia.com> In-Reply-To: <20240314132905.409294-1-dsosnowski@nvidia.com> From: Luca Boccassi Date: Thu, 14 Mar 2024 14:12:11 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 22.11] net/mlx5: fix flow counter cache starvation To: Dariusz Sosnowski Cc: stable@dpdk.org Content-Type: text/plain; charset="UTF-8" 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 On Thu, 14 Mar 2024 at 13:30, Dariusz Sosnowski wrote: > > [ upstream commit d755221b77c29549be4025e547cf907ad3a0abcf ] > > mlx5 PMD maintains a global counter pool and per-queue counter cache, > which are used to allocate COUNT flow action objects. > Whenever an empty cache is accessed, it is replenished > with a pre-defined number of counters. > > If number of configured counters was sufficiently small, then > it might have happened that caches associated with some queues > could get starved because all counters were fetched on other queues. > > This patch fixes that by disabling cache at runtime > if number of configured counters is not sufficient to avoid > such starvation. > > Fixes: 4d368e1da3a4 ("net/mlx5: support flow counter action for HWS") > Cc: stable@dpdk.org > > Signed-off-by: Dariusz Sosnowski > Acked-by: Ori Kam > Acked-by: Bing Zhao > --- > drivers/net/mlx5/mlx5_flow_hw.c | 10 +++-- > drivers/net/mlx5/mlx5_hws_cnt.c | 72 ++++++++++++++++++++++++--------- > drivers/net/mlx5/mlx5_hws_cnt.h | 26 ++++++++++++ > 3 files changed, 86 insertions(+), 22 deletions(-) Thanks, applied