Add support for RAW_ETH QP. Also, consider the flag IBV_SEND_IP_CSUM in send
operation.

Signed-off-by: Aleksey Senin <[email protected]>
Reviewed-by:   Moni Shoua  <[email protected]>

--
diff --git a/src/qp.c b/src/qp.c
index 4322513..d850b1c 100644
--- a/src/qp.c
+++ b/src/qp.c
@@ -229,6 +229,8 @@ int mlx4_post_send(struct ibv_qp *ibqp, struct ibv_send_wr 
*wr,
                         htonl(MLX4_WQE_CTRL_CQ_UPDATE) : 0) |
                        (wr->send_flags & IBV_SEND_SOLICITED ?
                         htonl(MLX4_WQE_CTRL_SOLICIT) : 0)   |
+                       (wr->send_flags & IBV_SEND_IP_CSUM ?
+                        htonl(MLX4_WQE_CTRL_IP_CSUM) : 0)   |
                        qp->sq_signal_bits;
 
                if (wr->opcode == IBV_WR_SEND_WITH_IMM ||
@@ -284,6 +286,10 @@ int mlx4_post_send(struct ibv_qp *ibqp, struct ibv_send_wr 
*wr,
                        size += sizeof (struct mlx4_wqe_datagram_seg) / 16;
                        break;
 
+               case IBV_QPT_RAW_ETH:
+                       /* For raw eth, the MLX4_WQE_CTRL_SOLICIT flag is used
+                        * to indicate that no icrc should be calculated */
+                       ctrl->xrcrb_flags |= htonl(MLX4_WQE_CTRL_SOLICIT);
                default:
                        break;
                }
diff --git a/src/wqe.h b/src/wqe.h
index fa2f8ac..edd3da1 100644
--- a/src/wqe.h
+++ b/src/wqe.h
@@ -41,6 +41,7 @@ enum {
        MLX4_WQE_CTRL_FENCE     = 1 << 6,
        MLX4_WQE_CTRL_CQ_UPDATE = 3 << 2,
        MLX4_WQE_CTRL_SOLICIT   = 1 << 1,
+       MLX4_WQE_CTRL_IP_CSUM   = 3 << 4,
 };
 
 enum {
_______________________________________________
ewg mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg

Reply via email to