aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_qp.c
diff options
context:
space:
mode:
authorEli Cohen <eli@dev.mellanox.co.il>2008-04-17 00:01:11 -0400
committerRoland Dreier <rolandd@cisco.com>2008-04-17 00:01:11 -0400
commit680b575f6d1ae8aa39c4d7ee7e40b749d277fa9f (patch)
tree202da857b6205b699bd189b63e483387f1c58d94 /drivers/infiniband/hw/mthca/mthca_qp.c
parent8ff095ec4bce7be943beff3b330562e2f0e42167 (diff)
IB/mthca: Add IPoIB checksum offload support
Arbel and Sinai devices support checksum generation and verification of TCP and UDP packets for UD IPoIB messages. This patch checks if the HCA supports this and sets the IB_DEVICE_UD_IP_CSUM capability flag if it does. It implements support for handling the IB_SEND_IP_CSUM send flag and setting the csum_ok field in receive work completions. Signed-off-by: Eli Cohen <eli@mellnaox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_qp.c')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_qp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c
index db5595bbf7f0..8433897624bc 100644
--- a/drivers/infiniband/hw/mthca/mthca_qp.c
+++ b/drivers/infiniband/hw/mthca/mthca_qp.c
@@ -2015,6 +2015,8 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
2015 cpu_to_be32(MTHCA_NEXT_CQ_UPDATE) : 0) | 2015 cpu_to_be32(MTHCA_NEXT_CQ_UPDATE) : 0) |
2016 ((wr->send_flags & IB_SEND_SOLICITED) ? 2016 ((wr->send_flags & IB_SEND_SOLICITED) ?
2017 cpu_to_be32(MTHCA_NEXT_SOLICIT) : 0) | 2017 cpu_to_be32(MTHCA_NEXT_SOLICIT) : 0) |
2018 ((wr->send_flags & IB_SEND_IP_CSUM) ?
2019 cpu_to_be32(MTHCA_NEXT_IP_CSUM | MTHCA_NEXT_TCP_UDP_CSUM) : 0) |
2018 cpu_to_be32(1); 2020 cpu_to_be32(1);
2019 if (wr->opcode == IB_WR_SEND_WITH_IMM || 2021 if (wr->opcode == IB_WR_SEND_WITH_IMM ||
2020 wr->opcode == IB_WR_RDMA_WRITE_WITH_IMM) 2022 wr->opcode == IB_WR_RDMA_WRITE_WITH_IMM)