>>> Chris Leech <cle...@redhat.com> schrieb am 19.10.2016 um 19:14 in Nachricht
<20161019171452.iflp5nibq7yzi...@straylight.hirudinean.org>:
> On Wed, Oct 19, 2016 at 01:02:18AM -0400, nilesh.jav...@cavium.com wrote:
>> From: Nilesh Javali <nilesh.jav...@cavium.com>
>> 
>> qedi is not attached to netdev hence avoid suppressing warnings.
>> 
>> Signed-off-by: Manish Rangankar <manish.rangan...@cavium.com>
>> Signed-off-by: Adheer Chandravanshi <adheer.chandravan...@qlogic.com>
>> Signed-off-by: Nilesh Javali <nilesh.jav...@cavium.com>
>> ---
>>  usr/initiator_common.c |  2 +-
>>  usr/transport.c        | 12 ++++++++++++
>>  2 files changed, 13 insertions(+), 1 deletion(-)
>> 
>> diff --git a/usr/initiator_common.c b/usr/initiator_common.c
>> index 1d1d822..dd3f3c4 100644
>> --- a/usr/initiator_common.c
>> +++ b/usr/initiator_common.c
>> @@ -700,7 +700,7 @@ int iscsi_host_set_net_params(struct iface_rec *iface,
>>              netdev = hinfo.iface.netdev;
>>      }
>>  
>> -    if (net_ifup_netdev(netdev))
>> +    if (strcmp(iface->transport_name, "qedi") && net_ifup_netdev(netdev))
>>              log_warning("Could not brining up netdev %s. Try running "
>>                          "'ifup %s' first if login fails.", netdev, netdev);
> 
> We're not scattering transport name checks all over the code.

At least the magic string should be replaced by a symbolic constant.

> Especially if this is just suppressing the warning level message, while
> net_ifup_netdev is probably logging an error?  This needs to be handled
> better.
> 
> Is this really the first transport we have that wants net params set
> from iscsid without exposing a netdev?  This is going to be fun shaking
> out all the details now that there's a second user of iscsiuio.
>   
>> diff --git a/usr/transport.c b/usr/transport.c
>> index 18b7704..b933c36 100644
>> --- a/usr/transport.c
>> +++ b/usr/transport.c
>> @@ -114,6 +114,17 @@ struct iscsi_transport_template ocs = {
>>      .ep_disconnect  = ktransport_ep_disconnect,
>>  };
>>  
>> +struct iscsi_transport_template qedi = {
>> +    .name           = "qedi",
>> +    .set_host_ip    = SET_HOST_IP_REQ,
>> +    .use_boot_info  = 1,
>> +    .bind_ep_required = 1,
>> +    .ep_connect     = ktransport_ep_connect,
>> +    .ep_poll        = ktransport_ep_poll,
>> +    .ep_disconnect  = ktransport_ep_disconnect,
>> +    .set_net_config = uip_broadcast_params,
>> +};
>> +
>>  static struct iscsi_transport_template *iscsi_transport_templates[] = {
>>      &iscsi_tcp,
>>      &iscsi_iser,
>> @@ -123,6 +134,7 @@ static struct iscsi_transport_template 
> *iscsi_transport_templates[] = {
>>      &qla4xxx,
>>      &be2iscsi,
>>      &ocs,
>> +    &qedi,
>>      NULL
>>  };
>>  
>> -- 
>> 1.8.3.1
>> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "open-iscsi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to open-iscsi+unsubscr...@googlegroups.com.
> To post to this group, send email to open-iscsi@googlegroups.com.
> Visit this group at https://groups.google.com/group/open-iscsi.
> For more options, visit https://groups.google.com/d/optout.




-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to open-iscsi+unsubscr...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to