Re: [PATCH] BNX2I: Removed the individual PCI DEVICE ID checking

2012-10-24 Thread Mike Christie
On 10/15/2012 07:31 PM, Eddie Wai wrote:
 Removed the individual PCI DEVICE ID checking inside bnx2i.  The device
 type can easily be read from the corresponding cnic-flags.  This will
 free bnx2i from having to get updated for every new device ID that gets
 added.
 
 Signed-off-by: Eddie Wai eddie@broadcom.com
 Acked-by: Michael Chan mc...@broadcom.com

Looks ok.

Reviewd-by: Mike Christie micha...@cs.wisc.edu

-- 
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.



Re: [PATCH 3/4] ISCSID: Added the extraction of the session boot_nic info

2012-10-24 Thread Eddie Wai

On Wed, 2012-10-24 at 01:27 -0500, Mike Christie wrote:
 On 10/22/2012 05:13 PM, Eddie Wai wrote:
   
  @@ -920,6 +921,28 @@ int iscsi_sysfs_get_sessioninfo_by_id(struct 
  session_info *info, char *session)
   
  iscsi_sysfs_read_iface(info-iface, host_no, session, NULL);
   
  +   ret = sysfs_get_str(session, ISCSI_SESSION_SUBSYS, boot_nic,
  +   boot_nic, NAME_SIZE);
  +   if (!ret) {
  +   /* If boot_nic exist, then extract the info from the boot nic */
  +   ret = sysfs_get_str(boot_nic, ISCSI_IBFT_SUBSYS,
  +   vlan, id, NAME_SIZE);
  +   if (ret)
  +   log_debug(5, could not read %s/vlan: %d,
  + boot_nic, ret);
  +   else
  +   info-iface.vlan_id = atoi(id);
  +
  +   ret = sysfs_get_str(boot_nic, ISCSI_IBFT_SUBSYS,
  +   subnet-mask, info-iface.subnet_mask,
  +   NI_MAXHOST);
  +   if (ret)
  +   log_debug(5, could not read %s/subnet: %d,
  + boot_nic, ret);
  +   } else {
  +   log_debug(5, could not read boot_nic: %d, ret);
  +   }
  +
 
 It seems like this should go in iscsi_sysfs_read_iface.
Yeah, I think so also.
 
 Why only boot nic? Why don't we also export the boot target and initiator?
The ibft-initiator only has the initiator-name that is of interest.
But this info is already in the session sysfs, so I wouldn't think this
would be too helpful.

The ibft-targetN contains the following info:
chap-type, ip-addr, lun, nic-assoc, port, target-name

Many of which are also in the session sysfs as well.  Is there something
in particular that we might be interested in that I missed?  Or are you
just thinking its best to populate all the associated ibft info first
and have a choice to pick and choose what we need for future
augmentations?

The main reason why we need the ethernetN is just because the few net
params in the ibft doesn't get passed over to the session sysfs.  One of
which is the vlan_id which is something that we really need.

Thanks,
Eddie
 


-- 
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.



Re: [PATCH 3/4] ISCSID: Added the extraction of the session boot_nic info

2012-10-24 Thread Mike Christie
On 10/24/2012 01:03 PM, Eddie Wai wrote:
 
 On Wed, 2012-10-24 at 01:27 -0500, Mike Christie wrote:
 On 10/22/2012 05:13 PM, Eddie Wai wrote:
  
 @@ -920,6 +921,28 @@ int iscsi_sysfs_get_sessioninfo_by_id(struct 
 session_info *info, char *session)
  
 iscsi_sysfs_read_iface(info-iface, host_no, session, NULL);
  
 +   ret = sysfs_get_str(session, ISCSI_SESSION_SUBSYS, boot_nic,
 +   boot_nic, NAME_SIZE);
 +   if (!ret) {
 +   /* If boot_nic exist, then extract the info from the boot nic */
 +   ret = sysfs_get_str(boot_nic, ISCSI_IBFT_SUBSYS,
 +   vlan, id, NAME_SIZE);
 +   if (ret)
 +   log_debug(5, could not read %s/vlan: %d,
 + boot_nic, ret);
 +   else
 +   info-iface.vlan_id = atoi(id);
 +
 +   ret = sysfs_get_str(boot_nic, ISCSI_IBFT_SUBSYS,
 +   subnet-mask, info-iface.subnet_mask,
 +   NI_MAXHOST);
 +   if (ret)
 +   log_debug(5, could not read %s/subnet: %d,
 + boot_nic, ret);
 +   } else {
 +   log_debug(5, could not read boot_nic: %d, ret);
 +   }
 +

 It seems like this should go in iscsi_sysfs_read_iface.
 Yeah, I think so also.

 Why only boot nic? Why don't we also export the boot target and initiator?
 The ibft-initiator only has the initiator-name that is of interest.
 But this info is already in the session sysfs, so I wouldn't think this
 would be too helpful.
 
 The ibft-targetN contains the following info:
 chap-type, ip-addr, lun, nic-assoc, port, target-name
 
 Many of which are also in the session sysfs as well.  Is there something
 in particular that we might be interested in that I missed?  Or are you
 just thinking its best to populate all the associated ibft info first
 and have a choice to pick and choose what we need for future
 augmentations?

For the future, and to be complete. Also for debugging to make sure
things got setup/associated correctly.

-- 
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.



[PATCH v2 0/3] ISCSITOOLS: Patchset to add the extraction of ibft net attributes

2012-10-24 Thread Eddie Wai
Version 2:
- Added boot_initiator to hold the ibft initiator name
- Added boot_targetN to hold the corresponding ibft target name
- Moved the boot_nic net param extraction to the iscsi_sysfs_read_iface
  routine
- Added extra check before eluding to use the boot_nic info
  
For the case when iscsid is invoked for the first time after pivot root
during iSCSI boot, the boot connection would fail to re-connect if the
ibft/iscsi_boot sysfs entry contains tagged vlan.
 
The problem was caused by the lack of such info in the iscsi_session sysfs
for sync_session to inherit from.
 
The enclosed patchset does the following:
1. Extract and save the ibft-ethernetN name to the boot_context-boot_nic
2. Pass the boot_nic info to be saved to the sessionN sysfs
3. Extract the sessionN boot_nic sysfs info and retrieve the corresponding
   net params
 
This 'boot_nic' kernel session sysfs entry will only be present for ibft
boot.  Corresponding kernel drivers will have to add the ISCSI_PARAM_BOOT_NIC
attribute to its attr_is_visible table.

The last patch provides the fix for the unconditional overwrite of the
iface struct even after the ibft net info was already extracted.

Please review.  Thanks.
Eddie


Eddie Wai (3):
  ISCSISTART: Saved ibft boot info to the session sysfs
  ISCSID: Added the extraction of the session boot info
  ISCSID: Added iface content override fix

 include/fw_context.h   |3 ++
 include/iscsi_if.h |4 +++
 usr/config.h   |3 ++
 usr/idbm.c |6 +
 usr/initiator_common.c |   14 +++-
 usr/iscsi_sysfs.c  |   40 
 usr/iscsid.c   |8 ++
 utils/fwparam_ibft/fwparam_sysfs.c |   15 +
 8 files changed, 87 insertions(+), 6 deletions(-)

-- 
1.7.7.4


-- 
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.



[PATCH v2 3/3] ISCSID: Added iface content override fix

2012-10-24 Thread Eddie Wai
Patch provided by Mike Christie.

This patch fixes the unconditional overwrite of the iface struct
even when the corresponding iface info from the node config was
found and extracted.

Signed-off-by: Eddie Wai eddie@broadcom.com
---
 usr/iscsid.c |8 +++-
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/usr/iscsid.c b/usr/iscsid.c
index b4bb65b..b912b58 100644
--- a/usr/iscsid.c
+++ b/usr/iscsid.c
@@ -111,9 +111,7 @@ setup_rec_from_negotiated_values(node_rec_t *rec, struct 
session_info *info)
strlcpy(rec-name, info-targetname, TARGET_NAME_MAXLEN);
rec-conn[0].port = info-persistent_port;
strlcpy(rec-conn[0].address, info-persistent_address, NI_MAXHOST);
-   memcpy(rec-iface, info-iface, sizeof(struct iface_rec));
rec-tpgt = info-tpgt;
-   iface_copy(rec-iface, info-iface);
 
iscsi_sysfs_get_negotiated_session_conf(info-sid, session_conf);
iscsi_sysfs_get_negotiated_conn_conf(info-sid, conn_conf);
@@ -238,6 +236,7 @@ static int sync_session(void *data, struct session_info 
*info)
log_warning(Could not read data from db. Using default and 
currently negotiated values\n);
setup_rec_from_negotiated_values(rec, info);
+   iface_copy(rec.iface, info-iface);
} else {
/*
 * we have a valid record and iface so lets merge
@@ -251,13 +250,12 @@ static int sync_session(void *data, struct session_info 
*info)
memset(sysfsrec, 0, sizeof(node_rec_t));
setup_rec_from_negotiated_values(sysfsrec, info);
/*
-* target, portal and iface name values have to be the same
+* target, portal and iface values have to be the same
 * or we would not have found the record, so just copy
-* CHAP and iface settings.
+* CHAP settings.
 */
memcpy(rec.session.auth, sysfsrec.session.auth,
  sizeof(struct iscsi_auth_config));
-   memcpy(rec.iface, info-iface, sizeof(rec.iface));
}
 
/* multiple drivers could be connected to the same portal */
-- 
1.7.7.4


-- 
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.



[PATCH v2 2/3] ISCSID: Added the extraction of the session boot info

2012-10-24 Thread Eddie Wai
This patch does the work to extract the corresponding ibft-ethernetN
net params as specified from the kernel session boot_nic sysfs entry.

Signed-off-by: Eddie Wai eddie@broadcom.com
---
 usr/iscsi_sysfs.c |   40 
 1 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c
index 4015b35..ffd8b83 100644
--- a/usr/iscsi_sysfs.c
+++ b/usr/iscsi_sysfs.c
@@ -53,6 +53,7 @@
 #define ISCSI_IFACE_SUBSYS iscsi_iface
 #define SCSI_HOST_SUBSYS   scsi_host
 #define SCSI_SUBSYSscsi
+#define ISCSI_IBFT_SUBSYS  ibft
 
 #define ISCSI_SESSION_ID   session%d
 #define ISCSI_CONN_ID  connection%d:0
@@ -450,6 +451,7 @@ static int iscsi_sysfs_read_iface(struct iface_rec *iface, 
int host_no,
 {
uint32_t tmp_host_no, iface_num;
char host_id[NAME_SIZE];
+   char boot_name[NAME_SIZE], boot_content[NAME_SIZE];
struct iscsi_transport *t;
int ret, iface_type;
 
@@ -565,6 +567,44 @@ static int iscsi_sysfs_read_iface(struct iface_rec *iface, 
int host_no,
  bound to: iface_fmt \n,
  iface_str(iface));
}
+
+   /* Extract boot info */
+   strlcpy(boot_content, boot_initiator, sizeof(boot_content));
+   if (sysfs_get_str(session, ISCSI_SESSION_SUBSYS,
+ boot_content,
+ boot_name, NAME_SIZE))
+   goto skip_boot;
+   strlcpy(boot_content, boot_target, sizeof(boot_content));
+   if (sysfs_get_str(session, ISCSI_SESSION_SUBSYS,
+ boot_content,
+ boot_name, NAME_SIZE))
+   goto skip_boot;
+   strlcpy(boot_content, boot_nic, sizeof(boot_content));
+   if (sysfs_get_str(session, ISCSI_SESSION_SUBSYS,
+ boot_content,
+ boot_name, NAME_SIZE))
+   goto skip_boot;
+
+   /* If boot_initiator/boot_target/boot_nic exist,
+  then extract the info from the boot nic */
+   if (sysfs_get_str(boot_name, ISCSI_IBFT_SUBSYS,
+ vlan, boot_content, NAME_SIZE))
+   log_debug(5, could not read %s/vlan: %d,
+ boot_name, ret);
+   else
+   iface-vlan_id = atoi(boot_content);
+
+   if (sysfs_get_str(boot_name, ISCSI_IBFT_SUBSYS,
+ subnet-mask,
+ iface-subnet_mask,
+ NI_MAXHOST))
+   log_debug(5, could not read %s/subnet: %d,
+ boot_name, ret);
+
+   memset(boot_content, 0, sizeof(boot_content));
+skip_boot:
+   if (strlen(boot_content))
+   log_debug(5, %s not found, boot_content);
}
 
if (!iface_kern_id)
-- 
1.7.7.4


-- 
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.



[PATCH v2 1/3] ISCSISTART: Saved ibft boot info to the session sysfs

2012-10-24 Thread Eddie Wai
Three new session sysfs parameters are introduced:
boot_initiator - holds the ibft boot initiator name
boot_nic   - holds the ibft boot ethernetN name
boot_target- holds the ibft boot targetN name

This patch copies over the ibft-initiator/ethernetN/targetN info
from the boot context to the node_rec.

Signed-off-by: Eddie Wai eddie@broadcom.com
---
 include/fw_context.h   |3 +++
 include/iscsi_if.h |4 
 usr/config.h   |3 +++
 usr/idbm.c |6 ++
 usr/initiator_common.c |   14 +-
 utils/fwparam_ibft/fwparam_sysfs.c |   15 +++
 6 files changed, 44 insertions(+), 1 deletions(-)

diff --git a/include/fw_context.h b/include/fw_context.h
index 1640859..484e363 100644
--- a/include/fw_context.h
+++ b/include/fw_context.h
@@ -30,6 +30,9 @@
 
 struct boot_context {
struct list_head list;
+   char boot_initiator[TARGET_NAME_MAXLEN + 1];
+   char boot_nic[TARGET_NAME_MAXLEN + 1];
+   char boot_target[TARGET_NAME_MAXLEN + 1];
 
/* target settings */
int target_port;
diff --git a/include/iscsi_if.h b/include/iscsi_if.h
index dad9fd8..d9f8506 100644
--- a/include/iscsi_if.h
+++ b/include/iscsi_if.h
@@ -460,6 +460,10 @@ enum iscsi_param {
 
ISCSI_PARAM_TGT_RESET_TMO,
ISCSI_PARAM_TARGET_ALIAS,
+
+   ISCSI_PARAM_BOOT_INITIATOR,
+   ISCSI_PARAM_BOOT_NIC,
+   ISCSI_PARAM_BOOT_TARGET,
/* must always be last */
ISCSI_PARAM_MAX,
 };
diff --git a/usr/config.h b/usr/config.h
index 998caff..42fba71 100644
--- a/usr/config.h
+++ b/usr/config.h
@@ -201,6 +201,9 @@ typedef struct session_rec {
 * allowed to be initiated on this record
 */
unsigned char   multiple;
+   charboot_initiator[TARGET_NAME_MAXLEN + 1];
+   charboot_nic[TARGET_NAME_MAXLEN + 1];
+   charboot_target[TARGET_NAME_MAXLEN + 1];
 } session_rec_t;
 
 #define ISCSI_TRANSPORT_NAME_MAXLEN 16
diff --git a/usr/idbm.c b/usr/idbm.c
index 4d30aa9..56d7e43 100644
--- a/usr/idbm.c
+++ b/usr/idbm.c
@@ -2569,6 +2569,12 @@ struct node_rec 
*idbm_create_rec_from_boot_context(struct boot_context *context)
strlen((char *)context-chap_password);
rec-session.auth.password_in_length =
strlen((char *)context-chap_password_in);
+   strlcpy(rec-session.boot_initiator, context-boot_initiator,
+   sizeof(context-boot_initiator));
+   strlcpy(rec-session.boot_nic, context-boot_nic,
+   sizeof(context-boot_nic));
+   strlcpy(rec-session.boot_target, context-boot_target,
+   sizeof(context-boot_target));
 
iface_setup_from_boot_context(rec-iface, context);
 
diff --git a/usr/initiator_common.c b/usr/initiator_common.c
index ef6820c..1d851db 100644
--- a/usr/initiator_common.c
+++ b/usr/initiator_common.c
@@ -324,7 +324,7 @@ int iscsi_host_set_params(struct iscsi_session *session)
return 0;
 }
 
-#define MAX_SESSION_PARAMS 32
+#define MAX_SESSION_PARAMS 35
 
 int iscsi_session_set_params(struct iscsi_conn *conn)
 {
@@ -496,6 +496,18 @@ int iscsi_session_set_params(struct iscsi_conn *conn)
.param = ISCSI_PARAM_INITIATOR_NAME,
.value = session-initiator_name,
.type = ISCSI_STRING,
+   }, {
+   .param = ISCSI_PARAM_BOOT_INITIATOR,
+   .value = session-nrec.session.boot_initiator,
+   .type = ISCSI_STRING,
+   }, {
+   .param = ISCSI_PARAM_BOOT_NIC,
+   .value = session-nrec.session.boot_nic,
+   .type = ISCSI_STRING,
+   }, {
+   .param = ISCSI_PARAM_BOOT_TARGET,
+   .value = session-nrec.session.boot_target,
+   .type = ISCSI_STRING,
},
};
 
diff --git a/utils/fwparam_ibft/fwparam_sysfs.c 
b/utils/fwparam_ibft/fwparam_sysfs.c
index 3997363..190a284 100644
--- a/utils/fwparam_ibft/fwparam_sysfs.c
+++ b/utils/fwparam_ibft/fwparam_sysfs.c
@@ -196,6 +196,10 @@ static int fill_nic_context(char *subsys, char *id,
if (rc)
return rc;
}
+   /* boot_nic is only for IBFT subsys */
+   memset(context-boot_nic, 0, sizeof(context-boot_nic));
+   snprintf(context-boot_nic, sizeof(context-boot_nic), %s,
+id);
} else
strlcpy(context-scsi_host_name, subsys,
sizeof(context-scsi_host_name));
@@ -224,6 +228,11 @@ static void fill_initiator_context(char *subsys, struct 
boot_context *context)
  

[PATCH] LIBISCSI: Added new boot entries in the session sysfs

2012-10-24 Thread Eddie Wai
This is the kernel part of the modification to extract the net params
from the ibft sysfs to the iface struct used for the connection
request upon sync_session in the open-iscsi util.

Three new session sysfs params are defined:
boot_initiator
boot_nic
boot_target

Each of which will hold the name of the entry from the ibft table.

Signed-off-by: Eddie Wai eddie@broadcom.com
---
 drivers/scsi/libiscsi.c |   18 ++
 drivers/scsi/scsi_transport_iscsi.c |   12 
 include/scsi/iscsi_if.h |4 
 include/scsi/libiscsi.h |4 
 4 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 82c3fd4..1cfa240 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -2809,6 +2809,9 @@ void iscsi_session_teardown(struct iscsi_cls_session 
*cls_session)
kfree(session-targetname);
kfree(session-targetalias);
kfree(session-initiatorname);
+   kfree(session-boot_initiator);
+   kfree(session-boot_nic);
+   kfree(session-boot_target);
kfree(session-ifacename);
 
iscsi_destroy_session(cls_session);
@@ -3248,6 +3251,12 @@ int iscsi_set_param(struct iscsi_cls_conn *cls_conn,
return iscsi_switch_str_param(session-ifacename, buf);
case ISCSI_PARAM_INITIATOR_NAME:
return iscsi_switch_str_param(session-initiatorname, buf);
+   case ISCSI_PARAM_BOOT_INITIATOR:
+   return iscsi_switch_str_param(session-boot_initiator, buf);
+   case ISCSI_PARAM_BOOT_NIC:
+   return iscsi_switch_str_param(session-boot_nic, buf);
+   case ISCSI_PARAM_BOOT_TARGET:
+   return iscsi_switch_str_param(session-boot_target, buf);
default:
return -ENOSYS;
}
@@ -3326,6 +3335,15 @@ int iscsi_session_get_param(struct iscsi_cls_session 
*cls_session,
case ISCSI_PARAM_INITIATOR_NAME:
len = sprintf(buf, %s\n, session-initiatorname);
break;
+   case ISCSI_PARAM_BOOT_INITIATOR:
+   len = sprintf(buf, %s\n, session-boot_initiator);
+   break;
+   case ISCSI_PARAM_BOOT_NIC:
+   len = sprintf(buf, %s\n, session-boot_nic);
+   break;
+   case ISCSI_PARAM_BOOT_TARGET:
+   len = sprintf(buf, %s\n, session-boot_target);
+   break;
default:
return -ENOSYS;
}
diff --git a/drivers/scsi/scsi_transport_iscsi.c 
b/drivers/scsi/scsi_transport_iscsi.c
index 31969f2..c157bbb 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -2484,6 +2484,9 @@ iscsi_session_attr(tgt_reset_tmo, 
ISCSI_PARAM_TGT_RESET_TMO, 0);
 iscsi_session_attr(ifacename, ISCSI_PARAM_IFACE_NAME, 0);
 iscsi_session_attr(initiatorname, ISCSI_PARAM_INITIATOR_NAME, 0);
 iscsi_session_attr(targetalias, ISCSI_PARAM_TARGET_ALIAS, 0);
+iscsi_session_attr(boot_initiator, ISCSI_PARAM_BOOT_INITIATOR, 0);
+iscsi_session_attr(boot_nic, ISCSI_PARAM_BOOT_NIC, 0);
+iscsi_session_attr(boot_target, ISCSI_PARAM_BOOT_TARGET, 0);
 
 static ssize_t
 show_priv_session_state(struct device *dev, struct device_attribute *attr,
@@ -2570,6 +2573,9 @@ static struct attribute *iscsi_session_attrs[] = {
dev_attr_sess_ifacename.attr,
dev_attr_sess_initiatorname.attr,
dev_attr_sess_targetalias.attr,
+   dev_attr_sess_boot_initiator.attr,
+   dev_attr_sess_boot_nic.attr,
+   dev_attr_sess_boot_target.attr,
dev_attr_priv_sess_recovery_tmo.attr,
dev_attr_priv_sess_state.attr,
dev_attr_priv_sess_creator.attr,
@@ -2632,6 +2638,12 @@ static umode_t iscsi_session_attr_is_visible(struct 
kobject *kobj,
param = ISCSI_PARAM_INITIATOR_NAME;
else if (attr == dev_attr_sess_targetalias.attr)
param = ISCSI_PARAM_TARGET_ALIAS;
+   else if (attr == dev_attr_sess_boot_initiator.attr)
+   param = ISCSI_PARAM_BOOT_INITIATOR;
+   else if (attr == dev_attr_sess_boot_nic.attr)
+   param = ISCSI_PARAM_BOOT_NIC;
+   else if (attr == dev_attr_sess_boot_target.attr)
+   param = ISCSI_PARAM_BOOT_TARGET;
else if (attr == dev_attr_priv_sess_recovery_tmo.attr)
return S_IRUGO | S_IWUSR;
else if (attr == dev_attr_priv_sess_state.attr)
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h
index 917741b..886a3b0 100644
--- a/include/scsi/iscsi_if.h
+++ b/include/scsi/iscsi_if.h
@@ -452,6 +452,10 @@ enum iscsi_param {
ISCSI_PARAM_TGT_RESET_TMO,
ISCSI_PARAM_TARGET_ALIAS,
 
+   ISCSI_PARAM_BOOT_INITIATOR,
+   ISCSI_PARAM_BOOT_NIC,
+   ISCSI_PARAM_BOOT_TARGET,
+
ISCSI_PARAM_CHAP_IN_IDX,
ISCSI_PARAM_CHAP_OUT_IDX,
/* must always be last */
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index 6e33386..4d50665 100644
---