diff options
author | Eli Cohen <eli@dev.mellanox.co.il> | 2008-04-17 00:01:10 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-17 00:01:10 -0400 |
commit | 8ff095ec4bce7be943beff3b330562e2f0e42167 (patch) | |
tree | d0643b575033a033a072c2c0687be7e57d183d99 /drivers/infiniband/hw/mlx4/qp.c | |
parent | 6046136c742e32d5e6431cdcd8957638d1816821 (diff) |
IB/mlx4: Add IPoIB checksum offload support
ConnectX 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@mellanox.co.il>
Signed-off-by: Ali Ayub <ali@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx4/qp.c')
-rw-r--r-- | drivers/infiniband/hw/mlx4/qp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index ac965ab28845..31b2b5b230bd 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c | |||
@@ -1436,6 +1436,9 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, | |||
1436 | cpu_to_be32(MLX4_WQE_CTRL_CQ_UPDATE) : 0) | | 1436 | cpu_to_be32(MLX4_WQE_CTRL_CQ_UPDATE) : 0) | |
1437 | (wr->send_flags & IB_SEND_SOLICITED ? | 1437 | (wr->send_flags & IB_SEND_SOLICITED ? |
1438 | cpu_to_be32(MLX4_WQE_CTRL_SOLICITED) : 0) | | 1438 | cpu_to_be32(MLX4_WQE_CTRL_SOLICITED) : 0) | |
1439 | ((wr->send_flags & IB_SEND_IP_CSUM) ? | ||
1440 | cpu_to_be32(MLX4_WQE_CTRL_IP_CSUM | | ||
1441 | MLX4_WQE_CTRL_TCP_UDP_CSUM) : 0) | | ||
1439 | qp->sq_signal_bits; | 1442 | qp->sq_signal_bits; |
1440 | 1443 | ||
1441 | if (wr->opcode == IB_WR_SEND_WITH_IMM || | 1444 | if (wr->opcode == IB_WR_SEND_WITH_IMM || |