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 3888BA0A0E for ; Mon, 10 May 2021 18:12:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32AA240140; Mon, 10 May 2021 18:12:25 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2048.outbound.protection.outlook.com [40.107.237.48]) by mails.dpdk.org (Postfix) with ESMTP id DAB8540140 for ; Mon, 10 May 2021 18:12:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZrRajyLeYiog0TFANyLd6rJK8hXMRICsZI/q96K6FbQZNQUe6fzta5YbHoe+/R+Xvk5mpbJHu9LmHZA9qFwuB4AEzvPP0swd02wpZcBoiKmPgww6/3oNZ8O0A1fH5p7MW8oGVe99REG7/K2B6eYF4umyy/aXUT1wBUzdZ09kllcv3RVdqD5X0/iWwkveY0MgqT480AdPTB7FHzfXmmDfB+kdxgY5te61do8psInuvEuqzNKawnqRL/rZNGAbAIR/WXFjY4zBn/P6JEKXB7YKA+5pe27zOna7+5JqeB+2iIOtKk+IPhAgbuYF7YuLlk2OkzY+BdEfiHlRj3L3W1dfxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9HrL4or9JAp5SZbP8vVeu53iXDIDhgmEXZltzeZA+04=; b=W3pfs13Zf6LHeiwewCG8jOT1KAIGh5OejDp80Ph4b4+bLYyOw6kg54Zg/r2eSI8VmruzpST7XG7aMUxlVuEwAkhBwJF81NFmZ9eIfQWrWsg/cxZE9oSoQCu3JX0vboKGamzmCC5Ira56mCNl22c1zXS5niWwwirOdw5tRWnmytCBsBfaLPhPlQOznxlFtJmQMN8dK/pzUI9McPTUI9fO0DHIUY0IuLZFekMrTFmzvKT4iK87SVFlmD2MZr2xYXEbxMz2kxCFIZjXdkBFj/iu53rc4XXs4GTMQV2AY+PYimThm3IVOeA49AH18dvVmJ/vRS16iiodoy7ec/tl5jLB6g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=broadcom.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9HrL4or9JAp5SZbP8vVeu53iXDIDhgmEXZltzeZA+04=; b=EcruWEylPAabk5XY8mlXVjxa+N8BqiH0+xTMQIiyDLe30g0w0hGtSq2RkS+tKP6XvbqFXjCZ/PXS2XGumlJKK5yG+9z+dNwL/ftMeRedoKkrA1WsaKC4NAbXu51XWaPQ+c/fqJPlHh7S09l0hCmZsKNXspbzTyoFOo0z+qebZABfwY8DESQH/ZzjPo13+Ce2CP5QhRc6E8ARkUozcPRmKKk+pQG3Ya/s9w1eQyBi5sPxpZYOOuF5sn9lvrJCWjN/TPiYQY86aFSNRZYGMhnLtcoxA108p9iU6Zsq9gkUX3S0rXXr75SzSzmJF7F9+ckzfUQBTowbXUzAnhTclNEjKA== Received: from MWHPR15CA0060.namprd15.prod.outlook.com (2603:10b6:301:4c::22) by DM5PR12MB1370.namprd12.prod.outlook.com (2603:10b6:3:76::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.31; Mon, 10 May 2021 16:12:22 +0000 Received: from CO1NAM11FT018.eop-nam11.prod.protection.outlook.com (2603:10b6:301:4c:cafe::3e) by MWHPR15CA0060.outlook.office365.com (2603:10b6:301:4c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:12:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; broadcom.com; dkim=none (message not signed) header.d=none;broadcom.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by CO1NAM11FT018.mail.protection.outlook.com (10.13.175.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:12:22 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:12:20 +0000 From: Xueming Li To: Lance Richardson CC: Luca Boccassi , Ajit Khaparde , dpdk stable Date: Tue, 11 May 2021 00:00:41 +0800 Message-ID: <20210510160258.30982-92-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a19c558e-409e-4f6e-b715-08d913ce64d1 X-MS-TrafficTypeDiagnostic: DM5PR12MB1370: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: B4D3GqA74QWfXfcSosvJP+pK4CNPxY1nB/yygIbqBuB08PW3sk+0wmA1X7gLJFJt4RZwgCvgHgCCCEm3NVMychB7HVnqifrQ3VtF5gNlgdld+M1ioy4QDpRrs4heDQYI1QVeZwGRhtsGnMdcMkDz+elNs4nz7Mt6i8dyorKq+UBqCllmM0OXYKZYNEsCVgD3YaE1OyVGf5J/Atydz4j4oiGhioRQTJ384f4qLJFthgriBqBVG8JzM0m2Ht689QcPfcUsdej5IR0JodUL4tv3gK8CmTFj2icC51mrkA5VmJMsslgzCCc8039xkI314C+hKNNxw3v98B+/jXHH2JwZBEHmrgBEDgFWBkPtge3K7zCMvLS+z2s1TY6QlWfUq3Qm/PPlgLzIRa38xigDPTb7M+gGdYoGOvmwyFP5gKA4pl7nLFV/ynipzZRDdTcP4cUTasb7zeeJM5kaCyQhUwELB2dcdrIRv4znH7AKCWHyS0FV/1AyqP+C0GrT8Pp0pcUHy2fOZyHcpDTle93xLluirusQtw1dc/Cq+DLh7CnOMPINo/YDedCRnOabJ5+sclG4tPsvdvUsWUDTLINpMHMtt4301HtXBiI/gYzEMf2wB9fRWrjGuUhgUQ3tj/bNKrq+ekYIc/SsNq8jY+/E2rBpca3Mx8/inljOKBdbTuodPp7rlUf+o4+vvtKVAa9Kf4PmZQLDtJnpqImLQqt1VRxvO6hKYlAEwFXoN3wWXqO61Gk0CRb4cmQ8ts6pn2aUgw2jOPIdpmu5xdvJPP5LroTqYQ== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(396003)(376002)(39860400002)(346002)(136003)(36840700001)(46966006)(2906002)(54906003)(82740400003)(86362001)(6666004)(36906005)(70586007)(70206006)(82310400003)(36860700001)(7636003)(7696005)(16526019)(186003)(316002)(478600001)(426003)(53546011)(1076003)(26005)(6286002)(5660300002)(2616005)(36756003)(47076005)(8676002)(356005)(4326008)(336012)(966005)(55016002)(8936002)(83380400001)(6916009); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:12:22.4162 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a19c558e-409e-4f6e-b715-08d913ce64d1 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT018.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1370 Subject: [dpdk-stable] patch 'net/bnxt: fix Rx buffer posting' has been queued to stable release 20.11.2 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 20.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 05/12/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/b21daacf9276ae68625a2cf80ba02ba8ef831221 Thanks. Xueming Li --- >From b21daacf9276ae68625a2cf80ba02ba8ef831221 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 Cc: Luca Boccassi [ 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 b28b7fb561..34de09fdc8 100644 --- a/drivers/net/bnxt/bnxt_rxr.c +++ b/drivers/net/bnxt/bnxt_rxr.c @@ -938,9 +938,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_prod); } cpr->cp_raw_cons = raw_cons; diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h index 46c34e6e16..be5afcc8d1 100644 --- a/drivers/net/bnxt/bnxt_rxr.h +++ b/drivers/net/bnxt/bnxt_rxr.h @@ -37,8 +37,6 @@ static inline uint16_t bnxt_tpa_start_agg_id(struct bnxt *bp, #define BNXT_TPA_END_AGG_ID_TH(cmp) \ rte_le_to_cpu_16((cmp)->agg_id) -#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 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:29.005180600 +0800 +++ 0093-net-bnxt-fix-Rx-buffer-posting.patch 2021-05-10 23:59:26.460000000 +0800 @@ -1 +1 @@ -From bb4f70d275045647db78df48aa1f2456c37cf5fd Mon Sep 17 00:00:00 2001 +From b21daacf9276ae68625a2cf80ba02ba8ef831221 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit bb4f70d275045647db78df48aa1f2456c37cf5fd ] @@ -18 +20,0 @@ -Cc: stable@dpdk.org @@ -28 +30 @@ -index c72545ada7..7179c6cb30 100644 +index b28b7fb561..34de09fdc8 100644 @@ -31 +33 @@ -@@ -1018,9 +1018,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, +@@ -938,9 +938,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, @@ -37 +39 @@ -- bnxt_db_write(&rxr->rx_db, rxr->rx_raw_prod); +- bnxt_db_write(&rxr->rx_db, rxr->rx_prod); @@ -42 +44 @@ -index a6fdd7767a..b43256e03e 100644 +index 46c34e6e16..be5afcc8d1 100644 @@ -45,3 +47,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) +@@ -37,8 +37,6 @@ static inline uint16_t bnxt_tpa_start_agg_id(struct bnxt *bp, + #define BNXT_TPA_END_AGG_ID_TH(cmp) \ + rte_le_to_cpu_16((cmp)->agg_id)