From patchwork Mon Jul 17 05:53:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13315197 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 93107C001E0 for ; Mon, 17 Jul 2023 06:08:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231283AbjGQGIH (ORCPT ); Mon, 17 Jul 2023 02:08:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231345AbjGQGHv (ORCPT ); Mon, 17 Jul 2023 02:07:51 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33C4219BD for ; Sun, 16 Jul 2023 23:07:19 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1b9cd6a0051so24969005ad.1 for ; Sun, 16 Jul 2023 23:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1689574021; x=1692166021; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FOxiNhVUIkk6XznM190whCP1UXL369Da8s/oCPFiso0=; b=LhEUg19a2jWnrUllvPrVMeGwiAPDnbxfGploIuv8Er+arXDIcNZFoJ1ZPg1okHzflm JZHOwifGL6mpKJlrymhoqY2XG43pH5EQ4DWEoRbgZ35G+ktffrA/j5DJXzOHBaeX58tW /nWE5QQYFpHZxPZbkliW3BXKhcxHF+AZ4Oxrg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689574021; x=1692166021; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FOxiNhVUIkk6XznM190whCP1UXL369Da8s/oCPFiso0=; b=QCk+QHeg19O0p3SulWjRLz2cUm/yuYKG2DVAyDreYbu5o0aU6XvdoEFXksmXNKc5TA kuj9NY12T9jOAGHmfymoSyh2OORZD15cG8AvxS3OizHJACMCwR08BdH15MV9wFTKTzhA SpiwLYjnKoTRrP3XR4GmABcrImTY/YZdzKLLjPGVH3C+ffd8FPo0AirGavx4wi+Ff9eK k4aYWqAaQHgpTk/ljmGC173a6OwIfNbu05iCowPIvOSlKhu7e1dp3FNtYvrByuUXScDs qIol0Hc9tKfLn8fZjDR8YKRHGOHaqn09ke9KLYlBaZJEqZpU6RB2A4AzRe+i2hhxA/c+ Y02g== X-Gm-Message-State: ABy/qLYrj7G8AEjjX8IBsx0oFo4uF/6geApTzwIf4FOX8tpadvRA9bR4 QVwVdAaaYZbmoLKHxMw97BbDqw== X-Google-Smtp-Source: APBJJlERYl14O9dfjJh9WmbgKtUsdSHis4T03ddyhNrWKO0dosaD8LmyEvxllETfES6J00IOFGUxjQ== X-Received: by 2002:a17:902:ec88:b0:1b8:1687:b53 with SMTP id x8-20020a170902ec8800b001b816870b53mr12155748plg.26.1689574021608; Sun, 16 Jul 2023 23:07:01 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id q17-20020a170902789100b001b9da7b6bc3sm11849632pll.184.2023.07.16.23.06.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Jul 2023 23:07:00 -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 v2 0/7]RDMA/bnxt_re: Doorbell Drop Prevention Date: Sun, 16 Jul 2023 22:53:07 -0700 Message-Id: <1689573194-27687-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, Selivn 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 | 51 +++++- 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, 379 insertions(+), 4 deletions(-)