ccing Or.

Or, I am ccing you because some time ago Erez was working on support for 
older RHEL and SLES kernels for OFED. It looks like the patch below 
would not be useful to you because iser is supported in those kernels, 
but did you guys all need RHEL 4 and maybe SLES 9 support too?

On 08/31/2009 08:15 AM, Rakesh Ranjan wrote:
> Hi Mike,
> Attached is patch for libiscsi/libiscsi_tcp to support cxgb3i on
> RHEL-5.{,0,1,3} and SLES 10 and it applied on top of
> 2.6.14-23_compat.patch. Its based on your work for RHEL-5.4. I have run
> the regression test on mentioned platform and it worked without any
> problem. If you find it okay, then I will send the final patch with
> little bit more cleanup and needed Makefile changes.
> Regards
> Rakesh Ranjan

I think you reverted some fixes/changes from upstream. For example the 
code below is a change I did upstream, but it did not make it into RHEL 
5.4. You also reverted Erez's debugging stuff from upstream. You can 
check kernel.git/git to see the commits that have been done upstream 
then check if the are not present in RHEL 5.4 (I think the code in should be in sync with what I just send to James 
for scsi-misc/2.6.32).

How do you plan on distributing the patch? Are you doing to intergate it 
into the 2.6.14-23_compat.patch patch with maybe some ifdef RHEL/SLESs, 
or are you going to add a new patch for RHEL/SLES then in the Makefile 
figure out if we are using a RHEL/SLES kernel, or are you just going to 
carry it yourself?

diff -Nuarp a/iscsi_tcp.c b/iscsi_tcp.c
--- a/iscsi_tcp.c       2009-08-31 18:32:05.000000000 +0530
+++ b/iscsi_tcp.c       2009-08-31 18:33:16.000000000 +0530
@@ -254,6 +254,8 @@ static int iscsi_sw_tcp_xmit_segment(str

                if (r < 0) {
+                       if (copied || r == -EAGAIN)
+                               break;
                        return r;
                copied += r;
@@ -274,17 +276,11 @@ static int iscsi_sw_tcp_xmit(struct iscs

        while (1) {
                rc = iscsi_sw_tcp_xmit_segment(tcp_conn, segment);
-               /*
-                * We may not have been able to send data because the conn
-                * is getting stopped. libiscsi will know so propogate err
-                * for it to do the right thing.
-                */
-               if (rc == -EAGAIN)
-                       return rc;
-               else if (rc < 0) {
+               if (rc < 0) {
                        rc = ISCSI_ERR_XMIT_FAILED;
                        goto error;
-               } else if (rc == 0)
+               }
+               if (rc == 0)

                consumed += rc;
@@ -465,10 +461,9 @@ static int iscsi_sw_tcp_pdu_init(struct
                                                  offset, count);

-       if (err) {
+       if (err)
                /* got invalid offset/len */
-               return -EIO;
-       }
+               return -EINVAL;
        return 0;

You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to