diff options
author | Tom Herbert <therbert@google.com> | 2010-05-03 15:08:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-04 02:24:19 -0400 |
commit | 53f224cc5f8f650f8e8d86abbe990c93f12834c8 (patch) | |
tree | e87ce4e64c959ac47275784b6bf5b9df14ad1fb9 /drivers/net/forcedeth.c | |
parent | 93bb64eac10aad3dae6178d7da94765f207d121f (diff) |
forcedeth: GRO support
Add GRO support to forcedeth.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/forcedeth.c')
-rw-r--r-- | drivers/net/forcedeth.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 5cf0e6615695..4a24cc7d9555 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -2817,7 +2817,7 @@ static int nv_rx_process(struct net_device *dev, int limit) | |||
2817 | dprintk(KERN_DEBUG "%s: nv_rx_process: %d bytes, proto %d accepted.\n", | 2817 | dprintk(KERN_DEBUG "%s: nv_rx_process: %d bytes, proto %d accepted.\n", |
2818 | dev->name, len, skb->protocol); | 2818 | dev->name, len, skb->protocol); |
2819 | #ifdef CONFIG_FORCEDETH_NAPI | 2819 | #ifdef CONFIG_FORCEDETH_NAPI |
2820 | netif_receive_skb(skb); | 2820 | napi_gro_receive(&np->napi, skb); |
2821 | #else | 2821 | #else |
2822 | netif_rx(skb); | 2822 | netif_rx(skb); |
2823 | #endif | 2823 | #endif |
@@ -2910,7 +2910,7 @@ static int nv_rx_process_optimized(struct net_device *dev, int limit) | |||
2910 | 2910 | ||
2911 | if (likely(!np->vlangrp)) { | 2911 | if (likely(!np->vlangrp)) { |
2912 | #ifdef CONFIG_FORCEDETH_NAPI | 2912 | #ifdef CONFIG_FORCEDETH_NAPI |
2913 | netif_receive_skb(skb); | 2913 | napi_gro_receive(&np->napi, skb); |
2914 | #else | 2914 | #else |
2915 | netif_rx(skb); | 2915 | netif_rx(skb); |
2916 | #endif | 2916 | #endif |
@@ -2918,15 +2918,15 @@ static int nv_rx_process_optimized(struct net_device *dev, int limit) | |||
2918 | vlanflags = le32_to_cpu(np->get_rx.ex->buflow); | 2918 | vlanflags = le32_to_cpu(np->get_rx.ex->buflow); |
2919 | if (vlanflags & NV_RX3_VLAN_TAG_PRESENT) { | 2919 | if (vlanflags & NV_RX3_VLAN_TAG_PRESENT) { |
2920 | #ifdef CONFIG_FORCEDETH_NAPI | 2920 | #ifdef CONFIG_FORCEDETH_NAPI |
2921 | vlan_hwaccel_receive_skb(skb, np->vlangrp, | 2921 | vlan_gro_receive(&np->napi, np->vlangrp, |
2922 | vlanflags & NV_RX3_VLAN_TAG_MASK); | 2922 | vlanflags & NV_RX3_VLAN_TAG_MASK, skb); |
2923 | #else | 2923 | #else |
2924 | vlan_hwaccel_rx(skb, np->vlangrp, | 2924 | vlan_hwaccel_rx(skb, np->vlangrp, |
2925 | vlanflags & NV_RX3_VLAN_TAG_MASK); | 2925 | vlanflags & NV_RX3_VLAN_TAG_MASK); |
2926 | #endif | 2926 | #endif |
2927 | } else { | 2927 | } else { |
2928 | #ifdef CONFIG_FORCEDETH_NAPI | 2928 | #ifdef CONFIG_FORCEDETH_NAPI |
2929 | netif_receive_skb(skb); | 2929 | napi_gro_receive(&np->napi, skb); |
2930 | #else | 2930 | #else |
2931 | netif_rx(skb); | 2931 | netif_rx(skb); |
2932 | #endif | 2932 | #endif |
@@ -5711,6 +5711,9 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i | |||
5711 | np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK; | 5711 | np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK; |
5712 | dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG; | 5712 | dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG; |
5713 | dev->features |= NETIF_F_TSO; | 5713 | dev->features |= NETIF_F_TSO; |
5714 | #ifdef CONFIG_FORCEDETH_NAPI | ||
5715 | dev->features |= NETIF_F_GRO; | ||
5716 | #endif | ||
5714 | } | 5717 | } |
5715 | 5718 | ||
5716 | np->vlanctl_bits = 0; | 5719 | np->vlanctl_bits = 0; |