diff options
-rw-r--r-- | include/linux/inet_lro.h | 2 | ||||
-rw-r--r-- | net/ipv4/inet_lro.c | 39 |
2 files changed, 11 insertions, 30 deletions
diff --git a/include/linux/inet_lro.h b/include/linux/inet_lro.h index b27e773e7144..2cf55afbcd4e 100644 --- a/include/linux/inet_lro.h +++ b/include/linux/inet_lro.h | |||
@@ -50,7 +50,6 @@ struct net_lro_desc { | |||
50 | struct skb_frag_struct *next_frag; | 50 | struct skb_frag_struct *next_frag; |
51 | struct iphdr *iph; | 51 | struct iphdr *iph; |
52 | struct tcphdr *tcph; | 52 | struct tcphdr *tcph; |
53 | struct vlan_group *vgrp; | ||
54 | __wsum data_csum; | 53 | __wsum data_csum; |
55 | __be32 tcp_rcv_tsecr; | 54 | __be32 tcp_rcv_tsecr; |
56 | __be32 tcp_rcv_tsval; | 55 | __be32 tcp_rcv_tsval; |
@@ -60,7 +59,6 @@ struct net_lro_desc { | |||
60 | u16 ip_tot_len; | 59 | u16 ip_tot_len; |
61 | u16 tcp_saw_tstamp; /* timestamps enabled */ | 60 | u16 tcp_saw_tstamp; /* timestamps enabled */ |
62 | __be16 tcp_window; | 61 | __be16 tcp_window; |
63 | u16 vlan_tag; | ||
64 | int pkt_aggr_cnt; /* counts aggregated packets */ | 62 | int pkt_aggr_cnt; /* counts aggregated packets */ |
65 | int vlan_packet; | 63 | int vlan_packet; |
66 | int mss; | 64 | int mss; |
diff --git a/net/ipv4/inet_lro.c b/net/ipv4/inet_lro.c index 5cf07593282b..ef7ae6049a51 100644 --- a/net/ipv4/inet_lro.c +++ b/net/ipv4/inet_lro.c | |||
@@ -146,8 +146,7 @@ static __wsum lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len) | |||
146 | } | 146 | } |
147 | 147 | ||
148 | static void lro_init_desc(struct net_lro_desc *lro_desc, struct sk_buff *skb, | 148 | static void lro_init_desc(struct net_lro_desc *lro_desc, struct sk_buff *skb, |
149 | struct iphdr *iph, struct tcphdr *tcph, | 149 | struct iphdr *iph, struct tcphdr *tcph) |
150 | u16 vlan_tag, struct vlan_group *vgrp) | ||
151 | { | 150 | { |
152 | int nr_frags; | 151 | int nr_frags; |
153 | __be32 *ptr; | 152 | __be32 *ptr; |
@@ -173,8 +172,6 @@ static void lro_init_desc(struct net_lro_desc *lro_desc, struct sk_buff *skb, | |||
173 | } | 172 | } |
174 | 173 | ||
175 | lro_desc->mss = tcp_data_len; | 174 | lro_desc->mss = tcp_data_len; |
176 | lro_desc->vgrp = vgrp; | ||
177 | lro_desc->vlan_tag = vlan_tag; | ||
178 | lro_desc->active = 1; | 175 | lro_desc->active = 1; |
179 | 176 | ||
180 | lro_desc->data_csum = lro_tcp_data_csum(iph, tcph, | 177 | lro_desc->data_csum = lro_tcp_data_csum(iph, tcph, |
@@ -309,29 +306,17 @@ static void lro_flush(struct net_lro_mgr *lro_mgr, | |||
309 | 306 | ||
310 | skb_shinfo(lro_desc->parent)->gso_size = lro_desc->mss; | 307 | skb_shinfo(lro_desc->parent)->gso_size = lro_desc->mss; |
311 | 308 | ||
312 | if (lro_desc->vgrp) { | 309 | if (lro_mgr->features & LRO_F_NAPI) |
313 | if (lro_mgr->features & LRO_F_NAPI) | 310 | netif_receive_skb(lro_desc->parent); |
314 | vlan_hwaccel_receive_skb(lro_desc->parent, | 311 | else |
315 | lro_desc->vgrp, | 312 | netif_rx(lro_desc->parent); |
316 | lro_desc->vlan_tag); | ||
317 | else | ||
318 | vlan_hwaccel_rx(lro_desc->parent, | ||
319 | lro_desc->vgrp, | ||
320 | lro_desc->vlan_tag); | ||
321 | |||
322 | } else { | ||
323 | if (lro_mgr->features & LRO_F_NAPI) | ||
324 | netif_receive_skb(lro_desc->parent); | ||
325 | else | ||
326 | netif_rx(lro_desc->parent); | ||
327 | } | ||
328 | 313 | ||
329 | LRO_INC_STATS(lro_mgr, flushed); | 314 | LRO_INC_STATS(lro_mgr, flushed); |
330 | lro_clear_desc(lro_desc); | 315 | lro_clear_desc(lro_desc); |
331 | } | 316 | } |
332 | 317 | ||
333 | static int __lro_proc_skb(struct net_lro_mgr *lro_mgr, struct sk_buff *skb, | 318 | static int __lro_proc_skb(struct net_lro_mgr *lro_mgr, struct sk_buff *skb, |
334 | struct vlan_group *vgrp, u16 vlan_tag, void *priv) | 319 | void *priv) |
335 | { | 320 | { |
336 | struct net_lro_desc *lro_desc; | 321 | struct net_lro_desc *lro_desc; |
337 | struct iphdr *iph; | 322 | struct iphdr *iph; |
@@ -360,7 +345,7 @@ static int __lro_proc_skb(struct net_lro_mgr *lro_mgr, struct sk_buff *skb, | |||
360 | goto out; | 345 | goto out; |
361 | 346 | ||
362 | skb->ip_summed = lro_mgr->ip_summed_aggr; | 347 | skb->ip_summed = lro_mgr->ip_summed_aggr; |
363 | lro_init_desc(lro_desc, skb, iph, tcph, vlan_tag, vgrp); | 348 | lro_init_desc(lro_desc, skb, iph, tcph); |
364 | LRO_INC_STATS(lro_mgr, aggregated); | 349 | LRO_INC_STATS(lro_mgr, aggregated); |
365 | return 0; | 350 | return 0; |
366 | } | 351 | } |
@@ -433,8 +418,7 @@ static struct sk_buff *lro_gen_skb(struct net_lro_mgr *lro_mgr, | |||
433 | static struct sk_buff *__lro_proc_segment(struct net_lro_mgr *lro_mgr, | 418 | static struct sk_buff *__lro_proc_segment(struct net_lro_mgr *lro_mgr, |
434 | struct skb_frag_struct *frags, | 419 | struct skb_frag_struct *frags, |
435 | int len, int true_size, | 420 | int len, int true_size, |
436 | struct vlan_group *vgrp, | 421 | void *priv, __wsum sum) |
437 | u16 vlan_tag, void *priv, __wsum sum) | ||
438 | { | 422 | { |
439 | struct net_lro_desc *lro_desc; | 423 | struct net_lro_desc *lro_desc; |
440 | struct iphdr *iph; | 424 | struct iphdr *iph; |
@@ -480,7 +464,7 @@ static struct sk_buff *__lro_proc_segment(struct net_lro_mgr *lro_mgr, | |||
480 | tcph = (void *)((u8 *)skb->data + vlan_hdr_len | 464 | tcph = (void *)((u8 *)skb->data + vlan_hdr_len |
481 | + IP_HDR_LEN(iph)); | 465 | + IP_HDR_LEN(iph)); |
482 | 466 | ||
483 | lro_init_desc(lro_desc, skb, iph, tcph, 0, NULL); | 467 | lro_init_desc(lro_desc, skb, iph, tcph); |
484 | LRO_INC_STATS(lro_mgr, aggregated); | 468 | LRO_INC_STATS(lro_mgr, aggregated); |
485 | return NULL; | 469 | return NULL; |
486 | } | 470 | } |
@@ -514,7 +498,7 @@ void lro_receive_skb(struct net_lro_mgr *lro_mgr, | |||
514 | struct sk_buff *skb, | 498 | struct sk_buff *skb, |
515 | void *priv) | 499 | void *priv) |
516 | { | 500 | { |
517 | if (__lro_proc_skb(lro_mgr, skb, NULL, 0, priv)) { | 501 | if (__lro_proc_skb(lro_mgr, skb, priv)) { |
518 | if (lro_mgr->features & LRO_F_NAPI) | 502 | if (lro_mgr->features & LRO_F_NAPI) |
519 | netif_receive_skb(skb); | 503 | netif_receive_skb(skb); |
520 | else | 504 | else |
@@ -529,8 +513,7 @@ void lro_receive_frags(struct net_lro_mgr *lro_mgr, | |||
529 | { | 513 | { |
530 | struct sk_buff *skb; | 514 | struct sk_buff *skb; |
531 | 515 | ||
532 | skb = __lro_proc_segment(lro_mgr, frags, len, true_size, NULL, 0, | 516 | skb = __lro_proc_segment(lro_mgr, frags, len, true_size, priv, sum); |
533 | priv, sum); | ||
534 | if (!skb) | 517 | if (!skb) |
535 | return; | 518 | return; |
536 | 519 | ||