[PATCH for-2.6.38 2/2] IB/ipoib: add GRO support

Or Gerlitz
2010-12-15T11:25:16Z

add GRO support

Signed-off-by: Or Gerlitz <ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org>
---
tested with 2.6.37-rc5

drivers/infiniband/ulp/ipoib/ipoib_cm.c | 1 +
drivers/infiniband/ulp/ipoib/ipoib_ib.c | 2 +-
drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 ++
3 files changed, 4 insertions(+), 1 deletion(-)

Index: b/drivers/infiniband/ulp/ipoib/ipoib_main.c
===================================================================
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -1159,6 +1159,8 @@ int ipoib_set_dev_features(struct ipoib_
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;

Index: b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
===================================================================
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -295,7 +295,7 @@ static void ipoib_ib_handle_rx_wc(struct
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: b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
===================================================================
--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -1480,6 +1480,7 @@ static ssize_t set_mode(struct device *d

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;
}