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 42425A0544 for ; Fri, 11 Nov 2022 12:40:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3DAF640150; Fri, 11 Nov 2022 12:40:59 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 5A02140141 for ; Fri, 11 Nov 2022 12:40:58 +0100 (CET) Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 38DAE3F0A2 for ; Fri, 11 Nov 2022 11:40:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1668166857; bh=Dv9PLCQ73rbOMX+9NZA6ItVi/ngFeojf1702p1mrOtA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=bpBmHbosI+1jhDfkj6vNykLZ4jBZbxzuOWI+cCN+hk1sODg9feQVXze/KxJSW0nvS diwqzguA1mxMlUTdIEhCBVU3O5XlScbIElbf9L5KgUiyz/FaaJkiurGXFcAUMrX8R6 LLd4AzJFo2DYu0p7VVXQNr3ulUV/Lqg0rPtWp1KkOHA7yjywJlC0m+d3CS4nlg5abi B1xuS1dyYv6iiIMgx2puLSduhTq1vaw8N6VcpIyVBoYq3pRdsbNBujgZhmN/jAYRF3 qpU834Uo/Bu4K2fIARWAcIK9sbQtYmudui3kmsafnHiIibwq0N59kMeX8wo7ev3W05 5F0XSSTN2vxZw== Received: by mail-ed1-f70.google.com with SMTP id c9-20020a05640227c900b00463de74bc15so3469483ede.13 for ; Fri, 11 Nov 2022 03:40:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Dv9PLCQ73rbOMX+9NZA6ItVi/ngFeojf1702p1mrOtA=; b=l/IM8d4HzFrQWYnG5ceBptIA8Ra3KwtYgWWGPFpA6RuxStAZ42JlaCJei0I2tOQJvn bYpYZBPhil3e13HJUMCGT8EW+5FLEA38r9hLLqUJCASL6r8ACmcOMzx2dEZY7ltqnQ44 rfjEJRgey6R+63p63tmUlthAY1WinEjE0YoBOyGwq2Aywfft68yEfFzkk/rLdN1OqD+O fL0eX+wtKoUXaf5mplV4LiZzUEGwZKRk4522cEOPKniO9iWqGo28OhiIri+r8OV0Pc96 DLtTDi3SeWAvnVfkT3sZE9vCBE+29gmZDzmpAEgmzo9RZCa+4AwTi1A41ygB+JzOG2/B 7Yeg== X-Gm-Message-State: ANoB5pnIjoB+/2HxuzyKKTIXYBpr90QB06squ6dcnorgelDwdVEHJ8ao 4kIEItDMi0BlKCnXOWl/KfF9mBp5h6LMdMrP/iIB0tH+YHX0lw+GEXahcHYPVVng/LIloCrIaoh 7cZn9T5AcRuPzawK8FmoLI13x X-Received: by 2002:a05:6402:1cb9:b0:461:f5ce:a478 with SMTP id cz25-20020a0564021cb900b00461f5cea478mr1092338edb.304.1668166856629; Fri, 11 Nov 2022 03:40:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf4SHqI6nH+bkADzYnpzgFYeNsaH3V1BRTK3+THsldoVynW2XphjtETIGZVk+lXWTFZ45faOeQ== X-Received: by 2002:a05:6402:1cb9:b0:461:f5ce:a478 with SMTP id cz25-20020a0564021cb900b00461f5cea478mr1092329edb.304.1668166856426; Fri, 11 Nov 2022 03:40:56 -0800 (PST) Received: from localhost.localdomain ([2a02:6d40:39af:c100:1891:6c61:50fd:e567]) by smtp.gmail.com with ESMTPSA id jz22-20020a17090775f600b0073dc4385d3bsm782322ejc.105.2022.11.11.03.40.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 03:40:55 -0800 (PST) From: christian.ehrhardt@canonical.com 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 19.11.14 Date: Fri, 11 Nov 2022 12:38:49 +0100 Message-Id: <20221111113904.1549618-32-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221111113904.1549618-1-christian.ehrhardt@canonical.com> References: <20221111113904.1549618-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 19.11.14 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/18/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/92238ae09101db4f54422012959d36f4f0fccc8f Thanks. Christian Ehrhardt --- >From 92238ae09101db4f54422012959d36f4f0fccc8f 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 10aebadbd0..d3196703d1 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -1359,8 +1359,8 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) stats->opackets = 0; stats->obytes = 0; - tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_s2m_rings : - pmd->run.num_m2s_rings; + tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_m2s_rings : + pmd->run.num_s2m_rings; nq = (tmp < RTE_ETHDEV_QUEUE_STAT_CNTRS) ? tmp : RTE_ETHDEV_QUEUE_STAT_CNTRS; @@ -1373,8 +1373,8 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) stats->ibytes += mq->n_bytes; } - tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_m2s_rings : - pmd->run.num_s2m_rings; + tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_s2m_rings : + pmd->run.num_m2s_rings; nq = (tmp < RTE_ETHDEV_QUEUE_STAT_CNTRS) ? tmp : RTE_ETHDEV_QUEUE_STAT_CNTRS; -- 2.38.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-11 12:35:05.918121854 +0100 +++ 0032-net-memif-fix-crash-with-different-number-of-Rx-Tx-q.patch 2022-11-11 12:35:04.781192106 +0100 @@ -1 +1 @@ -From 231435a5e6c7fa915697d8f84a91b44176bba4d1 Mon Sep 17 00:00:00 2001 +From 92238ae09101db4f54422012959d36f4f0fccc8f 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 10aebadbd0..d3196703d1 100644 @@ -27 +28 @@ -@@ -1444,8 +1444,8 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) +@@ -1359,8 +1359,8 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) @@ -31,4 +32,4 @@ -- 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; +- tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_s2m_rings : +- pmd->run.num_m2s_rings; ++ tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_m2s_rings : ++ pmd->run.num_s2m_rings; @@ -38 +39 @@ -@@ -1458,8 +1458,8 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) +@@ -1373,8 +1373,8 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) @@ -42,4 +43,4 @@ -- 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; +- tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_m2s_rings : +- pmd->run.num_s2m_rings; ++ tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_s2m_rings : ++ pmd->run.num_m2s_rings;