Use iscsi kernel passthrough interface for sendtargets

11 views
Skip to first unread message

Mike Christie

unread,
Aug 30, 2009, 5:31:29 PM8/30/09
to open-iscsi, Jayamohan Kalickal, Michael Chan, Anil Veerabhadrappa, Karen Xie, Rakesh Ranjan, Benjamin Li
For offlaod cards, bnx2i, cxgb3i and be2iscsi, we have to do discovery
through a second network interface. The two attached patches has us
instead do discovery through the iscsi class interface, so you do not
have to set up a seperate nic for discovery and you do not have to worry
about IP based ACLS on the target.

The 0001-iscsiadm-use-kernel-pdu-passthrough-for-sendtargets.patch patch
was made over the open-iscsi git tree. It is only userspce code.

The 0001-libiscsi-fix-login-text-checks-in-pdu-injection-cod.patch patch
is made over linux-2.6-iscsi's iscsi branch. It should probably apply to
other kernels though.

Please give the patches a try.

Here are some known limits:

MaxRecvSegmentLength is hard coded to 8K for discovery sessions, because
the kernel conn->data buffer and driver related buffers were hard coded
to this value and some netlink's buffers are too.

I have only tested cxgb3i.

Ben, this is not patched against the uip offload tree but I can do that
for you.

Michael and Anil, I was not sure where to handle text response pdus in
bnx2i_process_new_cqes? I am currently sending the discovery session
login and text pdus through the same interface you get nops or normal
session login pdus, so I think bnx2i_mtask_xmit should just work (I
limited MaxRecvSegmentLength to ISCSI_DEF_MAX_RECV_SEG_LEN, so the buf
sizes are ok.).

Jay, not sure how text response pdus are coming in? Are they like login
or logout pdus?

0001-iscsiadm-use-kernel-pdu-passthrough-for-sendtargets.patch
0001-libiscsi-fix-login-text-checks-in-pdu-injection-cod.patch

Benjamin Li

unread,
Aug 30, 2009, 10:57:21 PM8/30/09
to Mike Christie, open-iscsi, Jayamohan Kalickal, Michael Chan, Anil Veerabhadrappa, Karen Xie, Rakesh Ranjan
Hi Mike,

I am still looking over/understanding the patches but could I trouble
you patch this against the uIP offload tree?

Thanks again.

-Ben

Mike Christie

unread,
Aug 31, 2009, 11:40:51 AM8/31/09
to Benjamin Li, open-iscsi, Jayamohan Kalickal, Michael Chan, Anil Veerabhadrappa, Karen Xie, Rakesh Ranjan
On 08/30/2009 09:57 PM, Benjamin Li wrote:
> Hi Mike,
>
> I am still looking over/understanding the patches but could I trouble
> you patch this against the uIP offload tree?
>

Will do.

Mike Christie

unread,
Aug 31, 2009, 11:58:37 PM8/31/09
to open-...@googlegroups.com, Jayamohan Kalickal, Michael Chan, Anil Veerabhadrappa, Karen Xie, Rakesh Ranjan
On 08/30/2009 09:57 PM, Benjamin Li wrote:
> Hi Mike,
>
> I am still looking over/understanding the patches but could I trouble
> you patch this against the uIP offload tree?
>

I attached the updated patch.

It is made against the offload branch, which I also updated to include
some changes. The last commit in the offload branch should be:

commit 512c4323ad6020bff4d79dd1f9d2c5f0bedcb9c1
Author: Mike Christie <mich...@cs.wisc.edu>
Date: Sun Aug 30 16:04:40 2009 -0500

iscsid: add be2iscsi template

0003-Use-pass-through-interface-for-sendtargets-take2.patch

Anil Veerabhadrappa

unread,
Sep 1, 2009, 2:14:29 PM9/1/09
to Mike Christie, open-iscsi, Jayamohan Kalickal, Michael Chan, Karen Xie, Rakesh Ranjan, Benjamin Li
On Sun, 2009-08-30 at 14:31 -0700, Mike Christie wrote:

I will work on it and send it to you soon. where is the latest bnx2i
code on your linux-2.6-iscsi tree?

Mike Christie

unread,
Sep 1, 2009, 2:28:45 PM9/1/09
to open-...@googlegroups.com, Jayamohan Kalickal, Michael Chan, Karen Xie, Rakesh Ranjan, Benjamin Li

The latest bnx2i code is in James bnx2i tree. linux-2.6-iscsi does not
have your cid changes yet. I am updating to James's tree now.

However, the kernel patch will apply to James's tree as is, so you can
go ahead and use it.

Mike Christie

unread,
Sep 1, 2009, 2:37:10 PM9/1/09
to open-...@googlegroups.com, Jayamohan Kalickal, Michael Chan, Karen Xie, Rakesh Ranjan, Benjamin Li
On 09/01/2009 01:28 PM, Mike Christie wrote:
> The latest bnx2i code is in James bnx2i tree. linux-2.6-iscsi does not
> have your cid changes yet. I am updating to James's tree now.
>
> However, the kernel patch will apply to James's tree as is, so you can
> go ahead and use it.
>

It looks like James's tree is missing the GFP_ATOMIC iscsi_offload_msg
patch you guys did because that went through Dave. It might be missing
other bnx2 stuff too.

How are you guys syncing your stuff when it some of it is in Dave's tree
and some of it is in James's tree? Do you just figure out where it is
then pull from each tree?

Mike Christie

unread,
Sep 1, 2009, 3:34:50 PM9/1/09
to open-...@googlegroups.com, Jayamohan Kalickal, Michael Chan, Karen Xie, Rakesh Ranjan, Benjamin Li
On 09/01/2009 01:37 PM, Mike Christie wrote:
> On 09/01/2009 01:28 PM, Mike Christie wrote:
>> The latest bnx2i code is in James bnx2i tree. linux-2.6-iscsi does not
>> have your cid changes yet. I am updating to James's tree now.
>>
>> However, the kernel patch will apply to James's tree as is, so you can
>> go ahead and use it.
>>
>
> It looks like James's tree is missing the GFP_ATOMIC iscsi_offload_msg
> patch you guys did because that went through Dave. It might be missing
> other bnx2 stuff too.
>

I updated the linux-2.6-iscsi branch to linus's tree and took in your
bnx2i patches in James's scsi-misc tree.

I did not grab the bnx2/cnic patches by accident. I just remembered Dave
picked them up (I was just searching linus and scsi-misc/scsi-rc-fixes).

In the iscsi branch I have outstanding iscsi patches and the kernel
patch for this (I also included the suspend queue patch from yesterday).
The last commit is:

commit 35074fae1a1cf6eb1a22e912d16ac35ecd9020c8
Author: Mike Christie <mich...@cs.wisc.edu>
Date: Sun Aug 30 16:19:44 2009 -0500

libiscsi: fix login/text checks in pdu injection code

Reply all
Reply to author
Forward
0 new messages