aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q
diff options
context:
space:
mode:
Diffstat (limited to 'net/8021q')
-rw-r--r--net/8021q/vlan_core.c39
1 files changed, 4 insertions, 35 deletions
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
index e9db889d6222..2eb057a74654 100644
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -98,22 +98,7 @@ drop:
98int vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, 98int vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp,
99 unsigned int vlan_tci, struct sk_buff *skb) 99 unsigned int vlan_tci, struct sk_buff *skb)
100{ 100{
101 int err = NET_RX_SUCCESS; 101 return napi_skb_finish(vlan_gro_common(napi, grp, vlan_tci, skb), skb);
102
103 switch (vlan_gro_common(napi, grp, vlan_tci, skb)) {
104 case -1:
105 return netif_receive_skb(skb);
106
107 case 2:
108 err = NET_RX_DROP;
109 /* fall through */
110
111 case 1:
112 kfree_skb(skb);
113 break;
114 }
115
116 return err;
117} 102}
118EXPORT_SYMBOL(vlan_gro_receive); 103EXPORT_SYMBOL(vlan_gro_receive);
119 104
@@ -121,27 +106,11 @@ int vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp,
121 unsigned int vlan_tci, struct napi_gro_fraginfo *info) 106 unsigned int vlan_tci, struct napi_gro_fraginfo *info)
122{ 107{
123 struct sk_buff *skb = napi_fraginfo_skb(napi, info); 108 struct sk_buff *skb = napi_fraginfo_skb(napi, info);
124 int err = NET_RX_DROP;
125 109
126 if (!skb) 110 if (!skb)
127 goto out; 111 return NET_RX_DROP;
128
129 err = NET_RX_SUCCESS;
130
131 switch (vlan_gro_common(napi, grp, vlan_tci, skb)) {
132 case -1:
133 return netif_receive_skb(skb);
134
135 case 2:
136 err = NET_RX_DROP;
137 /* fall through */
138
139 case 1:
140 napi_reuse_skb(napi, skb);
141 break;
142 }
143 112
144out: 113 return napi_frags_finish(napi, skb,
145 return err; 114 vlan_gro_common(napi, grp, vlan_tci, skb));
146} 115}
147EXPORT_SYMBOL(vlan_gro_frags); 116EXPORT_SYMBOL(vlan_gro_frags);