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