From patchwork Fri Jun 23 15:38:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13290794 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 8F4EDEB64D7 for ; Fri, 23 Jun 2023 15:50:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232068AbjFWPu1 (ORCPT ); Fri, 23 Jun 2023 11:50:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230348AbjFWPuZ (ORCPT ); Fri, 23 Jun 2023 11:50:25 -0400 Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA92A2120 for ; Fri, 23 Jun 2023 08:50:24 -0700 (PDT) Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-39ecf336d85so589089b6e.2 for ; Fri, 23 Jun 2023 08:50:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1687535424; x=1690127424; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6BTF5fK2TKqQRY8EhZ+X60hofsIHPlLlxA1J4eNg6Ns=; b=VFCWC0SrKgUQRq+6Yl9uysU7NhLnt3N4IFmaPmsm0Db10tX6gsZgMWIEaxsZaGOTjy WxOu9kydWCtQNZxTF8XMgIV//iXqL6Sl6NZOXwIktwWTWJMAbl7FXy9CQEmnYx9tImpi VV4MMGE9xZ1rDj2Lcj2X3n7X/v2jfN/PDuYi8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687535424; x=1690127424; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6BTF5fK2TKqQRY8EhZ+X60hofsIHPlLlxA1J4eNg6Ns=; b=Mw0ddJC6rHcRmQPsfzixzpu/5ZkB7WEpd8MS56fyvVVi5VwvPXxmUGkOmhH2mPH+31 SyXJKSJ7KwLtwq6aVJhviMO/+Rc6R8HQaBe48IXhWydnfUR0Dkrci23WVYFP2niJ0Emo 7pcZXq0pSbnYrK2cNjtf7o3pdRIEBMnJnJOB4KYMVghV6OtfP+u3wNV8XzYERrzrBbx3 87kNVUyEHaAEu5LXAWgE5DTDpRCkt15GwvKuEjf3AVaPVL6cgpzGc50ZlSyUID+d27xZ /UFD6Yh2TB3+d29GItVv1FAObtByKNEZEX3jzjGDJffUi297UVWvYJNoabVOeBOJMJKk 1qgg== X-Gm-Message-State: AC+VfDzqno38jhZaO7R7hqliNUiKy4TmPmef9c72Q63/sVnkf8FJ73Jz pN4qDwAZUmrk8QjH8OVK8Ax4xA== X-Google-Smtp-Source: ACHHUZ4ZJ7IsXKRH8IGJ2kuHXCR3znoqYPfP3l/QXcvvJbI+YF2AUhw+w2OLsKZI09QxOEhm/vzr6g== X-Received: by 2002:aca:f12:0:b0:3a1:b2b2:22c0 with SMTP id 18-20020aca0f12000000b003a1b2b222c0mr1068629oip.40.1687535423973; Fri, 23 Jun 2023 08:50:23 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id z124-20020a636582000000b00553d96d7feesm6637100pgb.35.2023.06.23.08.50.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jun 2023 08:50:22 -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 0/7] Doorbell Drop Prevention Date: Fri, 23 Jun 2023 08:38:30 -0700 Message-Id: <1687534717-17968-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 library patches will be posted soon. I am waiting for my previous pull request for libbnxt_re to be merged before initiating the new pull request. Thanks, Selvin Xavier 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, 378 insertions(+), 5 deletions(-)