aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2011-04-18 23:48:16 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-25 15:00:30 -0400
commit3aba891dde3842d89ad022237b99c1ed308040b0 (patch)
tree7b89bcdc0362a1fdd50d74c3a8108f16fecfa5b1 /net
parent22d5969fb450afd3a4aff606360f7d52c5a3a628 (diff)
bonding: move processing of recv handlers into handle_frame()
Since now when bonding uses rx_handler, all traffic going into bond device goes thru bond_handle_frame. So there's no need to go back into bonding code later via ptype handlers. This patch converts original ptype handlers into "bonding receive probes". These functions are called from bond_handle_frame and they are registered per-mode. Note that vlan packets are also handled because they are always untagged thanks to vlan_untag() Note that this also allows arpmon for eth-bond-bridge-vlan topology. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 541f22a035a2..3bbb4c2ce92e 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3077,25 +3077,6 @@ void netdev_rx_handler_unregister(struct net_device *dev)
3077} 3077}
3078EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister); 3078EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister);
3079 3079
3080static void vlan_on_bond_hook(struct sk_buff *skb)
3081{
3082 /*
3083 * Make sure ARP frames received on VLAN interfaces stacked on
3084 * bonding interfaces still make their way to any base bonding
3085 * device that may have registered for a specific ptype.
3086 */
3087 if (skb->dev->priv_flags & IFF_802_1Q_VLAN &&
3088 vlan_dev_real_dev(skb->dev)->priv_flags & IFF_BONDING &&
3089 skb->protocol == htons(ETH_P_ARP)) {
3090 struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC);
3091
3092 if (!skb2)
3093 return;
3094 skb2->dev = vlan_dev_real_dev(skb->dev);
3095 netif_rx(skb2);
3096 }
3097}
3098
3099static int __netif_receive_skb(struct sk_buff *skb) 3080static int __netif_receive_skb(struct sk_buff *skb)
3100{ 3081{
3101 struct packet_type *ptype, *pt_prev; 3082 struct packet_type *ptype, *pt_prev;
@@ -3191,8 +3172,6 @@ ncls:
3191 goto out; 3172 goto out;
3192 } 3173 }
3193 3174
3194 vlan_on_bond_hook(skb);
3195
3196 /* deliver only exact match when indicated */ 3175 /* deliver only exact match when indicated */
3197 null_or_dev = deliver_exact ? skb->dev : NULL; 3176 null_or_dev = deliver_exact ? skb->dev : NULL;
3198 3177