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:   Mon, 5 Apr 2021 09:20:32 +0300
From:   Gal Pressman <galpress@...zon.com>
To:     Leon Romanovsky <leon@...nel.org>,
        Doug Ledford <dledford@...hat.com>,
        Jason Gunthorpe <jgg@...dia.com>
CC:     Parav Pandit <parav@...dia.com>,
        "David S. Miller" <davem@...emloft.net>,
        Dennis Dalessandro <dennis.dalessandro@...nelisnetworks.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Karsten Graul <kgraul@...ux.ibm.com>,
        <linux-kernel@...r.kernel.org>, <linux-rdma@...r.kernel.org>,
        <linux-s390@...r.kernel.org>,
        Mike Marciniszyn <mike.marciniszyn@...nelisnetworks.com>,
        <netdev@...r.kernel.org>, <rds-devel@....oracle.com>,
        Santosh Shilimkar <santosh.shilimkar@...cle.com>
Subject: Re: [PATCH rdma-next 1/8] RDMA/core: Check if client supports IB
 device or not

On 05/04/2021 8:49, Leon Romanovsky wrote:
> From: Parav Pandit <parav@...dia.com>
> 
> RDMA devices are of different transport(iWarp, IB, RoCE) and have
> different attributes.
> Not all clients are interested in all type of devices.
> 
> Implement a generic callback that each IB client can implement to decide
> if client add() or remove() should be done by the IB core or not for a
> given IB device, client combination.
> 
> Signed-off-by: Parav Pandit <parav@...dia.com>
> Signed-off-by: Leon Romanovsky <leonro@...dia.com>
> ---
>  drivers/infiniband/core/device.c | 3 +++
>  include/rdma/ib_verbs.h          | 9 +++++++++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
> index c660cef66ac6..c9af2deba8c1 100644
> --- a/drivers/infiniband/core/device.c
> +++ b/drivers/infiniband/core/device.c
> @@ -691,6 +691,9 @@ static int add_client_context(struct ib_device *device,
>  	if (!device->kverbs_provider && !client->no_kverbs_req)
>  		return 0;
>  
> +	if (client->is_supported && !client->is_supported(device))
> +		return 0;

Isn't it better to remove the kverbs_provider flag (from previous if statement)
and unify it with this generic support check?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ