Add support for NOP work request.

There's partial support there the WR type is defined, but the HCA driver and 
the work completion path does not support it.  Flesh that out (for user-mode 
only).  This is needed to emulate MW support, can't wait to get proper MW 
support, though.

Signed-off-by: Fab Tillier <[email protected]>

diff -dwup3 -X excl.txt -r 
\dev\openib\ofw\gen1\branches\mlx4_30\trunk\core\al\ib_statustext.c 
.\core\al\ib_statustext.c
--- \dev\openib\ofw\gen1\branches\mlx4_30\trunk\core\al\ib_statustext.c Fri Aug 
03 12:26:11 2012
+++ .\core\al\ib_statustext.c   Thu Aug 23 12:39:08 2012
@@ -207,6 +207,7 @@ static const char* const __ib_wc_send_ty
        "IB_WC_COMPARE_SWAP",
        "IB_WC_FETCH_ADD",
        "IB_WC_MW_BIND",
+    "IB_WC_NOP"
 };
 
 static const char* const __ib_wc_recv_type_str[] =
diff -dwup3 -X excl.txt -r 
\dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mlx4\user\hca\cq.c 
.\hw\mlx4\user\hca\cq.c
--- \dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mlx4\user\hca\cq.c   Thu Mar 
29 00:15:30 2012
+++ .\hw\mlx4\user\hca\cq.c     Thu Aug 23 11:48:08 2012
@@ -281,6 +281,7 @@ static int mlx4_poll_one(struct mlx4_cq 
                        break;
                case MLX4_OPCODE_SEND_IMM:
                        wc->recv.ud.recv_opt |= IB_RECV_OPT_IMMEDIATE;
+            __fallthrough;
                case MLX4_OPCODE_SEND:
                        wc->wc_type   = IB_WC_SEND;
                        break;
@@ -299,6 +300,9 @@ static int mlx4_poll_one(struct mlx4_cq 
                case MLX4_OPCODE_BIND_MW:
                        wc->wc_type   = IB_WC_MW_BIND;
                        break;
+        case MLX4_OPCODE_NOP:
+            wc->wc_type   = IB_WC_NOP;
+            break;
                default:
                        /* assume it's a send completion */
                        wc->wc_type   = IB_WC_SEND;
diff -dwup3 -X excl.txt -r 
\dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mlx4\user\hca\qp.c 
.\hw\mlx4\user\hca\qp.c
--- \dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mlx4\user\hca\qp.c   Fri Aug 
10 15:27:47 2012
+++ .\hw\mlx4\user\hca\qp.c     Wed Aug 22 10:47:23 2012
@@ -62,6 +62,9 @@ static enum mlx4_opcode_type __to_opcode
        case WR_FETCH_ADD:
                opcode = MLX4_OPCODE_ATOMIC_FA;
                break;
+    case WR_NOP:
+        opcode = MLX4_OPCODE_NOP;
+        break;
        default:
                opcode = MLX4_OPCODE_INVALID;
                break;
diff -dwup3 -X excl.txt -r 
\dev\openib\ofw\gen1\branches\mlx4_30\trunk\inc\iba\ib_types.h 
.\inc\iba\ib_types.h
--- \dev\openib\ofw\gen1\branches\mlx4_30\trunk\inc\iba\ib_types.h      Thu Aug 
09 14:23:51 2012
+++ .\inc\iba\ib_types.h        Thu Aug 23 12:39:13 2012
@@ -11461,6 +11461,7 @@ typedef enum _ib_wc_type_t {
        IB_WC_COMPARE_SWAP,
        IB_WC_FETCH_ADD,
        IB_WC_MW_BIND,
+    IB_WC_NOP,
        IB_WC_UNKNOWN1,
        IB_WC_RECV = (1 << 7),
        IB_WC_RECV_RDMA_WRITE,

Attachment: ndv2.46.patch
Description: ndv2.46.patch

_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to