From patchwork Sun Dec 19 09:30:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksey Senin X-Patchwork-Id: 418651 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBJ9Ugoe025328 for ; Sun, 19 Dec 2010 09:30:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752751Ab0LSJak (ORCPT ); Sun, 19 Dec 2010 04:30:40 -0500 Received: from fwil.voltaire.com ([193.47.165.2]:43235 "EHLO Exil2010.voltaire.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752240Ab0LSJaj (ORCPT ); Sun, 19 Dec 2010 04:30:39 -0500 Received: from exil.voltaire.com (172.25.0.55) by Exil2010.voltaire.com (172.25.0.11) with Microsoft SMTP Server id 14.1.255.0; Sun, 19 Dec 2010 11:30:38 +0200 Received: from [172.25.5.190] ([172.25.5.190]) by exil.voltaire.com with Microsoft SMTPSVC(6.0.3790.4675); Sun, 19 Dec 2010 11:30:37 +0200 Message-ID: <4D0DD0BD.5080801@voltaire.com> Date: Sun, 19 Dec 2010 11:30:37 +0200 From: Aleksey Senin User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6 MIME-Version: 1.0 To: Vladimir Sokolovsky , Subject: [PATCH] libmlx4: Add RAW_ETH to post_send X-OriginalArrivalTime: 19 Dec 2010 09:30:37.0900 (UTC) FILETIME=[6536F0C0:01CB9F5F] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sun, 19 Dec 2010 09:30:43 +0000 (UTC) diff --git a/fixes/add_raw_eth_to_post_send.patch b/fixes/add_raw_eth_to_post_send.patch new file mode 100644 index 0000000..ce4e873 --- /dev/null +++ b/fixes/add_raw_eth_to_post_send.patch @@ -0,0 +1,52 @@ +From c31190ddc735cd2a28598846f5b57c9cf8434272 Mon Sep 17 00:00:00 2001 +From: Aleksey Senin +Date: Sun, 19 Dec 2010 11:11:23 +0200 +Subject: [PATCH] Add RAW_ETH case to post_send + +Add controling checksum calculation when using RAW QP type. + +Signed-off-by: Aleksey Senin +--- + src/qp.c | 6 ++++++ + src/wqe.h | 1 + + 2 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/src/qp.c b/src/qp.c +index d194ae3..580afff 100644 +--- a/src/qp.c ++++ b/src/qp.c +@@ -231,6 +231,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 || +@@ -283,6 +285,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 6f7f309..007b617 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 { +-- +1.6.4.2 + diff --git a/fixes/series b/fixes/series index 83516ec..2d04b25 100644 --- a/fixes/series +++ b/fixes/series @@ -8,3 +8,4 @@ rocee_add_support.patch add_supported_devices.patch post_rcv_end_of_sg.patch fix_inline_size.patch +add_raw_eth_to_post_send.patch