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 27F0DA00C2 for ; Wed, 23 Nov 2022 19:04:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2329F42DAA; Wed, 23 Nov 2022 19:04:48 +0100 (CET) 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 32C9642DB9 for ; Wed, 23 Nov 2022 19:04:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669226686; 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=Yxr+M55H7i7NPka+nA1OoFObkVJwm/KeuTYbvG48+BI=; b=Bur8R+giR12vDSztI+kB3Y33M6S8Ka6W6f/X8SddFYYutD/2AGgnBPd5g0aQXslGcUWQ2V SgUG6rFrubBtRH/4EJ7niP6722n4ITyAl72C1qgFS84mO0kW85MOXgeqvlGg9xy7TB5bXs 7ja53M67QHVRtJx8lLoSBySekYpjrto= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-671-HiI7Q0CTNOeRKVQ8CXtCPw-1; Wed, 23 Nov 2022 13:04:43 -0500 X-MC-Unique: HiI7Q0CTNOeRKVQ8CXtCPw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D344C858F17; Wed, 23 Nov 2022 18:04:42 +0000 (UTC) Received: from rh.Home (unknown [10.39.195.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 31804492B07; Wed, 23 Nov 2022 18:04:42 +0000 (UTC) From: Kevin Traynor To: Alexander Kozyrev Cc: Matan Azrad , dpdk stable Subject: patch 'net/mlx5: fix shared Rx queue config reuse' has been queued to stable release 21.11.3 Date: Wed, 23 Nov 2022 18:03:27 +0000 Message-Id: <20221123180413.733554-14-ktraynor@redhat.com> In-Reply-To: <20221123180413.733554-1-ktraynor@redhat.com> References: <20221123180413.733554-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 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.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 11/28/22. 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/6f9e7bd90849a3e489957ff6474b745c7344b2af Thanks. Kevin --- >From 6f9e7bd90849a3e489957ff6474b745c7344b2af Mon Sep 17 00:00:00 2001 From: Alexander Kozyrev Date: Wed, 2 Nov 2022 16:25:00 +0200 Subject: [PATCH] net/mlx5: fix shared Rx queue config reuse [ upstream commit 719eb23d44bb3f48a719c90a744d5f4bc321aeba ] There is a check for the configuration match between all the Rx queues shared among multiple ports in DPDK. This check ensures that the configuration is the same. The issue is this check takes place before the queue is released and configured again in case of reconfiguration. That leads to checking against the old configuration and preventing the shared Rx queue to start properly. Release the old configuration and prepare a new Rx queue before checking that its parameters match the config. Fixes: 09c2555303be ("net/mlx5: support shared Rx queue") Signed-off-by: Alexander Kozyrev Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_rxq.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index 807aaf2fc9..4358671a60 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -900,4 +900,7 @@ mlx5_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, rxq_ctrl = mlx5_shared_rxq_get(dev, conf->share_group, conf->share_qid); + res = mlx5_rx_queue_pre_setup(dev, idx, &desc, &rxq_ctrl); + if (res) + return res; if (rxq_ctrl != NULL && !mlx5_shared_rxq_match(rxq_ctrl, dev, idx, desc, socket, @@ -906,8 +909,9 @@ mlx5_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, return -rte_errno; } + } else { + res = mlx5_rx_queue_pre_setup(dev, idx, &desc, &rxq_ctrl); + if (res) + return res; } - res = mlx5_rx_queue_pre_setup(dev, idx, &desc, &rxq_ctrl); - if (res) - return res; /* Allocate RXQ. */ rxq = mlx5_malloc(MLX5_MEM_RTE | MLX5_MEM_ZERO, sizeof(*rxq), 0, -- 2.38.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-23 09:55:57.435703822 +0000 +++ 0014-net-mlx5-fix-shared-Rx-queue-config-reuse.patch 2022-11-23 09:55:57.021149186 +0000 @@ -1 +1 @@ -From 719eb23d44bb3f48a719c90a744d5f4bc321aeba Mon Sep 17 00:00:00 2001 +From 6f9e7bd90849a3e489957ff6474b745c7344b2af Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 719eb23d44bb3f48a719c90a744d5f4bc321aeba ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index b7818f9598..0d9d11680b 100644 +index 807aaf2fc9..4358671a60 100644 @@ -31 +32 @@ -@@ -903,4 +903,7 @@ mlx5_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, +@@ -900,4 +900,7 @@ mlx5_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, @@ -39 +40 @@ -@@ -909,8 +912,9 @@ mlx5_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, +@@ -906,8 +909,9 @@ mlx5_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,