IPoIB: Add GRO support
authorOr Gerlitz <ogerlitz@voltaire.com>
Tue, 11 Jan 2011 01:41:55 +0000 (17:41 -0800)
committerRoland Dreier <rolandd@cisco.com>
Tue, 11 Jan 2011 01:41:55 +0000 (17:41 -0800)
Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/ipoib/ipoib_cm.c
drivers/infiniband/ulp/ipoib/ipoib_ib.c
drivers/infiniband/ulp/ipoib/ipoib_main.c

index bb1004114dec09c6f3b6df7c9dab66d1f09f5bae..c1c49f2d35b53b1458ea595361e8f98b5059557d 100644 (file)
@@ -1480,6 +1480,7 @@ static ssize_t set_mode(struct device *d, struct device_attribute *attr,
 
                if (test_bit(IPOIB_FLAG_CSUM, &priv->flags)) {
                        dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG;
+                       priv->dev->features |= NETIF_F_GRO;
                        if (priv->hca_caps & IB_DEVICE_UD_TSO)
                                dev->features |= NETIF_F_TSO;
                }
index 44c33bd979523049809b1256f52dcbd5a3bcb3cf..806d0292dc3928fab53ee892a39128ef38c9b2d4 100644 (file)
@@ -295,7 +295,7 @@ static void ipoib_ib_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
        if (test_bit(IPOIB_FLAG_CSUM, &priv->flags) && likely(wc->csum_ok))
                skb->ip_summed = CHECKSUM_UNNECESSARY;
 
-       netif_receive_skb(skb);
+       napi_gro_receive(&priv->napi, skb);
 
 repost:
        if (unlikely(ipoib_ib_post_receive(dev, wr_id)))
index c434a856a787dea6c235f56a7c666e5a3c22aee7..7a07a728fe0d58f8af61a0f700653e5142fc9512 100644 (file)
@@ -1159,6 +1159,8 @@ int ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca)
                priv->dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM;
        }
 
+       priv->dev->features |= NETIF_F_GRO;
+
        if (priv->dev->features & NETIF_F_SG && priv->hca_caps & IB_DEVICE_UD_TSO)
                priv->dev->features |= NETIF_F_TSO;