>-----Original Message-----
>From: Mike Christie [mailto:[email protected]]
>Sent: Tuesday, March 15, 2011 11:19 AM
>To: Vikas Chaudhary
>Cc: [email protected]; Lalit Chandivade; Harish Zunjarrao; Manish
>Rangankar; Ravi Anand
>Subject: Re: [PATCH] [RFC] Add netconfig support in iscsiadm and iscsid
>
>On 02/25/2011 04:56 AM, Vikas Chaudhary wrote:
>> +static int
>> +mgmt_ipc_set_host_net_config(queue_task_t *qtask)
>> +{
>> +       struct iscsi_transport *t;
>> +       int param_count;
>> +       int err;
>> +
>> +       param_count = qtask->req.payload_len/sizeof(struct
>iscsi_net_param);
>> +
>> +       t = iscsi_sysfs_get_transport_by_name(
>> +           qtask->req.u.set_net_config.transport_name);
>> +
>> +       if (ipc->set_net_config(t->handle,
>> +           qtask->req.u.set_net_config.host_no, qtask->payload,
>param_count))
>> +               err = ISCSI_ERR;
>> +       else
>> +               err = ISCSI_SUCCESS;
>> +
>> +       mgmt_ipc_write_rsp(qtask, err);
>> +       return ISCSI_SUCCESS;
>> +}
>
>Are you having iscsid do the actual set_net_config netlink msg because
>that is how we were doing other stuff at the time or was there another
>reason? I ask because we used to do all nl msgs through iscsid, but
>there is no need to do this now. You can just do:
>
>int fd;
>
>fd = ipc->ctldev_open();
>if (fd < 0)
>       return some_error;
>
>ipc->writev(....)
>
>ipc->ctldev_close();
>
>It is nice because you do not have to go through iscsid just to send a msg.

We used iscsid since other stuff was done in that fasion...next RFC/patch we 
will change to send net_config using iscsiadm.

This message and any attached documents contain information from QLogic 
Corporation or its wholly-owned subsidiaries that may be confidential. If you 
are not the intended recipient, you may not read, copy, distribute, or use this 
information. If you have received this transmission in error, please notify the 
sender immediately by reply e-mail and then delete this message.

-- 
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.

Reply via email to