All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Narsimhulu Musini (nmusini)" <nmusini@cisco.com>
To: Hannes Reinecke <hare@suse.de>,
	"JBottomley@Parallels.com" <JBottomley@Parallels.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"hch@infradead.org" <hch@infradead.org>
Cc: "Sesidhar Baddela (sebaddel)" <sebaddel@cisco.com>
Subject: Re: [PATCH v4 4/9] snic:Add snic target discovery
Date: Tue, 14 Apr 2015 10:15:31 +0000	[thread overview]
Message-ID: <D152E343.209D2%nmusini@cisco.com> (raw)
In-Reply-To: <552BD2C3.8010103@suse.de>

Hi Hannes,
    Thank you for reviewing patches. Please find responses inline.

On 13/04/15 7:59 pm, "Hannes Reinecke" <hare@suse.de> wrote:

>On 04/13/2015 07:25 AM, Narsimhulu Musini (nmusini) wrote:
>> Hi Hannes,
>> 
>>   Thank you for reviewing patches. Please find responses inline.
>> 
>> 
>> 
>> On 09/04/15 6:29 pm, "Hannes Reinecke" <hare@suse.de> wrote:
>> 
>>>
>>> On 04/09/2015 01:49 PM, Narsimhulu Musini wrote:
>[ .. ]
>>>> +/* snic_tgt_create: checks for existence of snic_tgt, if it doesn't
>>>> + * it creates one.
>>>> + */
>>>> +static struct snic_tgt *
>>>> +snic_tgt_create(struct snic *snic, struct snic_tgt_id *tgtid)
>>>> +{
>>>> +	struct snic_tgt *tgt = NULL;
>>>> +	unsigned long flags;
>>>> +	int ret;
>>>> +
>>>> +	tgt = snic_tgt_lookup(snic, tgtid);
>>>> +	if (tgt) {
>>>> +		/* update the information if required */
>>>> +		return tgt;
>>>> +	}
>>>> +
>>>> +	tgt = kzalloc(sizeof(*tgt), GFP_KERNEL);
>>>> +	if (!tgt) {
>>>> +		SNIC_HOST_ERR(snic->shost, "Failure to allocate snic_tgt.\n");
>>>> +		ret = -ENOMEM;
>>>> +
>>>> +		return tgt;
>>>> +	}
>>>> +
>>>> +	INIT_LIST_HEAD(&tgt->list);
>>>> +	tgt->id = tgtid->tgt_id;
>>>> +	tgt->channel = 0;
>>>> +
>>>> +	SNIC_BUG_ON(tgtid->tgt_type > SNIC_TGT_SAN);
>>>> +	tgt->tdata.typ = tgtid->tgt_type;
>>>> +
>>>> +	/*
>>>> +	 * Plugging into SML Device Tree
>>>> +	 */
>>>> +	tgt->tdata.disc_id = 0;
>>>> +	tgt->state = SNIC_TGT_STAT_INIT;
>>>> +	device_initialize(&tgt->dev);
>>>> +	tgt->dev.parent = get_device(&snic->shost->shost_gendev);
>>>> +	tgt->dev.release = snic_tgt_dev_release;
>>> Why do you use your own scsi target instantiation here?
>>> If it's equivalent to the scsi target than you should rather use the
>>> 'scsi_target' structure here and attach driver-specific information
>>> to either hostdata or starget_data.
>> I got your idea, we followed an approach similar to fc
>>(fc_rport_create()
>> in scsi_transport_fc.c).
>> Both are valid approaches. We opted for current approach, and gone
>>through
>> good amount of testing.
>> I would like to keep the way it is. Please share your thoughts.
>
>scsi_transport_fc() creates its own sysfs hierarchy for the remote
>port, which is inserted between scsi_host and scsi_target:
>
>/sys/devices/pci0000:00/0000:00:03.0/0000:07:00.3/host2/rport-2:0-13/targe
>t2:0:11/2:0:11:7
>
>here, the fc_rport structure corresponds to the FC sysfs hierarchy,
>containing all FC-related sysfs attributes. And as such makes sense
>have a distinct object.
>
>In your case no such hiearchy exists, and there are no additional
>sysfs attributes which would warrant the creation of a distinct object.
We will add sysfs attributes for targets in future patches. And about
hierarchy, The current approach provides the option, which we would like
to avail in future.
>
>Cheers,
>
>Hannes
>-- 
>Dr. Hannes Reinecke		               zSeries & Storage
>hare@suse.de			               +49 911 74053 688
>SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
>GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
>HRB 21284 (AG Nürnberg)
Thanks
simha
>

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-04-14 10:15 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09 11:49 [PATCH v4 0/9] snic:initial submission of snic driver for Cisco SCSI HBA Narsimhulu Musini
2015-04-09 11:49 ` [PATCH v4 1/9] snic: snic module infrastructure Narsimhulu Musini
2015-04-09 12:40   ` Hannes Reinecke
2015-04-09 11:49 ` [PATCH v4 2/9] snic:Add interrupt, resource firmware interfaces Narsimhulu Musini
2015-04-09 12:46   ` Hannes Reinecke
2015-04-09 11:49 ` [PATCH v4 3/9] snic:Add meta request, handling of meta requests Narsimhulu Musini
2015-04-09 12:50   ` Hannes Reinecke
2015-04-09 11:49 ` [PATCH v4 4/9] snic:Add snic target discovery Narsimhulu Musini
2015-04-09 12:59   ` Hannes Reinecke
2015-04-13  5:25     ` Narsimhulu Musini (nmusini)
2015-04-13 14:29       ` Hannes Reinecke
2015-04-14 10:15         ` Narsimhulu Musini (nmusini) [this message]
2015-04-09 11:49 ` [PATCH v4 5/9] snic:add SCSI handling, AEN, and fwreset handling Narsimhulu Musini
2015-04-09 13:16   ` Hannes Reinecke
2015-04-13  5:37     ` Narsimhulu Musini (nmusini)
2015-04-09 11:49 ` [PATCH v4 6/9] snic:Add low level queuing interfaces Narsimhulu Musini
2015-04-09 13:23   ` Hannes Reinecke
2015-04-13  5:40     ` Narsimhulu Musini (nmusini)
2015-04-09 11:49 ` [PATCH v4 7/9] snic:Add sysfs entries to list stats and trace data Narsimhulu Musini
2015-04-09 13:23   ` Hannes Reinecke
2015-04-09 11:49 ` [PATCH v4 8/9] snic:Add event tracing to capture IO events Narsimhulu Musini
2015-04-09 13:24   ` Hannes Reinecke
2015-04-09 11:49 ` [PATCH v4 9/9] snic:Add Makefile, patch Kconfig, MAINTAINERS Narsimhulu Musini
2015-04-09 13:25   ` Hannes Reinecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D152E343.209D2%nmusini@cisco.com \
    --to=nmusini@cisco.com \
    --cc=JBottomley@Parallels.com \
    --cc=hare@suse.de \
    --cc=hch@infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sebaddel@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.