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 44814A054D for ; Tue, 25 Oct 2022 17:10:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 414A442C4A; Tue, 25 Oct 2022 17:10:13 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 0207A42C45 for ; Tue, 25 Oct 2022 17:10:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666710610; 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=q35EsjU2Yvdiu48fEuKIE0TLrm+CLjVIEhtQNp5841A=; b=IM/eDO+GZviap+Sow6aK9GWlwKqO3zD5b/G5HBvSlO7gIDgYhCJqDZzJfh9pdaum3DIEXS oAZRHX4ZzvBgfg2YidCQcHGE+kl0LBsVfo/H+AX8tHHS+H83hkf1kf+it63Ok4mbwpQjsS Xf3UiUuSRpFlXHFknI6sdezYvJvdvSQ= 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-382-DJa5OS5ENyqLuZuhenP9fw-1; Tue, 25 Oct 2022 11:10:07 -0400 X-MC-Unique: DJa5OS5ENyqLuZuhenP9fw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 286D4101A52A; Tue, 25 Oct 2022 15:10:07 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48D644A9254; Tue, 25 Oct 2022 15:10:06 +0000 (UTC) From: Kevin Traynor To: Huzaifa Rahman Cc: Joyce Kong , dpdk stable Subject: patch 'net/memif: fix crash with different number of Rx/Tx queues' has been queued to stable release 21.11.3 Date: Tue, 25 Oct 2022 16:07:28 +0100 Message-Id: <20221025150734.142189-93-ktraynor@redhat.com> In-Reply-To: <20221025150734.142189-1-ktraynor@redhat.com> References: <20221025150734.142189-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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/01/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/ee7decc2c9bb39bcbdd3106aef045551ae3d00fa Thanks. Kevin --- >From ee7decc2c9bb39bcbdd3106aef045551ae3d00fa Mon Sep 17 00:00:00 2001 From: Huzaifa Rahman Date: Tue, 26 Jul 2022 15:16:28 +0500 Subject: [PATCH] net/memif: fix crash with different number of Rx/Tx queues [ upstream commit 231435a5e6c7fa915697d8f84a91b44176bba4d1 ] There's a bug in memif_stats_get() function due to confusion between C2S (client->server) and S2C (server->client) rings, causing a crash if there's a different number of Rx and Tx queues. Fixit by selectiing the correct rings for Rx and Tx i.e for Rx, S2C rings are selected and for Tx, C2S rings are selected. Bugzilla ID: 734 Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD") Signed-off-by: Huzaifa Rahman Reviewed-by: Joyce Kong --- drivers/net/memif/rte_eth_memif.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index 205d08b028..2c716355be 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -1448,6 +1448,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) stats->obytes = 0; - tmp = (pmd->role == MEMIF_ROLE_CLIENT) ? pmd->run.num_c2s_rings : - pmd->run.num_s2c_rings; + tmp = (pmd->role == MEMIF_ROLE_CLIENT) ? pmd->run.num_s2c_rings : + pmd->run.num_c2s_rings; nq = (tmp < RTE_ETHDEV_QUEUE_STAT_CNTRS) ? tmp : RTE_ETHDEV_QUEUE_STAT_CNTRS; @@ -1462,6 +1462,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) } - tmp = (pmd->role == MEMIF_ROLE_CLIENT) ? pmd->run.num_s2c_rings : - pmd->run.num_c2s_rings; + tmp = (pmd->role == MEMIF_ROLE_CLIENT) ? pmd->run.num_c2s_rings : + pmd->run.num_s2c_rings; nq = (tmp < RTE_ETHDEV_QUEUE_STAT_CNTRS) ? tmp : RTE_ETHDEV_QUEUE_STAT_CNTRS; -- 2.37.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-10-25 14:19:00.639734251 +0100 +++ 0093-net-memif-fix-crash-with-different-number-of-Rx-Tx-q.patch 2022-10-25 14:18:58.536798539 +0100 @@ -1 +1 @@ -From 231435a5e6c7fa915697d8f84a91b44176bba4d1 Mon Sep 17 00:00:00 2001 +From ee7decc2c9bb39bcbdd3106aef045551ae3d00fa Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 231435a5e6c7fa915697d8f84a91b44176bba4d1 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index a574bce49e..5b5cae34ea 100644 +index 205d08b028..2c716355be 100644 @@ -27 +28 @@ -@@ -1445,6 +1445,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) +@@ -1448,6 +1448,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) @@ -36 +37 @@ -@@ -1459,6 +1459,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) +@@ -1462,6 +1462,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)