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 56F28A0562 for ; Thu, 18 Mar 2021 20:52:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3FBF6140F3F; Thu, 18 Mar 2021 20:52:22 +0100 (CET) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id 31477140F27 for ; Thu, 18 Mar 2021 20:52:19 +0100 (CET) Received: by mail-pl1-f169.google.com with SMTP id o2so1837115plg.1 for ; Thu, 18 Mar 2021 12:52:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:mime-version; bh=YpTJV3iFHShtObcFbkcy+LpMp8jmvnh2tJ6oydr45LI=; b=G6/ArlOXGaBEPEOYPwd9X85R/wGeUBr4ngQuvp+h0Hx6kbEjBFlyY4xbdRBQbOVKZ5 lQkP7SHI5FO9EYUgS6q2cT9kHmo9956Pq7dRqCSoJ3cMyN30MNfuEvWudO+gcbmWEa36 xzLQEyIXHK0iWTGy2jEMHHPqRf82Fhp+2u7FI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=YpTJV3iFHShtObcFbkcy+LpMp8jmvnh2tJ6oydr45LI=; b=Pri+1SY51eIAOTOrDwr45iBq4CulFttr61mRT2TglApnWlRixQHsPdXzhP7H4u+J/8 JSi82GTWgdyDKBcEFYNAsJ5a6JDHqMHgthOfpe3aIkAIgUPafnd3+AgEK97vX7pfMyHY 874HjF/V8wWtckQ0NTCHX8iHPH38L+s4PqC17n7Lm8l3jQJEavkxFVKGoauuvQdUrors J+LJXOMtLhCBjeeR709TevAmIQDpQphc7yTJBOfe27NbheWshLjJG2WBMAFfGqw2q/19 owcEKieWqku4yD7bjY+TFClB+ZxpVH6ih07IzYVdVPUAyczfnomeLDBidJLFaHOekhKF iiwg== X-Gm-Message-State: AOAM532V5o5SBYgUEKBu+HeXjXAMSf3C9MFNB1Pr9TLXnOb+eDbhySfR yFxoQ4Q2NE4uNPnkdgJC5FDn8g== X-Google-Smtp-Source: ABdhPJxYMCdWbjOgZCye+TOO+cn2lQLK+zlrjS/dmOltrtVTuSmN0bllYQQBIC0TkLNL0yd/blY3og== X-Received: by 2002:a17:90a:9f4a:: with SMTP id q10mr6075578pjv.129.1616097138189; Thu, 18 Mar 2021 12:52:18 -0700 (PDT) Received: from localhost.localdomain ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id c193sm3318237pfc.180.2021.03.18.12.52.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Mar 2021 12:52:17 -0700 (PDT) From: Lance Richardson To: Ajit Khaparde , Somnath Kotur Cc: dev@dpdk.org, stable@dpdk.org Date: Thu, 18 Mar 2021 15:52:13 -0400 Message-Id: <20210318195213.683281-1-lance.richardson@broadcom.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000dd7ece05bdd4efeb" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [dpdk-stable] [PATCH 1/1] net/bnxt: fix Rx buffer posting 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" --000000000000dd7ece05bdd4efeb Content-Transfer-Encoding: 8bit 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") Cc: stable@dpdk.org Signed-off-by: Lance Richardson Reviewed-by: Ajit Kumar 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 c72545ada7..7179c6cb30 100644 --- a/drivers/net/bnxt/bnxt_rxr.c +++ b/drivers/net/bnxt/bnxt_rxr.c @@ -1018,9 +1018,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 || nb_rep_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_raw_prod); } cpr->cp_raw_cons = raw_cons; diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h index a6fdd7767a..b43256e03e 100644 --- a/drivers/net/bnxt/bnxt_rxr.h +++ b/drivers/net/bnxt/bnxt_rxr.h @@ -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) -#define BNXT_RX_POST_THRESH 32 - /* Number of descriptors to process per inner loop in vector mode. */ #define RTE_BNXT_DESCS_PER_LOOP 4U -- 2.25.1 --000000000000dd7ece05bdd4efeb--