diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-08-31 20:25:32 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-01 19:57:55 +0200 |
commit | 86cac58b71227cc34a3d0e78f19585c0eff49ea3 (patch) | |
tree | e3329c4599474c12f17b0de5b2e8e4ff92233853 /drivers/net/skge.c | |
parent | drivers/net/can/mscan/mpc5xxx_can.c: Add of_node_put to avoid memory leak (diff) | |
download | linux-86cac58b71227cc34a3d0e78f19585c0eff49ea3.tar.xz linux-86cac58b71227cc34a3d0e78f19585c0eff49ea3.zip |
skge: add GRO support
- napi_gro_flush() is exported from net/core/dev.c, to avoid
an irq_save/irq_restore in the packet receive path.
- use napi_gro_receive() instead of netif_receive_skb()
- use napi_gro_flush() before calling __napi_complete()
- turn on NETIF_F_GRO by default
- Tested on a Marvell 88E8001 Gigabit NIC
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/skge.c')
-rw-r--r-- | drivers/net/skge.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 40e5c46e7571..a8a63581d63d 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; } } @@ -3192,6 +3191,7 @@ static int skge_poll(struct napi_struct *napi, int to_do) if (work_done < to_do) { unsigned long flags; + napi_gro_flush(napi); spin_lock_irqsave(&hw->hw_lock, flags); __napi_complete(napi); hw->intr_mask |= napimask[skge->port]; @@ -3849,6 +3849,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); |