lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 10 Nov 2022 12:53:48 +0200
From:   Leon Romanovsky <leon@...nel.org>
To:     Ajit Khaparde <ajit.khaparde@...adcom.com>
Cc:     andrew.gospodarek@...adcom.com, davem@...emloft.net,
        edumazet@...gle.com, jgg@...pe.ca, kuba@...nel.org,
        linux-kernel@...r.kernel.org, linux-rdma@...r.kernel.org,
        michael.chan@...adcom.com, netdev@...r.kernel.org,
        pabeni@...hat.com, selvin.xavier@...adcom.com
Subject: Re: [PATCH v4 0/6] Add Auxiliary driver support

On Wed, Nov 09, 2022 at 10:42:38AM -0800, Ajit Khaparde wrote:
> 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.

I still see extra checks for something that was already checked in upper
functions, for example in bnxt_re_register_netdev() you check rdev, which
you already checked before.

However, the most important part is still existence of bnxt_ulp_ops,
which shows completely no-go thing - SR-IOV config in RDMA code.

   302 static struct bnxt_ulp_ops bnxt_re_ulp_ops = {
   303         .ulp_sriov_config = bnxt_re_sriov_config,
   304         .ulp_irq_stop = bnxt_re_stop_irq,
   305         .ulp_irq_restart = bnxt_re_start_irq
   306 };

All PCI management logic and interfaces are needed to be inside eth part
of your driver and only that part should implement SR-IOV config. Once
user enabled SR-IOV, the PCI driver should create auxiliary devices for
each VF. These device will have RDMA capabilities and it will trigger RDMA
driver to bind to them.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ