aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/ipoib/ipoib_ib.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_ib.c')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_ib.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index 08c4396cf41..d13f4fb3853 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -231,6 +231,10 @@ static void ipoib_ib_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
231 skb->dev = dev; 231 skb->dev = dev;
232 /* XXX get correct PACKET_ type here */ 232 /* XXX get correct PACKET_ type here */
233 skb->pkt_type = PACKET_HOST; 233 skb->pkt_type = PACKET_HOST;
234
235 if (test_bit(IPOIB_FLAG_CSUM, &priv->flags) && likely(wc->csum_ok))
236 skb->ip_summed = CHECKSUM_UNNECESSARY;
237
234 netif_receive_skb(skb); 238 netif_receive_skb(skb);
235 239
236repost: 240repost:
@@ -442,6 +446,11 @@ void ipoib_send(struct net_device *dev, struct sk_buff *skb,
442 return; 446 return;
443 } 447 }
444 448
449 if (skb->ip_summed == CHECKSUM_PARTIAL)
450 priv->tx_wr.send_flags |= IB_SEND_IP_CSUM;
451 else
452 priv->tx_wr.send_flags &= ~IB_SEND_IP_CSUM;
453
445 if (unlikely(post_send(priv, priv->tx_head & (ipoib_sendq_size - 1), 454 if (unlikely(post_send(priv, priv->tx_head & (ipoib_sendq_size - 1),
446 address->ah, qpn, 455 address->ah, qpn,
447 tx_req->mapping, skb_headlen(skb), 456 tx_req->mapping, skb_headlen(skb),