netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next-2.6] skge: add GRO support
@ 2010-08-31 22:32 Eric Dumazet
  2010-09-01  1:31 ` Stephen Hemminger
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2010-08-31 22:32 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Stephen Hemminger

- use napi_gro_receive() instead of netif_receive_skb()
- use napi_complete() instead of __napi_complete()
- turn on NETIF_F_GRO by default
- Tested on a Marvell 88E8801 Gigabit NIC

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 drivers/net/skge.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 40e5c46..c2e29e3 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -3178,8 +3178,7 @@ static int skge_poll(struct napi_struct *napi, int to_do)
 
 		skb = skge_rx_get(dev, e, control, rd->status, rd->csum2);
 		if (likely(skb)) {
-			netif_receive_skb(skb);
-
+			napi_gro_receive(napi, skb);
 			++work_done;
 		}
 	}
@@ -3193,7 +3192,7 @@ static int skge_poll(struct napi_struct *napi, int to_do)
 		unsigned long flags;
 
 		spin_lock_irqsave(&hw->hw_lock, flags);
-		__napi_complete(napi);
+		napi_complete(napi);
 		hw->intr_mask |= napimask[skge->port];
 		skge_write32(hw, B0_IMSK, hw->intr_mask);
 		skge_read32(hw, B0_IMSK);
@@ -3849,6 +3848,7 @@ static struct net_device *skge_devinit(struct skge_hw *hw, int port,
 		dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG;
 		skge->rx_csum = 1;
 	}
+	dev->features |= NETIF_F_GRO;
 
 	/* read the mac address */
 	memcpy_fromio(dev->dev_addr, hw->regs + B2_MAC_1 + port*8, ETH_ALEN);



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-09-01 17:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-31 22:32 [PATCH net-next-2.6] skge: add GRO support Eric Dumazet
2010-09-01  1:31 ` Stephen Hemminger
2010-09-01  4:25   ` Eric Dumazet
2010-09-01 17:58     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).