From patchwork Mon Oct 23 14:03:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13432898 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 53A97CDB474 for ; Mon, 23 Oct 2023 14:15:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229807AbjJWOPS (ORCPT ); Mon, 23 Oct 2023 10:15:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229589AbjJWOPR (ORCPT ); Mon, 23 Oct 2023 10:15:17 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84A79B3 for ; Mon, 23 Oct 2023 07:15:15 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-6bd96cfb99cso2498229b3a.2 for ; Mon, 23 Oct 2023 07:15:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1698070515; x=1698675315; darn=vger.kernel.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1W8MPWAiEFtTdJRP8f+XKMsdta4h3ZI2UcPwJu1Wd3c=; b=GhlqupnEeBoROWelSyLQgVfOhBKLBbieVPv/gN1502m8Nj/5QDNpO2aTQOvDTq2c3Q 455x081SDbzamVv4nTS8FIIExwcZSZQxDrzkmdcEwA/6HU/NQVznLWRyrtex9qNnDq9u Q7UlcPDAMQ6HZHxej1HtTmAujGTs8Ii7eJsiY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698070515; x=1698675315; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1W8MPWAiEFtTdJRP8f+XKMsdta4h3ZI2UcPwJu1Wd3c=; b=fDtvs47euraTr5vYfdp1b3rQRL9rX6QSFwJyQFk97NVLnAjshmBnFfxjtshJIHcMrv M4b+OdwtRAorpYMmAElg1lPPIhV1aTY6uL60lIj9+ShV1a9FAykv46KH+TxmwEVy8HCh 8ho7Cjf8yPJ9qunaJFcCztFm9ulz7TcDirkdyii1ohLm/Xb1edf4tSAaoERpDwG70JYu +mpXcGrUn/pRZrrUBCVCm9qI0wHzZ/H6F55PZshYXbWYDZb+h7pXnV2XmV8NEq4lHMvY 64MVCSsybH91T7e9EQRWDta4f0Vyy7fp7DHTHC+X+j1ek6VWqqMjtSCynofNUzJHwdt6 rbHw== X-Gm-Message-State: AOJu0YycGwpypq+ePAX0G1BXk8EoLscZkT6PmWGAGYhHNbfoBEirHBoa DeaKT5YFFEJg+l0s2dxc+tHxIw== X-Google-Smtp-Source: AGHT+IGiKw0jAbF0QAn/M3ahVN5163lrr9A8XJ8ZWZCv+830AgBjBt9MzcKtDxF9kPF16QhMI7J63A== X-Received: by 2002:a05:6a00:2387:b0:6bd:f760:6ab1 with SMTP id f7-20020a056a00238700b006bdf7606ab1mr6733189pfc.14.1698070514778; Mon, 23 Oct 2023 07:15:14 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id y10-20020a62ce0a000000b0069ea08a2a99sm6404299pfg.211.2023.10.23.07.15.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Oct 2023 07:15:14 -0700 (PDT) From: Selvin Xavier To: jgg@ziepe.ca, leon@kernel.org Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, Selvin Xavier Subject: [PATCH for-next 0/2] RDMA/bnxt_re: Optimize the memory usage by the driver Date: Mon, 23 Oct 2023 07:03:21 -0700 Message-Id: <1698069803-1787-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 This series changes the wrap around condition and avoid using the power of 2 number of entries while creating the HW resources like QPs/CQs/MRs. Also, added backward compatibility to work with different versions of the driver and library. Corresponding lib changes are available in the following pull request. https://github.com/linux-rdma/rdma-core/pull/1400 Thanks, Selvin Xavier Chandramohan Akula (2): RDMA/bnxt_re: Refactor the queue index update bnxt_re: Remove roundup_pow_of_two depth for all hardware queue resources drivers/infiniband/hw/bnxt_re/ib_verbs.c | 57 ++++++++---- drivers/infiniband/hw/bnxt_re/ib_verbs.h | 7 ++ drivers/infiniband/hw/bnxt_re/qplib_fp.c | 138 ++++++++++++++--------------- drivers/infiniband/hw/bnxt_re/qplib_fp.h | 20 ++++- drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 17 ++-- drivers/infiniband/hw/bnxt_re/qplib_rcfw.h | 4 +- drivers/infiniband/hw/bnxt_re/qplib_res.c | 2 +- drivers/infiniband/hw/bnxt_re/qplib_res.h | 37 +++++--- include/uapi/rdma/bnxt_re-abi.h | 9 ++ 9 files changed, 177 insertions(+), 114 deletions(-)