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 6936DA0A02 for ; Mon, 17 May 2021 18:12:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5CFE84014E; Mon, 17 May 2021 18:12:55 +0200 (CEST) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id 5D9E840041 for ; Mon, 17 May 2021 18:12:54 +0200 (CEST) Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=Keschdeichel.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lifrS-0007o9-5z; Mon, 17 May 2021 16:12:54 +0000 From: Christian Ehrhardt To: Lance Richardson Cc: Ajit Khaparde , dpdk stable Date: Mon, 17 May 2021 18:08:05 +0200 Message-Id: <20210517161039.3132619-56-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517161039.3132619-1-christian.ehrhardt@canonical.com> References: <20210517161039.3132619-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bnxt: fix Rx buffer posting' has been queued to stable release 19.11.9 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 19.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/19/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/b3037f1170151407e8e7750bf593954e07ec09f4 Thanks. Christian Ehrhardt --- >From b3037f1170151407e8e7750bf593954e07ec09f4 Mon Sep 17 00:00:00 2001 From: Lance Richardson Date: Thu, 18 Mar 2021 15:52:13 -0400 Subject: [PATCH] net/bnxt: fix Rx buffer posting [ upstream commit bb4f70d275045647db78df48aa1f2456c37cf5fd ] Remove early buffer posting logic from burst receive loop to address several issues: - Posting receive descriptors without first posting completion entries risks overflowing the completion queue. - Posting receive descriptors without updating rx_raw_prod creates the possibility that the receive descriptor doorbell can be written twice with the same value. - Having this logic in the inner descriptor processing loop can impact performance. Fixes: 637e34befd9c ("net/bnxt: optimize Rx processing") Fixes: 04067844a3e9 ("net/bnxt: reduce CQ queue size without aggregation ring") Signed-off-by: Lance Richardson Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_rxr.c | 3 --- drivers/net/bnxt/bnxt_rxr.h | 2 -- 2 files changed, 5 deletions(-) diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c index 668b6aae9a..dcdde44c03 100644 --- a/drivers/net/bnxt/bnxt_rxr.c +++ b/drivers/net/bnxt/bnxt_rxr.c @@ -654,9 +654,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, raw_cons = NEXT_RAW_CMP(raw_cons); if (nb_rx_pkts == nb_pkts || evt) break; - /* Post some Rx buf early in case of larger burst processing */ - if (nb_rx_pkts == BNXT_RX_POST_THRESH) - bnxt_db_write(&rxr->rx_db, rxr->rx_prod); } cpr->cp_raw_cons = raw_cons; diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h index d5b7387144..387ab0b1e4 100644 --- a/drivers/net/bnxt/bnxt_rxr.h +++ b/drivers/net/bnxt/bnxt_rxr.h @@ -169,8 +169,6 @@ static inline uint16_t bnxt_tpa_start_agg_id(struct bnxt *bp, ((rxcmp1)->errors_v2 & \ rte_cpu_to_le_32(RX_PKT_CMPL_ERRORS_L4_CS_ERROR)) -#define BNXT_RX_POST_THRESH 32 - enum pkt_hash_types { PKT_HASH_TYPE_NONE, /* Undefined type */ PKT_HASH_TYPE_L2, /* Input: src_MAC, dest_MAC */ -- 2.31.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-17 17:40:31.744664037 +0200 +++ 0056-net-bnxt-fix-Rx-buffer-posting.patch 2021-05-17 17:40:29.195809666 +0200 @@ -1 +1 @@ -From bb4f70d275045647db78df48aa1f2456c37cf5fd Mon Sep 17 00:00:00 2001 +From b3037f1170151407e8e7750bf593954e07ec09f4 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit bb4f70d275045647db78df48aa1f2456c37cf5fd ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index c72545ada7..7179c6cb30 100644 +index 668b6aae9a..dcdde44c03 100644 @@ -31 +32 @@ -@@ -1018,9 +1018,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, +@@ -654,9 +654,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, @@ -33 +34 @@ - if (nb_rx_pkts == nb_pkts || nb_rep_rx_pkts == nb_pkts || evt) + if (nb_rx_pkts == nb_pkts || evt) @@ -37 +38 @@ -- bnxt_db_write(&rxr->rx_db, rxr->rx_raw_prod); +- bnxt_db_write(&rxr->rx_db, rxr->rx_prod); @@ -42 +43 @@ -index a6fdd7767a..b43256e03e 100644 +index d5b7387144..387ab0b1e4 100644 @@ -45,3 +46,3 @@ -@@ -41,8 +41,6 @@ static inline uint16_t bnxt_tpa_start_agg_id(struct bnxt *bp, - (((cmp)->agg_bufs_v1 & RX_PKT_CMPL_AGG_BUFS_MASK) >> \ - RX_PKT_CMPL_AGG_BUFS_SFT) +@@ -169,8 +169,6 @@ static inline uint16_t bnxt_tpa_start_agg_id(struct bnxt *bp, + ((rxcmp1)->errors_v2 & \ + rte_cpu_to_le_32(RX_PKT_CMPL_ERRORS_L4_CS_ERROR)) @@ -51,3 +52,3 @@ - /* Number of descriptors to process per inner loop in vector mode. */ - #define RTE_BNXT_DESCS_PER_LOOP 4U - + enum pkt_hash_types { + PKT_HASH_TYPE_NONE, /* Undefined type */ + PKT_HASH_TYPE_L2, /* Input: src_MAC, dest_MAC */