From patchwork Wed Jul 19 05:02:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13318145 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4185EB64DA for ; Wed, 19 Jul 2023 05:17:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229475AbjGSFRQ (ORCPT ); Wed, 19 Jul 2023 01:17:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbjGSFRP (ORCPT ); Wed, 19 Jul 2023 01:17:15 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C51E11BF3 for ; Tue, 18 Jul 2023 22:17:13 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1bb119be881so44911125ad.3 for ; Tue, 18 Jul 2023 22:17:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1689743833; x=1692335833; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eZrhytCjXKPP6YRSiD8CKSNohqjiVavs4Jn2AvuXx5U=; b=g6cIqD1gpfddvQp4YlPuwNQNEV4K+fxu6cLyIfMO/d2+Nfg+at3XaQP0xMTtXKjBbI FcMGcveYPlANtviRWFH6xn9CTySoUnbdRcACXY7av+VqjjWkyVdw0poeTbx2zWd0R9lm l+2OYtqzsOP2q3KR3K1Kfv+XGTq5wbbVuIp+I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689743833; x=1692335833; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eZrhytCjXKPP6YRSiD8CKSNohqjiVavs4Jn2AvuXx5U=; b=XKuJxfMsA9fjF5uaC0Qy6GUx6VvG7jCZq8ZV/G+XqaYUw7tpE0YfjTEl55QHt4B5G4 yk7PCg7MOziAtAtGlA92xwS8MIi0FM9r6GZdDUUQI7cL8RptaMp+yu4dRLJOMK3xuMsS ZI55A00DyFGgdWbCi8Ihi6ZOUByfnrEbhyEF4sW/YVDedqoQxWhnlKm0sLOufK3XLQOc l34fwoRvO8GLw1LQKlJL8Iu7wp47yiyX/3S7i6mWG/TBPp3pS2bi2JVbqBqV4nJh/oHn S4un3K8dzb50LNJhF5F7t+l0+Ruzu8rEPqM3y97VhGALLvvsRstaVhquUEIJUR+y+mZM bleA== X-Gm-Message-State: ABy/qLbi/tNVYkkVoKsRYCafn7LsmeT1px+gw7yTRjgA4JwKSdUAVBTV c1lnLZJA7xXtuiV8WId06Q/4Gg== X-Google-Smtp-Source: APBJJlFsMsi9TZDiVFsDUXbjQEbjMQ45boDLoL9dRm0u0G4kCqpECi4T20OTy50LWbutObq7qsKMSw== X-Received: by 2002:a17:903:1248:b0:1b8:94f4:3e0 with SMTP id u8-20020a170903124800b001b894f403e0mr20858528plh.14.1689743833189; Tue, 18 Jul 2023 22:17:13 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id t8-20020a170902e84800b001b9de8fbd78sm2816424plg.212.2023.07.18.22.17.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jul 2023 22:17:10 -0700 (PDT) From: Selvin Xavier To: jgg@ziepe.ca, leon@kernel.org Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, michael.chan@broadcom.com, Selvin Xavier Subject: [PATCH for-next v3 0/7] RDMA/bnxt_re: Doorbell Drop Prevention Date: Tue, 18 Jul 2023 22:02:50 -0700 Message-Id: <1689742977-9128-1-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org The idea behind this series is to prevent Doorbell drops on some of the Broadcom adapters that require Doorbell moderation. This is achieved by pacing the doorbell writes into the hardware FIFO. The rate at which individual doorbells are written needs to be dynamically adjusted, because it depends on the ability of the hardware to drain the FIFO and on the number and behavior of individual doorbell writers. When congestion is detected by the user library, it notifies the driver and driver adjust the pacing parameters dynamically in a shared page, which will be used for pacing the Doorbells. Currently this feature is targeted only for user applications. The corresponding user lib patch is in the pull request. https://github.com/linux-rdma/rdma-core/pull/1360 Thanks, Selvin Xavier v2 -> v3: Fix the build warning Reported-by: kernel test robot v1 -> v2: Rebased the patches on top of the latest for-next branch Chandramohan Akula (7): bnxt_en: Update HW interface headers bnxt_en: Share the bar0 address with the RoCE driver RDMA/bnxt_re: Initialize Doorbell pacing feature RDMA/bnxt_re: Enable pacing support for the user apps RDMA/bnxt_re: Update alloc_page uapi for pacing RDMA/bnxt_re: Implement doorbell pacing algorithm RDMA/bnxt_re: Add a new uapi for driver notification drivers/infiniband/hw/bnxt_re/bnxt_re.h | 27 ++++ drivers/infiniband/hw/bnxt_re/ib_verbs.c | 52 +++++- drivers/infiniband/hw/bnxt_re/ib_verbs.h | 2 + drivers/infiniband/hw/bnxt_re/main.c | 220 ++++++++++++++++++++++++++ drivers/infiniband/hw/bnxt_re/qplib_res.h | 19 +++ drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 54 +++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h | 1 + include/uapi/rdma/bnxt_re-abi.h | 7 + 9 files changed, 380 insertions(+), 4 deletions(-)