summaryrefslogtreecommitdiffstats
path: root/net/8021q
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2018-06-24 01:13:49 -0400
committerDavid S. Miller <davem@davemloft.net>2018-06-25 22:33:04 -0400
commitd4546c2509b1e9cd082e3682dcec98472e37ee5a (patch)
treeeb7393380a20d8ccaf8f94204fe2c15d2639a780 /net/8021q
parent9ff3b40e411c00870d1c29cd6b843fca7c4160ae (diff)
net: Convert GRO SKB handling to list_head.
Manage pending per-NAPI GRO packets via list_head. Return an SKB pointer from the GRO receive handlers. When GRO receive handlers return non-NULL, it means that this SKB needs to be completed at this time and removed from the NAPI queue. Several operations are greatly simplified by this transformation, especially timing out the oldest SKB in the list when gro_count exceeds MAX_GRO_SKBS, and napi_gro_flush() which walks the queue in reverse order. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q')
-rw-r--r--net/8021q/vlan.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 73a65789271b..99141986efa0 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -647,13 +647,14 @@ out:
647 return err; 647 return err;
648} 648}
649 649
650static struct sk_buff **vlan_gro_receive(struct sk_buff **head, 650static struct sk_buff *vlan_gro_receive(struct list_head *head,
651 struct sk_buff *skb) 651 struct sk_buff *skb)
652{ 652{
653 struct sk_buff *p, **pp = NULL;
654 struct vlan_hdr *vhdr;
655 unsigned int hlen, off_vlan;
656 const struct packet_offload *ptype; 653 const struct packet_offload *ptype;
654 unsigned int hlen, off_vlan;
655 struct sk_buff *pp = NULL;
656 struct vlan_hdr *vhdr;
657 struct sk_buff *p;
657 __be16 type; 658 __be16 type;
658 int flush = 1; 659 int flush = 1;
659 660
@@ -675,7 +676,7 @@ static struct sk_buff **vlan_gro_receive(struct sk_buff **head,
675 676
676 flush = 0; 677 flush = 0;
677 678
678 for (p = *head; p; p = p->next) { 679 list_for_each_entry(p, head, list) {
679 struct vlan_hdr *vhdr2; 680 struct vlan_hdr *vhdr2;
680 681
681 if (!NAPI_GRO_CB(p)->same_flow) 682 if (!NAPI_GRO_CB(p)->same_flow)