be2iscsi can store its ip address in firmware/flash so there is no need
to have to set one in a iface. Just use whatever is in firmware/flash.
--
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.
diff --git a/usr/initiator.c b/usr/initiator.c
index 7158a38..b01c16b 100644
--- a/usr/initiator.c
+++ b/usr/initiator.c
@@ -503,6 +503,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) {
@@ -572,6 +573,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;
}
@@ -2080,7 +2092,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",
@@ -2097,13 +2109,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,