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 D00EA46211 for ; Thu, 13 Feb 2025 11:01:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C5F4142EED; Thu, 13 Feb 2025 11:01:54 +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 9CD5F42EF5 for ; Thu, 13 Feb 2025 11:01:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739440913; 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=Zkh3wVTOdynnSpUj/DcRxuAr9Lj4dCYL8W6ZRNfptWk=; b=MP11W1+6dkOEEtu2rDczhf/bwLBZSe5exDaLtYoiQEsg1UjFD3FvUMwjjntPVIqCEUQ/7l cOLfhu+PLA9GU83l9aS4Nc52wFXTBJ0snV/58mvCjQRbVfmhyKCytNNh15hXogxOx4ogCY ocrmR8NI0DwDJCtwE6IyltHSuEuL8GU= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-693-b0ct0bBiMhCAedkvWcMapA-1; Thu, 13 Feb 2025 05:01:51 -0500 X-MC-Unique: b0ct0bBiMhCAedkvWcMapA-1 X-Mimecast-MFC-AGG-ID: b0ct0bBiMhCAedkvWcMapA Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E8DBE180087B; Thu, 13 Feb 2025 10:01:50 +0000 (UTC) Received: from rh.Home (unknown [10.45.224.21]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AE1881800360; Thu, 13 Feb 2025 10:01:49 +0000 (UTC) From: Kevin Traynor To: Wei Hu Cc: dpdk stable Subject: patch 'net/mana: do not ring short doorbell for every mbuf alloc' has been queued to stable release 24.11.2 Date: Thu, 13 Feb 2025 09:58:23 +0000 Message-ID: <20250213095933.362078-56-ktraynor@redhat.com> In-Reply-To: <20250213095933.362078-1-ktraynor@redhat.com> References: <20250213095933.362078-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: mrFgM1QL0fP-FhvdeRcz3ufd7ByKsJF_S0ZFOeZLKtU_1739440911 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 24.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/17/25. 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/a40425158c1f36cdd57a3161ae6db9ef4ad63a10 Thanks. Kevin --- >From a40425158c1f36cdd57a3161ae6db9ef4ad63a10 Mon Sep 17 00:00:00 2001 From: Wei Hu Date: Thu, 6 Feb 2025 02:07:43 -0800 Subject: [PATCH] net/mana: do not ring short doorbell for every mbuf alloc [ upstream commit 4e6a273d60c766a3697935319cf5bb00bd330704 ] In the 32bit rx path, it rings short doorbell after receiving one packet and allocating the new mbuf. This significantly impacts the rx performance. Fix this problem by ringing the short doorbell in batch. Fixes: eeb37809601b ("net/mana: use bulk mbuf allocation for Rx WQEs") Signed-off-by: Wei Hu --- drivers/net/mana/rx.c | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/drivers/net/mana/rx.c b/drivers/net/mana/rx.c index 0c26702b73..f196d43aee 100644 --- a/drivers/net/mana/rx.c +++ b/drivers/net/mana/rx.c @@ -122,4 +122,8 @@ mana_alloc_and_post_rx_wqes(struct mana_rxq *rxq, uint32_t count) struct rte_mbuf *mbufs[MANA_MBUF_BULK]; +#ifdef RTE_ARCH_32 + rxq->wqe_cnt_to_short_db = 0; +#endif + more_mbufs: batch_count = RTE_MIN(count, MANA_MBUF_BULK); @@ -133,7 +137,4 @@ more_mbufs: } -#ifdef RTE_ARCH_32 - rxq->wqe_cnt_to_short_db = 0; -#endif for (i = 0; i < batch_count; i++) { ret = mana_post_rx_wqe(rxq, mbufs[i]); @@ -449,8 +450,4 @@ mana_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n) int polled = 0; -#ifdef RTE_ARCH_32 - rxq->wqe_cnt_to_short_db = 0; -#endif - repoll: /* Polling on new completions if we have no backlog */ @@ -571,23 +568,4 @@ drop: if (pkt_received == pkts_n) break; - -#ifdef RTE_ARCH_32 - /* Always post WQE as soon as it's consumed for short DB */ - ret = mana_alloc_and_post_rx_wqes(rxq, wqe_consumed); - if (ret) { - DRV_LOG(ERR, "failed to post %d WQEs, ret %d", - wqe_consumed, ret); - return pkt_received; - } - wqe_consumed = 0; - - /* Ring short doorbell if approaching the wqe increment - * limit. - */ - if (rxq->wqe_cnt_to_short_db > RX_WQE_SHORT_DB_THRESHOLD) { - mana_rq_ring_doorbell(rxq); - rxq->wqe_cnt_to_short_db = 0; - } -#endif } -- 2.48.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-02-12 17:29:40.485225668 +0000 +++ 0056-net-mana-do-not-ring-short-doorbell-for-every-mbuf-a.patch 2025-02-12 17:29:34.363946007 +0000 @@ -1 +1 @@ -From 4e6a273d60c766a3697935319cf5bb00bd330704 Mon Sep 17 00:00:00 2001 +From a40425158c1f36cdd57a3161ae6db9ef4ad63a10 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4e6a273d60c766a3697935319cf5bb00bd330704 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org