]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/8021q/vlan_core.c
GRO: Move netpoll checks to correct location
[karo-tx-linux.git] / net / 8021q / vlan_core.c
index 378fa69d625ae19b0bae9d70d0f9aeb5d66b2ebd..6227248597c495d3cebf00e1d8bed913e783d628 100644 (file)
@@ -1,12 +1,16 @@
 #include <linux/skbuff.h>
 #include <linux/netdevice.h>
 #include <linux/if_vlan.h>
+#include <linux/netpoll.h>
 #include "vlan.h"
 
 /* VLAN rx hw acceleration helper.  This acts like netif_{rx,receive_skb}(). */
 int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
                      u16 vlan_tci, int polling)
 {
+       if (netpoll_rx(skb))
+               return NET_RX_DROP;
+
        if (skb_bond_should_drop(skb))
                goto drop;
 
@@ -75,6 +79,9 @@ static int vlan_gro_common(struct napi_struct *napi, struct vlan_group *grp,
 {
        struct sk_buff *p;
 
+       if (netpoll_rx_on(skb))
+               return GRO_NORMAL;
+
        if (skb_bond_should_drop(skb))
                goto drop;
 
@@ -85,14 +92,16 @@ static int vlan_gro_common(struct napi_struct *napi, struct vlan_group *grp,
                goto drop;
 
        for (p = napi->gro_list; p; p = p->next) {
-               NAPI_GRO_CB(p)->same_flow = p->dev == skb->dev;
+               NAPI_GRO_CB(p)->same_flow =
+                       p->dev == skb->dev && !compare_ether_header(
+                               skb_mac_header(p), skb_gro_mac_header(skb));
                NAPI_GRO_CB(p)->flush = 0;
        }
 
        return dev_gro_receive(napi, skb);
 
 drop:
-       return 2;
+       return GRO_DROP;
 }
 
 int vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp,