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 1EFEBA0C47 for ; Mon, 26 Jul 2021 15:53:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 132B240DDA; Mon, 26 Jul 2021 15:53:55 +0200 (CEST) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mails.dpdk.org (Postfix) with ESMTP id 89533410EA for ; Mon, 26 Jul 2021 15:53:53 +0200 (CEST) Received: by mail-wr1-f41.google.com with SMTP id g15so11217960wrd.3 for ; Mon, 26 Jul 2021 06:53:53 -0700 (PDT) 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=zVdOeHYy3K7KlO2lpMy5mbxwJTBh/Zq/J/1KIA4k5CU=; b=RXT5duHrYGYLFoN92KW1lQG9ZpYdhjpArZKJNzb/7ZMD1XlgFtNlSV8B/4WVEEFdXk nF4MIjPtiq9tE+a3Q1HfqRbSW42m0nNgdCOYihG280VnirPzZi/8rYpF+8b8u+mv7QKD kQ7lBUcUoR8asjUJRp1oG5S4Ti8H9caTDnuNXgpCEnoFgsf05od2WXwtIQV/FR/GXHxX 0kv2upksMLW9lT4Sry4dYFGC+nbecsVzrrFRKY2Tc0d8kqpH9qWArXfA2KGvj7SPfKqC AEV3FLkXuqMIVyR6fp4e/bMT4PN0dGTUP08ndZCVRtBtJ2NwVSd/QJWtnfdiWe0m5Hdb SEtQ== 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=zVdOeHYy3K7KlO2lpMy5mbxwJTBh/Zq/J/1KIA4k5CU=; b=IxbzwX37Q1+UnEbiZbuQmMaMnW/uexqhvVflLxopefzAj2C0mYUOHjjCxzlDwzuhyn 5OjBJ7i+N/nVEVSO/otJZ+q76iXQzoI3xR4Hx+SP7ci+s61JiNb9wYkFcSUBLbCKPEwo N+gpDVq3fZ8rS0MPhAvtHXe/ZstOFTU0a2boVK57xW+qBDpn7/IzTSgLtkCI9Q6H69Wd 7aZCfL2h1ihRyc8ZLf40t97gsQnwKHKLfbpckiNLupipfMHBxmQhdnj7m6bQY7lmG/zp t03PfMVN4qE9IBozGxOW7NVu9eYirNj6IJewxupmsXqyTzZKYJrkOxnyyw3UsVby/++4 ItkQ== X-Gm-Message-State: AOAM532KvnMhaLXmSyeZHKGee4Wufybth3aU8tEC9wWGKHW1g7f09h9o bpOoKbBuioPxQoDZlNVcFTU= X-Google-Smtp-Source: ABdhPJwkqHk2caoMIh/h0GgVrbzkkaMtyankfUoy49Gemq8LNbv3334whR9EiX30bmHNrhLBYnk38Q== X-Received: by 2002:adf:d1c3:: with SMTP id b3mr19834051wrd.4.1627307633302; Mon, 26 Jul 2021 06:53:53 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id u2sm35143719wmc.42.2021.07.26.06.53.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 06:53:52 -0700 (PDT) From: luca.boccassi@gmail.com To: Alexander Kozyrev Cc: Viacheslav Ovsiienko , dpdk stable Date: Mon, 26 Jul 2021 14:52:31 +0100 Message-Id: <20210726135322.149850-8-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210726135322.149850-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> <20210726135322.149850-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix threshold for mbuf replenishment in MPRQ' has been queued to stable release 20.11.3 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.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/28/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/4c8e04c056161a86aebf34fc1a6e5200b05d0283 Thanks. Luca Boccassi --- >From 4c8e04c056161a86aebf34fc1a6e5200b05d0283 Mon Sep 17 00:00:00 2001 From: Alexander Kozyrev Date: Tue, 13 Jul 2021 18:21:12 +0300 Subject: [PATCH] net/mlx5: fix threshold for mbuf replenishment in MPRQ [ upstream commit acc87479535cdf02cd63d32a0618bd3874531eb4 ] The replenishment scheme for the vectorized MPRQ Rx burst aims to improve the cache locality by allocating new mbufs only when there are almost no mbufs left: one burst gap between allocated and consumed indexes. This gap is not big enough to accommodate a corner case when we have a very aggressive CQE compression with multiple regular CQEs at the beginning and 64 zipped CQEs at the end. Need to keep in mind this case and extend the replenishment threshold by MLX5_VPMD_RX_MAX_BURST (64) to avoid mbuf overflow. Fixes: 5fc2e5c27d6 ("net/mlx5: fix mbuf overflow in vectorized MPRQ") Signed-off-by: Alexander Kozyrev Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_rxtx_vec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c index 028e0f6121..b8b555690e 100644 --- a/drivers/net/mlx5/mlx5_rxtx_vec.c +++ b/drivers/net/mlx5/mlx5_rxtx_vec.c @@ -151,7 +151,8 @@ mlx5_rx_mprq_replenish_bulk_mbuf(struct mlx5_rxq_data *rxq) unsigned int i; if (n >= rxq->rq_repl_thresh && - rxq->elts_ci - rxq->rq_pi <= rxq->rq_repl_thresh) { + rxq->elts_ci - rxq->rq_pi <= + rxq->rq_repl_thresh + MLX5_VPMD_RX_MAX_BURST) { MLX5_ASSERT(n >= MLX5_VPMD_RXQ_RPLNSH_THRESH(elts_n)); MLX5_ASSERT(MLX5_VPMD_RXQ_RPLNSH_THRESH(elts_n) > MLX5_VPMD_DESCS_PER_LOOP); -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-07-26 13:53:16.358237489 +0100 +++ 0008-net-mlx5-fix-threshold-for-mbuf-replenishment-in-MPR.patch 2021-07-26 13:53:15.797291529 +0100 @@ -1 +1 @@ -From acc87479535cdf02cd63d32a0618bd3874531eb4 Mon Sep 17 00:00:00 2001 +From 4c8e04c056161a86aebf34fc1a6e5200b05d0283 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit acc87479535cdf02cd63d32a0618bd3874531eb4 ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index e64ef70181..e1b6d5422a 100644 +index 028e0f6121..b8b555690e 100644 @@ -31 +32 @@ -@@ -157,7 +157,8 @@ mlx5_rx_mprq_replenish_bulk_mbuf(struct mlx5_rxq_data *rxq) +@@ -151,7 +151,8 @@ mlx5_rx_mprq_replenish_bulk_mbuf(struct mlx5_rxq_data *rxq)