[RFC PATCH v6 04/27] nvme-tcp-offload: Add device scan implementation

Hannes Reinecke hare at suse.de
Fri May 28 03:28:39 PDT 2021


On 5/28/21 1:58 AM, Shai Malin wrote:
> From: Dean Balandin <dbalandin at marvell.com>
> 
> As part of create_ctrl(), it scans the registered devices and calls
> the claim_dev op on each of them, to find the first devices that matches
> the connection params. Once the correct devices is found (claim_dev
> returns true), we raise the refcnt of that device and return that device
> as the device to be used for ctrl currently being created.
> 
> Acked-by: Igor Russkikh <irusskikh at marvell.com>
> Signed-off-by: Dean Balandin <dbalandin at marvell.com>
> Signed-off-by: Prabhakar Kushwaha <pkushwaha at marvell.com>
> Signed-off-by: Omkar Kulkarni <okulkarni at marvell.com>
> Signed-off-by: Michal Kalderon <mkalderon at marvell.com>
> Signed-off-by: Ariel Elior <aelior at marvell.com>
> Signed-off-by: Shai Malin <smalin at marvell.com>
> Reviewed-by: Himanshu Madhani <himanshu.madhani at oracle.com>
> ---
>  drivers/nvme/host/tcp-offload.c | 77 +++++++++++++++++++++++++++++++++
>  1 file changed, 77 insertions(+)
> 
I'm not entirely happy with the lookup mechanism; one should look at
converting it to a proper 'bus' like the mellanox driver did.
But that's something would could be done at a later stage.

Reviewed-by: Hannes Reinecke <hare at suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		        Kernel Storage Architect
hare at suse.de			               +49 911 74053 688
SUSE Software Solutions Germany GmbH, 90409 Nürnberg
GF: F. Imendörffer, HRB 36809 (AG Nürnberg)



More information about the Linux-nvme mailing list