From: David S. Miller Date: Mon, 2 Mar 2009 05:35:16 +0000 (-0800) Subject: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=aa4abc9bcce0d2a7ec189e897f8f8c58ca04643b;p=openwrt%2Fstaging%2Fblogic.git Merge branch 'master' of /linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-tx.c net/8021q/vlan_core.c net/core/dev.c --- aa4abc9bcce0d2a7ec189e897f8f8c58ca04643b diff --cc net/8021q/vlan_core.c index 70435af153f2,2886d2fb9ab5..2d6e405fc498 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c @@@ -100,9 -102,25 +104,12 @@@ drop int vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, unsigned int vlan_tci, struct sk_buff *skb) { - int err = NET_RX_SUCCESS; + skb_gro_reset_offset(skb); + if (netpoll_receive_skb(skb)) + return NET_RX_DROP; + - switch (vlan_gro_common(napi, grp, vlan_tci, skb)) { - case -1: - return netif_receive_skb(skb); - - case 2: - err = NET_RX_DROP; - /* fall through */ - - case 1: - kfree_skb(skb); - break; - } - - return err; + return napi_skb_finish(vlan_gro_common(napi, grp, vlan_tci, skb), skb); } EXPORT_SYMBOL(vlan_gro_receive); @@@ -110,11 -128,30 +117,14 @@@ int vlan_gro_frags(struct napi_struct * unsigned int vlan_tci, struct napi_gro_fraginfo *info) { struct sk_buff *skb = napi_fraginfo_skb(napi, info); - int err = NET_RX_DROP; if (!skb) - goto out; + return NET_RX_DROP; + if (netpoll_receive_skb(skb)) - goto out; - - err = NET_RX_SUCCESS; - - switch (vlan_gro_common(napi, grp, vlan_tci, skb)) { - case -1: - return netif_receive_skb(skb); - - case 2: - err = NET_RX_DROP; - /* fall through */ - - case 1: - napi_reuse_skb(napi, skb); - break; - } ++ return NET_RX_DROP; + -out: - return err; + return napi_frags_finish(napi, skb, + vlan_gro_common(napi, grp, vlan_tci, skb)); } EXPORT_SYMBOL(vlan_gro_frags); diff --cc net/core/dev.c index ac6ab12d3297,72b0d26fd46d..bcd0c2154bb2 --- a/net/core/dev.c +++ b/net/core/dev.c @@@ -2483,19 -2486,16 +2483,22 @@@ static int __napi_gro_receive(struct na return dev_gro_receive(napi, skb); } -int napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb) +int napi_skb_finish(int ret, struct sk_buff *skb) { + int err = NET_RX_SUCCESS; + + if (netpoll_receive_skb(skb)) + return NET_RX_DROP; + - switch (__napi_gro_receive(napi, skb)) { - case -1: + switch (ret) { + case GRO_NORMAL: return netif_receive_skb(skb); - case 1: + case GRO_DROP: + err = NET_RX_DROP; + /* fall through */ + + case GRO_MERGED_FREE: kfree_skb(skb); break; } @@@ -2580,43 -2553,32 +2583,46 @@@ out } EXPORT_SYMBOL(napi_fraginfo_skb); -int napi_gro_frags(struct napi_struct *napi, struct napi_gro_fraginfo *info) +int napi_frags_finish(struct napi_struct *napi, struct sk_buff *skb, int ret) { - struct sk_buff *skb = napi_fraginfo_skb(napi, info); - int err = NET_RX_DROP; - - if (!skb) - goto out; + int err = NET_RX_SUCCESS; + if (netpoll_receive_skb(skb)) - goto out; ++ return NET_RX_DROP; + - err = NET_RX_SUCCESS; + switch (ret) { + case GRO_NORMAL: + case GRO_HELD: + skb->protocol = eth_type_trans(skb, napi->dev); - switch (__napi_gro_receive(napi, skb)) { - case -1: - return netif_receive_skb(skb); + if (ret == GRO_NORMAL) + return netif_receive_skb(skb); - case 0: - goto out; - } + skb_gro_pull(skb, -ETH_HLEN); + break; - napi_reuse_skb(napi, skb); + case GRO_DROP: + err = NET_RX_DROP; + /* fall through */ + + case GRO_MERGED_FREE: + napi_reuse_skb(napi, skb); + break; + } -out: return err; } +EXPORT_SYMBOL(napi_frags_finish); + +int napi_gro_frags(struct napi_struct *napi, struct napi_gro_fraginfo *info) +{ + struct sk_buff *skb = napi_fraginfo_skb(napi, info); + + if (!skb) + return NET_RX_DROP; + + return napi_frags_finish(napi, skb, __napi_gro_receive(napi, skb)); +} EXPORT_SYMBOL(napi_gro_frags); static int process_backlog(struct napi_struct *napi, int quota)