Message ID | 20230108030208.26390-1-ajit.khaparde@broadcom.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1542687wrt; Sat, 7 Jan 2023 19:03:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXtBBg4/w/ZSwipJ9prdls9sPSlLKWlexq/dLCUAVQ7EoRnJjpPH4ov2rvL/tB1M3hdbEFe+ X-Received: by 2002:a17:902:7590:b0:189:7100:c50e with SMTP id j16-20020a170902759000b001897100c50emr70916803pll.48.1673146994224; Sat, 07 Jan 2023 19:03:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673146994; cv=none; d=google.com; s=arc-20160816; b=iaafUOmB3nO3Om8faSvIizK/TIjBF57UosIVcDRni2wRbqyBkQAxXqNiWBmWQ3Rvir XgGEMqj16dD0f83RJhQNxATNADU9PUgKXHowmTSRL/+TgvBcCeserS1cJDEF6khjyDnC CbNmDBg1/JTu9J2qUiNMK97gMQDy7o5l6poC69+w8bqdivjfH+ok1PldHkCOsIYJOQ9V AtiD3kTh4vKgBoXpCt95Wa/91QKOLefGUmnt98FfkdQ1fe8Sf3ZGAvVSU9m/Z8xWwe+E EbRGCKDAH+zGzVUCG9EiCnpNIR079JFawE24lT4exIhSwC2MyBDxxhRIgoGlKr5wok+7 X8sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=hZ8oEdLzMsQRrdByUr+N2G/Zh4Q71W8RG3QYg8JHGD8=; b=oTK/7EAzcJhiq0ycQax+O01GleOYl2kag+pHEDj29KQ+8sZiCqab5lJk1Esw9zS7Xu pUDqLESTo22TJKCGVCNlWcHIYr89FzAUMLsvbmeGo4xwntfo2Oie9vrm9G9nZXyUkC3Y Y0crYNQzkysJiDltCg3MJnyg6ON+HOorHUxrl04Wok6Ps3FQflUwOs9NV2FkOmyBDE/x 1EsoXgO69QzTH97VpvyfAkww00dRlwcCJCssLgTSbgWj1iCFiMwFFotiACZ7bMdFE4j0 0pZatfnZLCwvrNRKhRVeLGfMEv5K+01Z29Pk/uhaCNbAuDmgei7xBLMXSRlf3g/GHAv4 z08Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=ZUUGIIVQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x24-20020a170902b41800b00189d696974fsi4942472plr.522.2023.01.07.19.03.01; Sat, 07 Jan 2023 19:03:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=ZUUGIIVQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232242AbjAHDCW (ORCPT <rfc822;old.home.clock.tower@gmail.com> + 99 others); Sat, 7 Jan 2023 22:02:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231398AbjAHDCS (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 7 Jan 2023 22:02:18 -0500 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2603BF5BF for <linux-kernel@vger.kernel.org>; Sat, 7 Jan 2023 19:02:17 -0800 (PST) Received: by mail-pf1-x434.google.com with SMTP id z7so3789039pfq.13 for <linux-kernel@vger.kernel.org>; Sat, 07 Jan 2023 19:02:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=hZ8oEdLzMsQRrdByUr+N2G/Zh4Q71W8RG3QYg8JHGD8=; b=ZUUGIIVQHRdbIU4U2gCiIe4drJz6pyMqfAZiIK36Hngz4mxYAJw0EbQ4iRTACo/e55 H9QkMJWvpMYAfxuOEUa/NWztRhSm+RMC0pUqDejuKWyTDvWk6puOc83aAuZpLlbEWBTM 1XSo8jiSgOpXgIbFdLNLIlo7ct4MPcmpV013A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=hZ8oEdLzMsQRrdByUr+N2G/Zh4Q71W8RG3QYg8JHGD8=; b=VTSLpu9RchCWdJzr5ttECuWzj0SdnaSJYyNmpbYX2aB8qchpZuLCna+vJSw7N9Gm++ sxjw/0g7As5mtOGbsU/0PIOjNV+IbYJE2zcY4fWwlZEEI3eAFWOKvJ1Q22ZvpmlFIgEP iUmMHWQl3DvHn6NM4jN6LdoGQsEFklXVyzt1U3RwU0jNnPSpTmpjX92ayKvuJ2pYidNt META1PJudyGLdwUlcKyq4t0reqoMUiWKiljkIz6DDXS38vAo6zY7xefReC69h+IPj8Mj CReG+IeH3iNgAav5yyAltkYTDw36KeAZHeYEB5P4lG9TEJAu3iOMjx3A0bhuoYCWoDDC HHWA== X-Gm-Message-State: AFqh2kp3n+ga/OwPXlR24f2ofkxgZDX06E2KY8/brJ9hGysIyKYxHh0l eOKY0ctARnPvTe4hF2X0tvt9+w== X-Received: by 2002:a05:6a00:2164:b0:581:2f69:87ed with SMTP id r4-20020a056a00216400b005812f6987edmr42497009pff.34.1673146936362; Sat, 07 Jan 2023 19:02:16 -0800 (PST) Received: from localhost.localdomain ([2605:a601:a780:1400:1caf:227a:5e9d:33c3]) by smtp.gmail.com with ESMTPSA id 69-20020a621748000000b005810a54fdefsm3452148pfx.114.2023.01.07.19.02.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Jan 2023 19:02:14 -0800 (PST) From: Ajit Khaparde <ajit.khaparde@broadcom.com> To: ajit.khaparde@broadcom.com Cc: andrew.gospodarek@broadcom.com, davem@davemloft.net, edumazet@google.com, jgg@ziepe.ca, kuba@kernel.org, leon@kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, michael.chan@broadcom.com, netdev@vger.kernel.org, pabeni@redhat.com, selvin.xavier@broadcom.com Subject: [PATCH 0/8] Add Auxiliary driver support Date: Sat, 7 Jan 2023 19:02:00 -0800 Message-Id: <20230108030208.26390-1-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000d4d17f05f1b7e0b4" X-Spam-Status: No, score=1.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MIME_NO_TEXT, RCVD_IN_DNSWL_NONE,SORTED_RECIPS,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754421783053536361?= X-GMAIL-MSGID: =?utf-8?q?1754421783053536361?= |
Series |
Add Auxiliary driver support
|
|
Message
Ajit Khaparde
Jan. 8, 2023, 3:02 a.m. UTC
Ajit Khaparde <ajit.khaparde@broadcom.com> Dec 7, 2022, 9:53 AM to me, andrew.gospodarek, davem, edumazet, jgg, kuba, leon, linux-kernel, linux-rdma, michael.chan, netdev, pabeni, selvin.xavier Add auxiliary device driver for Broadcom devices. The bnxt_en driver will register and initialize an aux device if RDMA is enabled in the underlying device. The bnxt_re driver will then probe and initialize the RoCE interfaces with the infiniband stack. We got rid of the bnxt_en_ops which the bnxt_re driver used to communicate with bnxt_en. Similarly We have tried to clean up most of the bnxt_ulp_ops. In most of the cases we used the functions and entry points provided by the auxiliary bus driver framework. And now these are the minimal functions needed to support the functionality. We will try to work on getting rid of the remaining if we find any other viable option in future. v1->v2: - Incorporated review comments including usage of ulp_id & complex function indirections. - Used function calls provided by the auxiliary bus interface instead of proprietary calls. - Refactor code to remove ROCE driver's access to bnxt structure. v2->v3: - Addressed review comments including cleanup of some unnecessary wrappers - Fixed warnings seen during cross compilation v3->v4: - Cleaned up bnxt_ulp.c and bnxt_ulp.h further - Removed some more dead code - Sending the patchset as a standalone series v4->v5: - Removed the SRIOV config callback which bnxt_en driver was calling into bnxt_re driver. - Removed excessive checks for rdev and other pointers. v5->v6: - Removed excessive checks for dev and other pointers - Remove runtime interrupt vector allocation. bnxt_en preallocates interrupt vectors for bnxt_re to use. Please apply. Thanks. Ajit Khaparde (7): bnxt_en: Add auxiliary driver support RDMA/bnxt_re: Use auxiliary driver interface bnxt_en: Remove usage of ulp_id bnxt_en: Use direct API instead of indirection bnxt_en: Use auxiliary bus calls over proprietary calls RDMA/bnxt_re: Remove the sriov config callback bnxt_en: Remove runtime interrupt vector allocation Hongguang Gao (1): bnxt_en: Remove struct bnxt access from RoCE driver drivers/infiniband/hw/bnxt_re/bnxt_re.h | 10 +- drivers/infiniband/hw/bnxt_re/main.c | 635 +++++++----------- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 11 +- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 8 + .../net/ethernet/broadcom/bnxt/bnxt_sriov.c | 7 +- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 489 ++++++-------- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h | 57 +- 7 files changed, 494 insertions(+), 723 deletions(-)
Comments
On Sat, Jan 07, 2023 at 07:02:00PM -0800, Ajit Khaparde wrote: > > Ajit Khaparde <ajit.khaparde@broadcom.com> > Dec 7, 2022, 9:53 AM > to me, andrew.gospodarek, davem, edumazet, jgg, kuba, leon, linux-kernel, linux-rdma, michael.chan, netdev, pabeni, selvin.xavier > > Add auxiliary device driver for Broadcom devices. > The bnxt_en driver will register and initialize an aux device > if RDMA is enabled in the underlying device. > The bnxt_re driver will then probe and initialize the > RoCE interfaces with the infiniband stack. > > We got rid of the bnxt_en_ops which the bnxt_re driver used to > communicate with bnxt_en. > Similarly We have tried to clean up most of the bnxt_ulp_ops. > In most of the cases we used the functions and entry points provided > by the auxiliary bus driver framework. > And now these are the minimal functions needed to support the functionality. > > We will try to work on getting rid of the remaining if we find any > other viable option in future. > > v1->v2: > - Incorporated review comments including usage of ulp_id & > complex function indirections. > - Used function calls provided by the auxiliary bus interface > instead of proprietary calls. > - Refactor code to remove ROCE driver's access to bnxt structure. > > v2->v3: > - Addressed review comments including cleanup of some unnecessary wrappers > - Fixed warnings seen during cross compilation > > v3->v4: > - Cleaned up bnxt_ulp.c and bnxt_ulp.h further > - Removed some more dead code > - Sending the patchset as a standalone series > > v4->v5: > - Removed the SRIOV config callback which bnxt_en driver was calling into > bnxt_re driver. > - Removed excessive checks for rdev and other pointers. > > v5->v6: > - Removed excessive checks for dev and other pointers > - Remove runtime interrupt vector allocation. bnxt_en preallocates > interrupt vectors for bnxt_re to use. > > Please apply. Thanks. > > Ajit Khaparde (7): > bnxt_en: Add auxiliary driver support > RDMA/bnxt_re: Use auxiliary driver interface > bnxt_en: Remove usage of ulp_id > bnxt_en: Use direct API instead of indirection > bnxt_en: Use auxiliary bus calls over proprietary calls > RDMA/bnxt_re: Remove the sriov config callback > bnxt_en: Remove runtime interrupt vector allocation > > Hongguang Gao (1): > bnxt_en: Remove struct bnxt access from RoCE driver > Thanks a lot for pursuing it, Reviewed-by: Leon Romanovsky <leonro@nvidia.com>