RE: [PATCH v2 02/13] scsi: fnic: Add and use fnic number

Karan Tilak Kumar (kartilak)
2023-11-06T19:49:51Z

On Thursday, November 2, 2023 12:26 AM, Hannes Reinecke <hare@suse.de> wrote:
>
> On 10/27/23 20:02, Karan Tilak Kumar wrote:
> > Add fnic_num in fnic.h to identify fnic in a multi-fnic environment.
> > Increment and set the fnic number during driver load in fnic_probe.
> > Replace the host number with fnic number in debugfs.
> >
> > Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com>
> > Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com>
> > Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
> > ---
> > drivers/scsi/fnic/fnic.h | 1 +
> > drivers/scsi/fnic/fnic_debugfs.c | 2 +-
> > drivers/scsi/fnic/fnic_main.c | 6 +++++-
> > 3 files changed, 7 insertions(+), 2 deletions(-)
> >
> Why? The scsi host number gives you a perfectly good enumeration.
> And really all you do is replacing the scsi host number with an internal number, with no change in functionality.
>
> Why?
>
> Cheers,
>
> Hannes

Thanks for your review comments, Hannes.
The scsi host numbers are not contiguous. Having contiguous numbers makes it easier to debug.
Also, mapping to VIC hardware instances makes it easier to debug.

Regards,
Karan