> -----Original Message----- > From: Mike Christie [mailto:[email protected]] > Sent: Tuesday, October 25, 2011 3:45 PM > To: [email protected] > Cc: Anish Bhatt > Subject: Re: [PATCH] make if.ipaddress optional in iface configuration > files for offload iscsi > > On 10/25/2011 01:58 PM, Anish Bhatt wrote: > > Currently, the iface.ipaddress field is required in iface files for > > offload iscsi. This is not generated by `iscsiadm -m iface` , > requiring > > manual editing of the files. However, some transports (like Chelsio) > can > > work without needing the ipaddress to be explicitly defined in the > iface > > files. This patch lets the transport template specify that this > field > > is optional. After patch, transport can pull ip address from the > system, > > but this can still be overridden by specifying iface.ipaddress , thus > > dropping the hard requirement. > > Ah, I thought we always had to set it for chelsio cards. For chelsio > cards does this work if the iscsi function does not have any address > set > at all or is it already setup by some other tools or previous iscsiadm > run?
Nope, it does not require any setting of ip address at all, as long is
link is up with an address.
> If nothing is set by the iscsi tools is the ip of the netdev/ethX that
> the iscsi interface is bound supposed to be used then?
Yes, the default behavior is to use the ip from the netdev/ethX which
was already upstream but never hit due to this requirement.
>
>
> + return EINVAL;
> + } else if(t->template->set_host_ip == SET_HOST_IP_OPT)
> {
> + log_info("Optional iface.ipaddress for iface
> %s, "
> + "not set.\n", iface->name);
> + return 0;
>
>
>
> diff --git a/usr/transport.c b/usr/transport.c
> index 5d6bea4..fc85ce7 100644
> --- a/usr/transport.c
> +++ b/usr/transport.c
> @@ -45,7 +45,7 @@ struct iscsi_transport_template iscsi_iser = {
>
> struct iscsi_transport_template cxgb3i = {
> .name = "cxgb3i",
> - .set_host_ip = 1,
> + .set_host_ip = 2,
> .ep_connect = ktransport_ep_connect,
> .ep_poll = ktransport_ep_poll,
> .ep_disconnect = ktransport_ep_disconnect,
> @@ -54,7 +54,7 @@ struct iscsi_transport_template cxgb3i = {
>
> struct iscsi_transport_template cxgb4i = {
> .name = "cxgb4i",
> - .set_host_ip = 1,
> + .set_host_ip = 2,
> .ep_connect = ktransport_ep_connect,
> .ep_poll = ktransport_ep_poll,
> .ep_disconnect = ktransport_ep_disconnect,
> diff --git a/usr/transport.h b/usr/transport.h
>
> Since you made it into a enum use the enum names instead of the
> numerical values. It will be easier to read.
Update patch attached. Left .set_host_ip = 0 untouched though. Added
some comments.
-Anish
--
You received this message because you are subscribed to the Google Groups
"open-iscsi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/open-iscsi?hl=en.
oiscsi_fix_iface_generation_v2.patch
Description: oiscsi_fix_iface_generation_v2.patch
