All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: Michael Chan <mchan@broadcom.com>
Cc: "vikas.chaudhary@qlogic.com" <vikas.chaudhary@qlogic.com>,
	"James.Bottomley@suse.de" <James.Bottomley@suse.de>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"open-iscsi@googlegroups.com" <open-iscsi@googlegroups.com>,
	"lalit.chandivade@qlogic.com" <lalit.chandivade@qlogic.com>,
	"ravi.anand@qlogic.com" <ravi.anand@qlogic.com>,
	Eddie Wai <eddie.wai@broadcom.com>
Subject: Re: [RFC-V2 PATCH 4/5] iscsi_transport: show network configuration in sysfs
Date: Wed, 13 Apr 2011 22:24:57 -0500	[thread overview]
Message-ID: <4DA66909.2060100@cs.wisc.edu> (raw)
In-Reply-To: <1302735225.10843.307.camel@nseg_linux_HP1.broadcom.com>

On 04/13/2011 05:53 PM, Michael Chan wrote:
>
> On Wed, 2011-04-13 at 10:00 -0700, Mike Christie wrote:
>> ccing Broadcom devs, Some questions for you guys below
>>
>>
>> On 04/02/2011 01:34 PM, vikas.chaudhary@qlogic.com wrote:
>>> From: Vikas Chaudhary<vikas.chaudhary@qlogic.com>
>>>
>>> To support multiple network addresses per adapter need to have a new way to
>>> represent network interface (net iface) in sysfs.
>>>
>>> Currently only one ipaddress and hwaddress is displayed
>>>
>>> \# ls /sys/class/iscsi_host/host18
>>> device  hwaddress  initiatorname  ipaddress  power  subsystem  uevent
>>>
>>> In this patch the net iface is presented as a separate class device.
>>> The one that can be added/removed dynamically or statically, based on how
>>> the user configures the multiple net iface on the adapter.
>>>
>>> The new sysfs directory would look like this
>>> \# /sys/class/iscsi_iface/
>>> |
>>> |- ipv4-iface-<host_no>-<iface_no>/<-- for ipv4
>>>                                   |- ipaddress
>>>                                   |- subnet
>>>                                   |- gateway
>>>                                   |- bootproto
>>>                                   |- state
>>> |- ipv6-iface-<host_no>-<iface_no>/<-- for ipv6
>>>                                   |- ipaddress
>>>                                   |- link_local_addr
>>>                                   |- router_addr
>>>                                   |- ipaddr_autocfg
>>>                                   |- linklocal_autocfg
>>>                                   |- state
>>>
>>
>>
>> With patch "[RFC-V2 PATCH 1/5] iscsi_transport: add support for
>> set_net_config" userspace would send down the vlan info.
>>
>> If we add a vlan sysfs file to the iscsi_iface, to export the info was
>> bnx2i going call iscsi_create_iface for each vlan? If so I am not sure
>> what bnx2i will use for the iface_num. It is supposed to be persistent,
>> right?
>
> bnx2i doesn't need to know the IP addresses and VLANs for each HBA.  It
> is all handled in userspace by uIP.  So if we add this sysfs,
> iscsi_transport can handle sysfs creation for devices generically,
> right?


With these patches the driver need to call iface_create_iface and 
implement a callout on the iscsi_transport template so 
scsi_transport_iscsi.c can call into the driver to get the values to 
display in sysfs like is done for the connection and session settings. 
We can add some helpers in libiscsi for this like is done for the 
conn/session stuff.



>
>>
>> For bnx2i, when doing iscsi offload and vlans, do you have to have a
>> netdev like ethX.Y setup for each vlan or can bnx2i operate without it
>> (the call to cnic_get_vlan always throws me and I cannot remember if we
>> were going to still do that or change something in the driver so you did
>> not need it).
>
> For now, cnic_get_vlan will try to get a matching VLAN from netdev with
> a route to the target.  But it is not required.  Once we have VLAN
> attribute in iface, uIP can override and use the VLAN specified in
> iface.
>

Ok.

>
>>
>> And just to confirm for vlans and bnx2i, when we make a ep and session,
>> cnic_get_route/cnic_cm_select_dev will do the magic to figure out what
>> vlan to use?
>
> Yes for now.  The plan is for uIP to override if a VLAN is specified in
> iface.


Is the idea to have uIP read the userspace iface config files in 
/etc/iscsi/iface or /var/lib/iscsi/ifaces or iscsid (basically something 
in userspace) then pass down in a msg_set_path msg?


>
> This is the flow:
>
> ->  ep_connect
>
>      ->  cnic_cm_connect
>             /* Try to get route/MTU/VLAN from netdev if available */
>          ->  cnic_get_route
>          ->  send nl message to uIP to get next hop
>          ->  recv nl message from uIP
>             /* at this point we may get a new VLAN ID from uIP */
>          ->  make connection to target
>
>
>
>
> --
> 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:[~2011-04-14  3:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-02 18:34 [RFC-V2 PATCH 0/5] Proposal for iSCSI Network Configuration vikas.chaudhary
2011-04-02 18:34 ` [RFC-V2 PATCH 1/5] iscsi_transport: add support for set_net_config vikas.chaudhary
2011-04-13  3:41   ` Mike Christie
2011-04-02 18:34 ` [RFC-V2 PATCH 2/5] qla4xxx: " vikas.chaudhary
2011-04-13  3:55   ` Mike Christie
     [not found]     ` <4DA51ECA.1020507-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>
2011-04-13 14:40       ` Vikas Chaudhary
2011-04-02 18:34 ` [RFC-V2 PATCH 3/5] qla4xxx: Added new "struct ipaddress_config" vikas.chaudhary
2011-04-02 18:34 ` [RFC-V2 PATCH 4/5] iscsi_transport: show network configuration in sysfs vikas.chaudhary
2011-04-13  4:23   ` Mike Christie
2011-04-13  4:40     ` Mike Christie
2011-04-13 14:48       ` Vikas Chaudhary
     [not found]         ` <5E4F49720D0BAD499EE1F01232234BA8728A8CB623-HolNjIBXvBOXx9kJd3VG2h2eb7JE58TQ@public.gmane.org>
2011-04-13 16:44           ` Mike Christie
2011-04-14  4:15             ` Vikas Chaudhary
2011-04-14  5:18               ` Mike Christie
2011-04-14  5:54                 ` Vikas Chaudhary
2011-04-21 22:10     ` Jayamohan.Kallickal
2011-04-13 17:00   ` Mike Christie
2011-04-13 22:47     ` Shyam_Iyer
2011-04-14  3:07       ` Mike Christie
2011-04-13 22:53     ` Michael Chan
2011-04-14  3:24       ` Mike Christie [this message]
2011-04-19  2:41   ` Mike Christie
2011-04-19 13:47     ` Vikas Chaudhary
2011-04-02 18:34 ` [RFC-V2 PATCH 5/5] qla4xxx: added support to show multiple iface " vikas.chaudhary

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=4DA66909.2060100@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=James.Bottomley@suse.de \
    --cc=eddie.wai@broadcom.com \
    --cc=lalit.chandivade@qlogic.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mchan@broadcom.com \
    --cc=open-iscsi@googlegroups.com \
    --cc=ravi.anand@qlogic.com \
    --cc=vikas.chaudhary@qlogic.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.