summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2010-01-13 23:58:03 -0600
committerMike Christie <michaelc@cs.wisc.edu>2010-01-13 23:58:03 -0600
commit29a1a1d624c12d2db0645c69cd672d54a5bdc549 (patch)
treeb92d3f9ab901b5d1fbc1c6ebd38b4b301908147e
parent25e13880bf4ca9c546eb9eb7f7e3f8855d51105c (diff)
downloadopen-iscsi-29a1a1d624c12d2db0645c69cd672d54a5bdc549.tar.gz
iscsid be2iscsi: don't set set_host_ip
be2iscsi stores its ip info in flash, so there is not need for userspace to pass this down when starting up.
-rw-r--r--usr/initiator.c21
-rw-r--r--usr/transport.c1
2 files changed, 13 insertions, 9 deletions
diff --git a/usr/initiator.c b/usr/initiator.c
index 8735af9..58b4ef2 100644
--- a/usr/initiator.c
+++ b/usr/initiator.c
@@ -502,6 +502,7 @@ static iscsi_session_t*
__session_create(node_rec_t *rec, struct iscsi_transport *t)
{
iscsi_session_t *session;
+ int hostno, rc = 0;
session = calloc(1, sizeof (*session));
if (session == NULL) {
@@ -571,6 +572,17 @@ __session_create(node_rec_t *rec, struct iscsi_transport *t)
session->param_mask &= ~ISCSI_OFMARKER_EN;
}
+ hostno = iscsi_sysfs_get_host_no_from_hwinfo(&rec->iface, &rc);
+ if (!rc) {
+ /*
+ * if the netdev or mac was set, then we are going to want
+ * to want to bind the all the conns/eps to a specific host
+ * if offload is used.
+ */
+ session->conn[0].bind_ep = 1;
+ session->hostno = hostno;
+ }
+
list_add_tail(&session->list, &t->sessions);
return session;
}
@@ -2079,7 +2091,7 @@ int session_is_running(node_rec_t *rec)
static int iface_set_param(struct iscsi_transport *t, struct iface_rec *iface,
struct iscsi_session *session)
{
- int rc = 0, hostno;
+ int rc = 0;
log_debug(3, "setting iface %s, dev %s, set ip %s, hw %s, "
"transport %s.\n",
@@ -2096,13 +2108,6 @@ static int iface_set_param(struct iscsi_transport *t, struct iface_rec *iface,
return EINVAL;
}
- /* this assumes that the netdev or hw address is going to be set */
- hostno = iscsi_sysfs_get_host_no_from_hwinfo(iface, &rc);
- if (rc)
- return rc;
- session->conn[0].bind_ep = 1;
- session->hostno = hostno;
-
rc = __iscsi_host_set_param(t, session->hostno,
ISCSI_HOST_PARAM_IPADDRESS,
iface->ipaddress, ISCSI_STRING);
diff --git a/usr/transport.c b/usr/transport.c
index ebdfb1b..649f27b 100644
--- a/usr/transport.c
+++ b/usr/transport.c
@@ -62,7 +62,6 @@ struct iscsi_transport_template bnx2i = {
struct iscsi_transport_template be2iscsi = {
.name = "be2iscsi",
- .set_host_ip = 1,
.create_conn = be2iscsi_create_conn,
.ep_connect = ktransport_ep_connect,
.ep_poll = ktransport_ep_poll,