On 12/07/2011 02:24 AM, Turbo Fredriksson wrote:
> [AGAIN!! This client is making me nuts!!]
>
> -------- Original Message --------
> Subject: Re: Fwd: Re: iscsitarget && open-iscsi && 'connection timed
> out' when trying to login
> Date: Wed, 07 Dec 2011 10:23:06 +0200
> From: Turbo Fredriksson <[email protected]>
> To: Mike Christie <[email protected]>
>
> On Tue, 06 Dec 2011 17:05:55 -0600, Mike Christie wrote:
>> For these logs you are sending are they from freshly booted systems or
>> have you tried to login previously?
>
> Freshly booted in the sence that both the target and initiator daemons and
> modules have been unloaded and then restarted/reloaded.
>
>> And was that trace taken with the 32bit user and 64 bit kernel?
>
> Yes.
>
>> That one
>> looks like it did. We connect to the target ok (in previous logs the
>> connect() is what failed), but then when we start creating iscsi structs
>> in the kernel it goes downhill.
>
> Ah. Sounds like you have a vage idea where the problem might lie... ?
>
It is the 32/64bit bug you mentioned before. I attached a patch for
userpsace tools here
http://www.open-iscsi.org/bits/open-iscsi-2.0-872.tar.gz
(iscsi-tools-use-aligned.patch) and for your kernel
(iscsi-kern-use-aligned.patch).
Remember to build the tools just do
make user
instead of the normal make
--
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.
--- linux-3.0.9/include/scsi/iscsi_if.h 2011-11-11 12:12:24.000000000 -0600
+++ linux-3.0.9.work/include/scsi/iscsi_if.h 2011-12-07 19:17:33.000000000
-0600
@@ -81,7 +81,7 @@ enum iscsi_tgt_dscvr {
struct iscsi_uevent {
uint32_t type; /* k/u events type */
uint32_t iferror; /* carries interface or resource errors */
- uint64_t transport_handle;
+ aligned_u64 transport_handle;
union {
/* messages u -> k */
@@ -91,7 +91,7 @@ struct iscsi_uevent {
uint16_t queue_depth;
} c_session;
struct msg_create_bound_session {
- uint64_t ep_handle;
+ aligned_u64 ep_handle;
uint32_t initial_cmdsn;
uint16_t cmds_max;
uint16_t queue_depth;
@@ -106,7 +106,7 @@ struct iscsi_uevent {
struct msg_bind_conn {
uint32_t sid;
uint32_t cid;
- uint64_t transport_eph;
+ aligned_u64 transport_eph;
uint32_t is_leading;
} b_conn;
struct msg_destroy_conn {
@@ -132,7 +132,7 @@ struct iscsi_uevent {
struct msg_stop_conn {
uint32_t sid;
uint32_t cid;
- uint64_t conn_handle;
+ aligned_u64 conn_handle;
uint32_t flag;
} stop_conn;
struct msg_get_stats {
@@ -147,11 +147,11 @@ struct iscsi_uevent {
uint32_t non_blocking;
} ep_connect_through_host;
struct msg_transport_poll {
- uint64_t ep_handle;
+ aligned_u64 ep_handle;
uint32_t timeout_ms;
} ep_poll;
struct msg_transport_disconnect {
- uint64_t ep_handle;
+ aligned_u64 ep_handle;
} ep_disconnect;
struct msg_tgt_dscvr {
enum iscsi_tgt_dscvr type;
@@ -191,7 +191,7 @@ struct iscsi_uevent {
struct msg_recv_req {
uint32_t sid;
uint32_t cid;
- uint64_t recv_handle;
+ aligned_u64 recv_handle;
} recv_req;
struct msg_conn_error {
uint32_t sid;
@@ -203,7 +203,7 @@ struct iscsi_uevent {
uint32_t sid;
} d_session;
struct msg_transport_connect_ret {
- uint64_t handle;
+ aligned_u64 handle;
} ep_connect_ret;
struct msg_req_path {
uint32_t host_no;
diff -aurp open-iscsi-2.0-872/include/iscsi_if.h
open-iscsi-2.0-872.work/include/iscsi_if.h
--- open-iscsi-2.0-872/include/iscsi_if.h 2010-08-11 10:27:07.000000000
-0500
+++ open-iscsi-2.0-872.work/include/iscsi_if.h 2011-12-07 19:11:42.000000000
-0600
@@ -86,7 +86,7 @@ enum iscsi_tgt_dscvr {
struct iscsi_uevent {
uint32_t type; /* k/u events type */
uint32_t iferror; /* carries interface or resource errors */
- uint64_t transport_handle;
+ aligned_u64 transport_handle;
union {
/* messages u -> k */
@@ -96,7 +96,7 @@ struct iscsi_uevent {
uint16_t queue_depth;
} c_session;
struct msg_create_bound_session {
- uint64_t ep_handle;
+ aligned_u64 ep_handle;
uint32_t initial_cmdsn;
uint16_t cmds_max;
uint16_t queue_depth;
@@ -111,7 +111,7 @@ struct iscsi_uevent {
struct msg_bind_conn {
uint32_t sid;
uint32_t cid;
- uint64_t transport_eph;
+ aligned_u64 transport_eph;
uint32_t is_leading;
} b_conn;
struct msg_destroy_conn {
@@ -137,7 +137,7 @@ struct iscsi_uevent {
struct msg_stop_conn {
uint32_t sid;
uint32_t cid;
- uint64_t conn_handle;
+ aligned_u64 conn_handle;
uint32_t flag;
} stop_conn;
struct msg_get_stats {
@@ -152,11 +152,11 @@ struct iscsi_uevent {
uint32_t non_blocking;
} ep_connect_through_host;
struct msg_transport_poll {
- uint64_t ep_handle;
+ aligned_u64 ep_handle;
uint32_t timeout_ms;
} ep_poll;
struct msg_transport_disconnect {
- uint64_t ep_handle;
+ aligned_u64 ep_handle;
} ep_disconnect;
struct msg_tgt_dscvr {
enum iscsi_tgt_dscvr type;
@@ -196,7 +196,7 @@ struct iscsi_uevent {
struct msg_recv_req {
uint32_t sid;
uint32_t cid;
- uint64_t recv_handle;
+ aligned_u64 recv_handle;
} recv_req;
struct msg_conn_error {
uint32_t sid;
@@ -208,7 +208,7 @@ struct iscsi_uevent {
uint32_t sid;
} d_session;
struct msg_transport_connect_ret {
- uint64_t handle;
+ aligned_u64 handle;
} ep_connect_ret;
struct msg_req_path {
uint32_t host_no;
diff -aurp open-iscsi-2.0-872/usr/types.h open-iscsi-2.0-872.work/usr/types.h
--- open-iscsi-2.0-872/usr/types.h 2010-08-11 10:27:07.000000000 -0500
+++ open-iscsi-2.0-872.work/usr/types.h 2011-12-07 19:20:06.000000000 -0600
@@ -18,4 +18,7 @@
typedef uint16_t __be16;
typedef uint32_t __be32;
+/* this is a special 64bit data type that is 8-byte aligned */
+#define aligned_u64 unsigned long long __attribute__((aligned(8)))
+
#endif /* TYPES_H */