diff options
Diffstat (limited to 'net/8021q/vlan_core.c')
-rw-r--r-- | net/8021q/vlan_core.c | 53 |
1 files changed, 13 insertions, 40 deletions
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c index 2886d2fb9ab5..654e45f5719d 100644 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c | |||
@@ -89,38 +89,27 @@ static int vlan_gro_common(struct napi_struct *napi, struct vlan_group *grp, | |||
89 | goto drop; | 89 | goto drop; |
90 | 90 | ||
91 | for (p = napi->gro_list; p; p = p->next) { | 91 | for (p = napi->gro_list; p; p = p->next) { |
92 | NAPI_GRO_CB(p)->same_flow = p->dev == skb->dev; | 92 | NAPI_GRO_CB(p)->same_flow = |
93 | p->dev == skb->dev && !compare_ether_header( | ||
94 | skb_mac_header(p), skb_gro_mac_header(skb)); | ||
93 | NAPI_GRO_CB(p)->flush = 0; | 95 | NAPI_GRO_CB(p)->flush = 0; |
94 | } | 96 | } |
95 | 97 | ||
96 | return dev_gro_receive(napi, skb); | 98 | return dev_gro_receive(napi, skb); |
97 | 99 | ||
98 | drop: | 100 | drop: |
99 | return 2; | 101 | return GRO_DROP; |
100 | } | 102 | } |
101 | 103 | ||
102 | int vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, | 104 | int vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, |
103 | unsigned int vlan_tci, struct sk_buff *skb) | 105 | unsigned int vlan_tci, struct sk_buff *skb) |
104 | { | 106 | { |
105 | int err = NET_RX_SUCCESS; | 107 | if (netpoll_rx_on(skb)) |
108 | return vlan_hwaccel_receive_skb(skb, grp, vlan_tci); | ||
106 | 109 | ||
107 | if (netpoll_receive_skb(skb)) | 110 | skb_gro_reset_offset(skb); |
108 | return NET_RX_DROP; | ||
109 | |||
110 | switch (vlan_gro_common(napi, grp, vlan_tci, skb)) { | ||
111 | case -1: | ||
112 | return netif_receive_skb(skb); | ||
113 | 111 | ||
114 | case 2: | 112 | return napi_skb_finish(vlan_gro_common(napi, grp, vlan_tci, skb), skb); |
115 | err = NET_RX_DROP; | ||
116 | /* fall through */ | ||
117 | |||
118 | case 1: | ||
119 | kfree_skb(skb); | ||
120 | break; | ||
121 | } | ||
122 | |||
123 | return err; | ||
124 | } | 113 | } |
125 | EXPORT_SYMBOL(vlan_gro_receive); | 114 | EXPORT_SYMBOL(vlan_gro_receive); |
126 | 115 | ||
@@ -128,30 +117,14 @@ int vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp, | |||
128 | unsigned int vlan_tci, struct napi_gro_fraginfo *info) | 117 | unsigned int vlan_tci, struct napi_gro_fraginfo *info) |
129 | { | 118 | { |
130 | struct sk_buff *skb = napi_fraginfo_skb(napi, info); | 119 | struct sk_buff *skb = napi_fraginfo_skb(napi, info); |
131 | int err = NET_RX_DROP; | ||
132 | 120 | ||
133 | if (!skb) | 121 | if (!skb) |
134 | goto out; | 122 | return NET_RX_DROP; |
135 | |||
136 | if (netpoll_receive_skb(skb)) | ||
137 | goto out; | ||
138 | |||
139 | err = NET_RX_SUCCESS; | ||
140 | |||
141 | switch (vlan_gro_common(napi, grp, vlan_tci, skb)) { | ||
142 | case -1: | ||
143 | return netif_receive_skb(skb); | ||
144 | |||
145 | case 2: | ||
146 | err = NET_RX_DROP; | ||
147 | /* fall through */ | ||
148 | 123 | ||
149 | case 1: | 124 | if (netpoll_rx_on(skb)) |
150 | napi_reuse_skb(napi, skb); | 125 | return vlan_hwaccel_receive_skb(skb, grp, vlan_tci); |
151 | break; | ||
152 | } | ||
153 | 126 | ||
154 | out: | 127 | return napi_frags_finish(napi, skb, |
155 | return err; | 128 | vlan_gro_common(napi, grp, vlan_tci, skb)); |
156 | } | 129 | } |
157 | EXPORT_SYMBOL(vlan_gro_frags); | 130 | EXPORT_SYMBOL(vlan_gro_frags); |