On 09/06/2013 18:07, Or Gerlitz wrote:
Hi Nic,
I'd like to check with you what would be the easiest way to enhance
the LIO iser code such that discovery can be carried out over iser
session/connection too, basically from the initiator we send TEXT PDU
of type sendtargets, and I hit this warning.
[ 2414.799129] i_buf: iqn.1994-05.com.redhat:e977fe6d73e, s_buf:
Discovery, t_buf: (null)
[ 2414.801701] Got unknown iSCSI OpCode: 0x04
[ 2414.823390] Pid: 10971, comm: kworker/0:0 Not tainted
3.9.0-rc3-perf+ #13
[ 2414.823394] Call Trace:
[ 2414.823403] [<ffffffffa03aecce>] ? isert_cq_rx_work+0x12e/0x820
[ib_isert]
[ 2414.823408] [<ffffffff810534d0>] ? process_one_work+0x140/0x3c0
[ 2414.823410] [<ffffffff81053b9b>] ? worker_thread+0x11b/0x440
[ 2414.823417] [<ffffffff81061dd0>] ? __wake_up_common+0x50/0x80
[ 2414.823419] [<ffffffff81053a80>] ? manage_workers+0x330/0x330
[ 2414.823421] [<ffffffff81053a80>] ? manage_workers+0x330/0x330
[ 2414.823424] [<ffffffff8105a1be>] ? kthread+0xce/0xe0
[ 2414.823430] [<ffffffff8105a0f0>] ? kthread_parkme+0x30/0x30
[ 2414.823433] [<ffffffff813e1c2c>] ? ret_from_fork+0x7c/0xb0
[ 2414.823436] [<ffffffff8105a0f0>] ? kthread_parkme+0x30/0x30
[ 2445.881684] i_buf: iqn.1994-05.com.redhat:e977fe6d73e, s_buf:
Discovery, t_buf: (null)
Hi Nic,
I saw that the TCP code is willing to handle TEXT/sendtargets from
within the kernel, so I went a head and added the patch below,I just
have to rush now to other venues and will be able to test that tomorrow.
Will that plus probably enhancing isert_response_queue too be all, or
you see anything which is missing here?
Or.
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c
b/drivers/infiniband/ulp/isert/ib_isert.c
index 41712f0..6a18d9f 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -1000,6 +1000,9 @@ isert_handle_iscsi_dataout(struct isert_conn
*isert_conn,
return 0;
}
+
+extern int iscsit_handle_text_cmd(struct iscsi_conn *conn, unsigned
char *buf);
+
static int
isert_rx_opcode(struct isert_conn *isert_conn, struct iser_rx_desc
*rx_desc,
uint32_t read_stag, uint64_t read_va,
@@ -1057,6 +1060,11 @@ isert_rx_opcode(struct isert_conn *isert_conn,
struct iser_rx_desc *rx_desc,
SECONDS_FOR_LOGOUT_COMP *
HZ);
+
+ case ISCSI_OP_TEXT:
+ ret = iscsit_handle_text_cmd(conn, (unsigned char *)hdr);
+ break;
+
default:
pr_err("Got unknown iSCSI OpCode: 0x%02x\n", opcode);
dump_stack();
diff --git a/drivers/target/iscsi/iscsi_target.c
b/drivers/target/iscsi/iscsi_target.c
index d7705e5..332c027 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -1962,7 +1962,7 @@ attach:
EXPORT_SYMBOL(iscsit_handle_task_mgt_cmd);
/* #warning FIXME: Support Text Command parameters besides SendTargets */
-static int iscsit_handle_text_cmd(
+int iscsit_handle_text_cmd(
struct iscsi_conn *conn,
unsigned char *buf)
{
@@ -2115,6 +2115,8 @@ static int iscsit_handle_text_cmd(
return iscsit_execute_cmd(cmd, 0);
}
+EXPORT_SYMBOL(iscsit_handle_text_cmd);
+
int iscsit_logout_closesession(struct iscsi_cmd *cmd, struct
iscsi_conn *conn)
{
struct iscsi_conn *conn_p;
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html