From patchwork Wed Dec 15 11:25:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Or Gerlitz X-Patchwork-Id: 413061 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBFBOuNt020372 for ; Wed, 15 Dec 2010 11:25:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753333Ab0LOLZS (ORCPT ); Wed, 15 Dec 2010 06:25:18 -0500 Received: from fwil.voltaire.com ([193.47.165.2]:10723 "EHLO Exil2010.voltaire.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753302Ab0LOLZR (ORCPT ); Wed, 15 Dec 2010 06:25:17 -0500 Received: from exil.voltaire.com (172.25.0.55) by Exil2010.voltaire.com (172.25.0.11) with Microsoft SMTP Server id 14.1.255.0; Wed, 15 Dec 2010 13:25:16 +0200 Received: from [172.25.5.141] ([172.25.5.141]) by exil.voltaire.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 15 Dec 2010 13:25:16 +0200 Date: Wed, 15 Dec 2010 13:25:16 +0200 From: Or Gerlitz To: Roland Dreier CC: linux-rdma , Vladimir Sokolovsky , "Eric W. Biederman" , Ben Hutchings Subject: [PATCH for-2.6.38 2/2] IB/ipoib: add GRO support In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-OriginalArrivalTime: 15 Dec 2010 11:25:16.0050 (UTC) FILETIME=[BF425720:01CB9C4A] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 15 Dec 2010 11:25:19 +0000 (UTC) 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; }