<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>[PATCH] IB/core - ib_wr_opcode change to add IB_WR_LSO breaks ib_ipath</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Vlad, please pull from git.openfabrics.org/~ralphc/linux-2.6.git in<BR>
the ofed_kernel_2_6_24_rc1 branch. This is an up-to-date clone<BR>
of git://git.openfabrics.org/ofed_1_3/linux-2.6.git with the<BR>
following change:<BR>
<BR>
<BR>
The ib_ipath driver depends on /usr/include/infiniband/verbs.h<BR>
enum ibv_wr_opcode matching the kernel's ib_verbs.h<BR>
enum ib_wr_opcode. The recent change to add IB_WR_LSO breaks this.<BR>
<BR>
Now, you may argue that the kernel should not depend on this equivalence<BR>
but you would then need to define IBV_WR_RDMA_WRITE, etc. in some<BR>
kernel header file and do a table look up to map from user to<BR>
kernel opcode values. Since I don't see any other code which depends<BR>
on the value of IB_WR_LSO, I think the following patch is the right<BR>
fix.<BR>
<BR>
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com><BR>
<BR>
diff --git a/kernel_patches/fixes/core_0030_lso.patch b/kernel_patches/fixes/core_0030_lso.patch<BR>
index 3f6af37..94a91b4 100644<BR>
--- a/kernel_patches/fixes/core_0030_lso.patch<BR>
+++ b/kernel_patches/fixes/core_0030_lso.patch<BR>
@@ -27,14 +27,16 @@ Index: ofed_kernel/include/rdma/ib_verbs.h<BR>
  /*<BR>
   * Set value of IB_WC_RECV so consumers can test if a completion is a<BR>
   * receive by testing (opcode & IB_WC_RECV).<BR>
-@@ -609,6 +611,7 @@ enum ib_wr_opcode {<BR>
-       IB_WR_RDMA_WRITE,<BR>
-       IB_WR_RDMA_WRITE_WITH_IMM,<BR>
-       IB_WR_SEND,<BR>
-+      IB_WR_LSO,<BR>
+@@ -612,7 +614,8 @@ enum ib_wr_opcode {<BR>
        IB_WR_SEND_WITH_IMM,<BR>
        IB_WR_RDMA_READ,<BR>
        IB_WR_ATOMIC_CMP_AND_SWP,<BR>
+-      IB_WR_ATOMIC_FETCH_AND_ADD<BR>
++      IB_WR_ATOMIC_FETCH_AND_ADD,<BR>
++      IB_WR_LSO<BR>
+ };<BR>
+<BR>
+ enum ib_send_flags {<BR>
 @@ -621,7 +624,8 @@ enum ib_send_flags {<BR>
        IB_SEND_SOLICITED       = (1<<2),<BR>
        IB_SEND_INLINE          = (1<<3),<BR>
</FONT>
</P>

</BODY>
</HTML>