blob: 4c519c1dc1612d07dc9467e1eaaf3924653f0769 [file] [log] [blame]
Daniel Borkmannda5bab02013-06-08 12:56:03 +02001/*
2 * IPV4 GSO/GRO offload support
3 * Linux INET implementation
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version
8 * 2 of the License, or (at your option) any later version.
9 *
10 * UDPv4 GSO support
11 */
12
13#include <linux/skbuff.h>
14#include <net/udp.h>
15#include <net/protocol.h>
16
Or Gerlitzb582ef02014-01-20 13:59:19 +020017static DEFINE_SPINLOCK(udp_offload_lock);
Shlomo Pongratza1d0cd82014-01-22 15:23:29 +020018static struct udp_offload_priv __rcu *udp_offload_base __read_mostly;
Or Gerlitzb582ef02014-01-20 13:59:19 +020019
Shlomo Pongratza664a4f2014-02-02 15:42:10 +020020#define udp_deref_protected(X) rcu_dereference_protected(X, lockdep_is_held(&udp_offload_lock))
21
Or Gerlitzb582ef02014-01-20 13:59:19 +020022struct udp_offload_priv {
23 struct udp_offload *offload;
Hannes Frederic Sowa787d7ac2016-01-07 14:28:39 +010024 possible_net_t net;
Or Gerlitzb582ef02014-01-20 13:59:19 +020025 struct rcu_head rcu;
26 struct udp_offload_priv __rcu *next;
27};
28
Tom Herbert8bce6d72014-09-29 20:22:29 -070029static struct sk_buff *__skb_udp_tunnel_segment(struct sk_buff *skb,
30 netdev_features_t features,
31 struct sk_buff *(*gso_inner_segment)(struct sk_buff *skb,
32 netdev_features_t features),
Tom Herbert4bcb8772014-11-04 09:06:52 -080033 __be16 new_protocol, bool is_ipv6)
Tom Herbert155e0102014-07-13 19:49:56 -070034{
35 struct sk_buff *segs = ERR_PTR(-EINVAL);
36 u16 mac_offset = skb->mac_header;
37 int mac_len = skb->mac_len;
38 int tnl_hlen = skb_inner_mac_header(skb) - skb_transport_header(skb);
39 __be16 protocol = skb->protocol;
40 netdev_features_t enc_features;
41 int udp_offset, outer_hlen;
42 unsigned int oldlen;
Tom Herbert4bcb8772014-11-04 09:06:52 -080043 bool need_csum = !!(skb_shinfo(skb)->gso_type &
44 SKB_GSO_UDP_TUNNEL_CSUM);
Tom Herberte585f232014-11-04 09:06:54 -080045 bool remcsum = !!(skb_shinfo(skb)->gso_type & SKB_GSO_TUNNEL_REMCSUM);
46 bool offload_csum = false, dont_encap = (need_csum || remcsum);
Tom Herbert155e0102014-07-13 19:49:56 -070047
48 oldlen = (u16)~skb->len;
49
50 if (unlikely(!pskb_may_pull(skb, tnl_hlen)))
51 goto out;
52
53 skb->encapsulation = 0;
54 __skb_pull(skb, tnl_hlen);
55 skb_reset_mac_header(skb);
56 skb_set_network_header(skb, skb_inner_network_offset(skb));
57 skb->mac_len = skb_inner_network_offset(skb);
Tom Herbert8bce6d72014-09-29 20:22:29 -070058 skb->protocol = new_protocol;
Tom Herbert4bcb8772014-11-04 09:06:52 -080059 skb->encap_hdr_csum = need_csum;
Tom Herberte585f232014-11-04 09:06:54 -080060 skb->remcsum_offload = remcsum;
Tom Herbert155e0102014-07-13 19:49:56 -070061
Tom Herbert4bcb8772014-11-04 09:06:52 -080062 /* Try to offload checksum if possible */
63 offload_csum = !!(need_csum &&
Tom Herbertc8cd0982015-12-14 11:19:44 -080064 ((skb->dev->features & NETIF_F_HW_CSUM) ||
65 (skb->dev->features & (is_ipv6 ?
66 NETIF_F_IPV6_CSUM : NETIF_F_IP_CSUM))));
Tom Herbert155e0102014-07-13 19:49:56 -070067
68 /* segment inner packet. */
Florian Westphal1e16aa32014-10-20 13:49:16 +020069 enc_features = skb->dev->hw_enc_features & features;
Tom Herbert8bce6d72014-09-29 20:22:29 -070070 segs = gso_inner_segment(skb, enc_features);
Himangi Saraogi27446442014-07-27 12:38:38 +053071 if (IS_ERR_OR_NULL(segs)) {
Tom Herbert155e0102014-07-13 19:49:56 -070072 skb_gso_error_unwind(skb, protocol, tnl_hlen, mac_offset,
73 mac_len);
74 goto out;
75 }
76
77 outer_hlen = skb_tnl_header_len(skb);
78 udp_offset = outer_hlen - tnl_hlen;
79 skb = segs;
80 do {
81 struct udphdr *uh;
82 int len;
Tom Herbert4bcb8772014-11-04 09:06:52 -080083 __be32 delta;
Tom Herbert155e0102014-07-13 19:49:56 -070084
Tom Herbert4bcb8772014-11-04 09:06:52 -080085 if (dont_encap) {
86 skb->encapsulation = 0;
87 skb->ip_summed = CHECKSUM_NONE;
88 } else {
89 /* Only set up inner headers if we might be offloading
90 * inner checksum.
91 */
92 skb_reset_inner_headers(skb);
93 skb->encapsulation = 1;
94 }
Tom Herbert155e0102014-07-13 19:49:56 -070095
96 skb->mac_len = mac_len;
Tom Herbert4bcb8772014-11-04 09:06:52 -080097 skb->protocol = protocol;
Tom Herbert155e0102014-07-13 19:49:56 -070098
99 skb_push(skb, outer_hlen);
100 skb_reset_mac_header(skb);
101 skb_set_network_header(skb, mac_len);
102 skb_set_transport_header(skb, udp_offset);
103 len = skb->len - udp_offset;
104 uh = udp_hdr(skb);
105 uh->len = htons(len);
106
Tom Herbert4bcb8772014-11-04 09:06:52 -0800107 if (!need_csum)
108 continue;
Tom Herbert155e0102014-07-13 19:49:56 -0700109
Tom Herbert4bcb8772014-11-04 09:06:52 -0800110 delta = htonl(oldlen + len);
111
112 uh->check = ~csum_fold((__force __wsum)
113 ((__force u32)uh->check +
114 (__force u32)delta));
Tom Herbert4bcb8772014-11-04 09:06:52 -0800115 if (offload_csum) {
116 skb->ip_summed = CHECKSUM_PARTIAL;
117 skb->csum_start = skb_transport_header(skb) - skb->head;
118 skb->csum_offset = offsetof(struct udphdr, check);
Tom Herberte585f232014-11-04 09:06:54 -0800119 } else if (remcsum) {
120 /* Need to calculate checksum from scratch,
121 * inner checksums are never when doing
122 * remote_checksum_offload.
123 */
124
125 skb->csum = skb_checksum(skb, udp_offset,
126 skb->len - udp_offset,
127 0);
128 uh->check = csum_fold(skb->csum);
129 if (uh->check == 0)
130 uh->check = CSUM_MANGLED_0;
Tom Herbert4bcb8772014-11-04 09:06:52 -0800131 } else {
Tom Herbert155e0102014-07-13 19:49:56 -0700132 uh->check = gso_make_checksum(skb, ~uh->check);
133
134 if (uh->check == 0)
135 uh->check = CSUM_MANGLED_0;
136 }
Tom Herbert155e0102014-07-13 19:49:56 -0700137 } while ((skb = skb->next));
138out:
139 return segs;
140}
141
Tom Herbert8bce6d72014-09-29 20:22:29 -0700142struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb,
143 netdev_features_t features,
144 bool is_ipv6)
145{
146 __be16 protocol = skb->protocol;
147 const struct net_offload **offloads;
148 const struct net_offload *ops;
149 struct sk_buff *segs = ERR_PTR(-EINVAL);
150 struct sk_buff *(*gso_inner_segment)(struct sk_buff *skb,
151 netdev_features_t features);
152
153 rcu_read_lock();
154
155 switch (skb->inner_protocol_type) {
156 case ENCAP_TYPE_ETHER:
157 protocol = skb->inner_protocol;
158 gso_inner_segment = skb_mac_gso_segment;
159 break;
160 case ENCAP_TYPE_IPPROTO:
161 offloads = is_ipv6 ? inet6_offloads : inet_offloads;
162 ops = rcu_dereference(offloads[skb->inner_ipproto]);
163 if (!ops || !ops->callbacks.gso_segment)
164 goto out_unlock;
165 gso_inner_segment = ops->callbacks.gso_segment;
166 break;
167 default:
168 goto out_unlock;
169 }
170
171 segs = __skb_udp_tunnel_segment(skb, features, gso_inner_segment,
Tom Herbert4bcb8772014-11-04 09:06:52 -0800172 protocol, is_ipv6);
Tom Herbert8bce6d72014-09-29 20:22:29 -0700173
174out_unlock:
175 rcu_read_unlock();
176
177 return segs;
178}
179
Daniel Borkmannda5bab02013-06-08 12:56:03 +0200180static struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb,
181 netdev_features_t features)
182{
183 struct sk_buff *segs = ERR_PTR(-EINVAL);
184 unsigned int mss;
Wei-Chun Chao7a7ffba2013-12-26 13:10:22 -0800185 __wsum csum;
Tom Herbertf71470b2014-09-20 14:52:29 -0700186 struct udphdr *uh;
187 struct iphdr *iph;
Wei-Chun Chao7a7ffba2013-12-26 13:10:22 -0800188
189 if (skb->encapsulation &&
Tom Herbert0f4f4ff2014-06-04 17:20:16 -0700190 (skb_shinfo(skb)->gso_type &
191 (SKB_GSO_UDP_TUNNEL|SKB_GSO_UDP_TUNNEL_CSUM))) {
Tom Herbert8bce6d72014-09-29 20:22:29 -0700192 segs = skb_udp_tunnel_segment(skb, features, false);
Wei-Chun Chao7a7ffba2013-12-26 13:10:22 -0800193 goto out;
194 }
Daniel Borkmannda5bab02013-06-08 12:56:03 +0200195
Tom Herbertf71470b2014-09-20 14:52:29 -0700196 if (!pskb_may_pull(skb, sizeof(struct udphdr)))
197 goto out;
198
Daniel Borkmannda5bab02013-06-08 12:56:03 +0200199 mss = skb_shinfo(skb)->gso_size;
200 if (unlikely(skb->len <= mss))
201 goto out;
202
203 if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST)) {
204 /* Packet is from an untrusted source, reset gso_segs. */
205 int type = skb_shinfo(skb)->gso_type;
206
207 if (unlikely(type & ~(SKB_GSO_UDP | SKB_GSO_DODGY |
208 SKB_GSO_UDP_TUNNEL |
Tom Herbert0f4f4ff2014-06-04 17:20:16 -0700209 SKB_GSO_UDP_TUNNEL_CSUM |
Tom Herberte585f232014-11-04 09:06:54 -0800210 SKB_GSO_TUNNEL_REMCSUM |
Eric Dumazetcb32f512013-10-19 11:42:57 -0700211 SKB_GSO_IPIP |
Pravin B Shelar59b93b42014-11-05 15:27:48 -0800212 SKB_GSO_GRE | SKB_GSO_GRE_CSUM) ||
Daniel Borkmannda5bab02013-06-08 12:56:03 +0200213 !(type & (SKB_GSO_UDP))))
214 goto out;
215
216 skb_shinfo(skb)->gso_segs = DIV_ROUND_UP(skb->len, mss);
217
218 segs = NULL;
219 goto out;
220 }
221
Wei-Chun Chao7a7ffba2013-12-26 13:10:22 -0800222 /* Do software UFO. Complete and fill in the UDP checksum as
223 * HW cannot do checksum of UDP packets sent as multiple
224 * IP fragments.
225 */
Tom Herbertf71470b2014-09-20 14:52:29 -0700226
227 uh = udp_hdr(skb);
228 iph = ip_hdr(skb);
229
230 uh->check = 0;
231 csum = skb_checksum(skb, 0, skb->len, 0);
232 uh->check = udp_v4_check(skb->len, iph->saddr, iph->daddr, csum);
233 if (uh->check == 0)
234 uh->check = CSUM_MANGLED_0;
235
Wei-Chun Chao7a7ffba2013-12-26 13:10:22 -0800236 skb->ip_summed = CHECKSUM_NONE;
237
Daniel Borkmannda5bab02013-06-08 12:56:03 +0200238 /* Fragment the skb. IP headers of the fragments are updated in
239 * inet_gso_segment()
240 */
Wei-Chun Chao7a7ffba2013-12-26 13:10:22 -0800241 segs = skb_segment(skb, features);
Daniel Borkmannda5bab02013-06-08 12:56:03 +0200242out:
243 return segs;
244}
245
Hannes Frederic Sowa787d7ac2016-01-07 14:28:39 +0100246int udp_add_offload(struct net *net, struct udp_offload *uo)
Or Gerlitzb582ef02014-01-20 13:59:19 +0200247{
Or Gerlitzb5aaab12014-01-29 18:08:59 +0200248 struct udp_offload_priv *new_offload = kzalloc(sizeof(*new_offload), GFP_ATOMIC);
Or Gerlitzb582ef02014-01-20 13:59:19 +0200249
250 if (!new_offload)
251 return -ENOMEM;
252
Hannes Frederic Sowa787d7ac2016-01-07 14:28:39 +0100253 write_pnet(&new_offload->net, net);
Or Gerlitzb582ef02014-01-20 13:59:19 +0200254 new_offload->offload = uo;
255
256 spin_lock(&udp_offload_lock);
Shlomo Pongratza664a4f2014-02-02 15:42:10 +0200257 new_offload->next = udp_offload_base;
258 rcu_assign_pointer(udp_offload_base, new_offload);
Or Gerlitzb582ef02014-01-20 13:59:19 +0200259 spin_unlock(&udp_offload_lock);
260
261 return 0;
262}
263EXPORT_SYMBOL(udp_add_offload);
264
265static void udp_offload_free_routine(struct rcu_head *head)
266{
267 struct udp_offload_priv *ou_priv = container_of(head, struct udp_offload_priv, rcu);
268 kfree(ou_priv);
269}
270
271void udp_del_offload(struct udp_offload *uo)
272{
273 struct udp_offload_priv __rcu **head = &udp_offload_base;
274 struct udp_offload_priv *uo_priv;
275
276 spin_lock(&udp_offload_lock);
277
Shlomo Pongratza664a4f2014-02-02 15:42:10 +0200278 uo_priv = udp_deref_protected(*head);
Or Gerlitzb582ef02014-01-20 13:59:19 +0200279 for (; uo_priv != NULL;
Shlomo Pongratza664a4f2014-02-02 15:42:10 +0200280 uo_priv = udp_deref_protected(*head)) {
Or Gerlitzb582ef02014-01-20 13:59:19 +0200281 if (uo_priv->offload == uo) {
Shlomo Pongratza664a4f2014-02-02 15:42:10 +0200282 rcu_assign_pointer(*head,
283 udp_deref_protected(uo_priv->next));
Or Gerlitzb582ef02014-01-20 13:59:19 +0200284 goto unlock;
285 }
286 head = &uo_priv->next;
287 }
Shlomo Pongratza1d0cd82014-01-22 15:23:29 +0200288 pr_warn("udp_del_offload: didn't find offload for port %d\n", ntohs(uo->port));
Or Gerlitzb582ef02014-01-20 13:59:19 +0200289unlock:
290 spin_unlock(&udp_offload_lock);
Ian Morris00db4122015-04-03 09:17:27 +0100291 if (uo_priv)
Or Gerlitzb582ef02014-01-20 13:59:19 +0200292 call_rcu(&uo_priv->rcu, udp_offload_free_routine);
293}
294EXPORT_SYMBOL(udp_del_offload);
295
Tom Herbert57c67ff2014-08-22 13:34:44 -0700296struct sk_buff **udp_gro_receive(struct sk_buff **head, struct sk_buff *skb,
297 struct udphdr *uh)
Or Gerlitzb582ef02014-01-20 13:59:19 +0200298{
299 struct udp_offload_priv *uo_priv;
300 struct sk_buff *p, **pp = NULL;
Tom Herbert57c67ff2014-08-22 13:34:44 -0700301 struct udphdr *uh2;
302 unsigned int off = skb_gro_offset(skb);
Or Gerlitzb582ef02014-01-20 13:59:19 +0200303 int flush = 1;
304
305 if (NAPI_GRO_CB(skb)->udp_mark ||
Tom Herbert662880f2014-08-27 21:26:56 -0700306 (skb->ip_summed != CHECKSUM_PARTIAL &&
307 NAPI_GRO_CB(skb)->csum_cnt == 0 &&
308 !NAPI_GRO_CB(skb)->csum_valid))
Or Gerlitzb582ef02014-01-20 13:59:19 +0200309 goto out;
310
311 /* mark that this skb passed once through the udp gro layer */
312 NAPI_GRO_CB(skb)->udp_mark = 1;
Or Gerlitzb582ef02014-01-20 13:59:19 +0200313
314 rcu_read_lock();
315 uo_priv = rcu_dereference(udp_offload_base);
316 for (; uo_priv != NULL; uo_priv = rcu_dereference(uo_priv->next)) {
Hannes Frederic Sowa787d7ac2016-01-07 14:28:39 +0100317 if (net_eq(read_pnet(&uo_priv->net), dev_net(skb->dev)) &&
318 uo_priv->offload->port == uh->dest &&
Or Gerlitzb582ef02014-01-20 13:59:19 +0200319 uo_priv->offload->callbacks.gro_receive)
320 goto unflush;
321 }
322 goto out_unlock;
323
324unflush:
325 flush = 0;
326
327 for (p = *head; p; p = p->next) {
328 if (!NAPI_GRO_CB(p)->same_flow)
329 continue;
330
331 uh2 = (struct udphdr *)(p->data + off);
Tom Herbert57c67ff2014-08-22 13:34:44 -0700332
333 /* Match ports and either checksums are either both zero
334 * or nonzero.
335 */
336 if ((*(u32 *)&uh->source != *(u32 *)&uh2->source) ||
337 (!uh->check ^ !uh2->check)) {
Or Gerlitzb582ef02014-01-20 13:59:19 +0200338 NAPI_GRO_CB(p)->same_flow = 0;
339 continue;
340 }
341 }
342
343 skb_gro_pull(skb, sizeof(struct udphdr)); /* pull encapsulating udp header */
Tom Herbert6bae1d42014-06-10 18:54:26 -0700344 skb_gro_postpull_rcsum(skb, uh, sizeof(struct udphdr));
Tom Herbertafe93322014-09-17 12:25:57 -0700345 NAPI_GRO_CB(skb)->proto = uo_priv->offload->ipproto;
Tom Herberta2b12f32015-01-12 17:00:37 -0800346 pp = uo_priv->offload->callbacks.gro_receive(head, skb,
347 uo_priv->offload);
Or Gerlitzb582ef02014-01-20 13:59:19 +0200348
349out_unlock:
350 rcu_read_unlock();
351out:
352 NAPI_GRO_CB(skb)->flush |= flush;
353 return pp;
354}
355
Tom Herbert57c67ff2014-08-22 13:34:44 -0700356static struct sk_buff **udp4_gro_receive(struct sk_buff **head,
357 struct sk_buff *skb)
358{
359 struct udphdr *uh = udp_gro_udphdr(skb);
360
Tom Herbert2abb7cd2014-08-31 15:12:43 -0700361 if (unlikely(!uh))
362 goto flush;
Tom Herbert57c67ff2014-08-22 13:34:44 -0700363
Tom Herbert2abb7cd2014-08-31 15:12:43 -0700364 /* Don't bother verifying checksum if we're going to flush anyway. */
Scott Wood2d8f7e22014-09-10 21:23:18 -0500365 if (NAPI_GRO_CB(skb)->flush)
Tom Herbert2abb7cd2014-08-31 15:12:43 -0700366 goto skip;
367
368 if (skb_gro_checksum_validate_zero_check(skb, IPPROTO_UDP, uh->check,
369 inet_gro_compute_pseudo))
370 goto flush;
371 else if (uh->check)
372 skb_gro_checksum_try_convert(skb, IPPROTO_UDP, uh->check,
373 inet_gro_compute_pseudo);
374skip:
Tom Herbertefc98d02014-10-03 15:48:08 -0700375 NAPI_GRO_CB(skb)->is_ipv6 = 0;
Tom Herbert57c67ff2014-08-22 13:34:44 -0700376 return udp_gro_receive(head, skb, uh);
Tom Herbert2abb7cd2014-08-31 15:12:43 -0700377
378flush:
379 NAPI_GRO_CB(skb)->flush = 1;
380 return NULL;
Tom Herbert57c67ff2014-08-22 13:34:44 -0700381}
382
383int udp_gro_complete(struct sk_buff *skb, int nhoff)
Or Gerlitzb582ef02014-01-20 13:59:19 +0200384{
385 struct udp_offload_priv *uo_priv;
386 __be16 newlen = htons(skb->len - nhoff);
387 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff);
388 int err = -ENOSYS;
389
390 uh->len = newlen;
391
392 rcu_read_lock();
393
394 uo_priv = rcu_dereference(udp_offload_base);
395 for (; uo_priv != NULL; uo_priv = rcu_dereference(uo_priv->next)) {
Hannes Frederic Sowa787d7ac2016-01-07 14:28:39 +0100396 if (net_eq(read_pnet(&uo_priv->net), dev_net(skb->dev)) &&
397 uo_priv->offload->port == uh->dest &&
Or Gerlitzb582ef02014-01-20 13:59:19 +0200398 uo_priv->offload->callbacks.gro_complete)
399 break;
400 }
401
Ian Morris00db4122015-04-03 09:17:27 +0100402 if (uo_priv) {
Tom Herbertafe93322014-09-17 12:25:57 -0700403 NAPI_GRO_CB(skb)->proto = uo_priv->offload->ipproto;
Tom Herberta2b12f32015-01-12 17:00:37 -0800404 err = uo_priv->offload->callbacks.gro_complete(skb,
405 nhoff + sizeof(struct udphdr),
406 uo_priv->offload);
Tom Herbertafe93322014-09-17 12:25:57 -0700407 }
Or Gerlitzb582ef02014-01-20 13:59:19 +0200408
409 rcu_read_unlock();
Tom Herbert6db93ea2015-02-10 16:30:29 -0800410
411 if (skb->remcsum_offload)
412 skb_shinfo(skb)->gso_type |= SKB_GSO_TUNNEL_REMCSUM;
413
414 skb->encapsulation = 1;
415 skb_set_inner_mac_header(skb, nhoff + sizeof(struct udphdr));
416
Or Gerlitzb582ef02014-01-20 13:59:19 +0200417 return err;
418}
419
Eric Dumazet72bb17b2014-09-09 08:29:12 -0700420static int udp4_gro_complete(struct sk_buff *skb, int nhoff)
Tom Herbert57c67ff2014-08-22 13:34:44 -0700421{
422 const struct iphdr *iph = ip_hdr(skb);
423 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff);
424
Tom Herbert6db93ea2015-02-10 16:30:29 -0800425 if (uh->check) {
426 skb_shinfo(skb)->gso_type |= SKB_GSO_UDP_TUNNEL_CSUM;
Tom Herbert57c67ff2014-08-22 13:34:44 -0700427 uh->check = ~udp_v4_check(skb->len - nhoff, iph->saddr,
428 iph->daddr, 0);
Tom Herbert6db93ea2015-02-10 16:30:29 -0800429 } else {
430 skb_shinfo(skb)->gso_type |= SKB_GSO_UDP_TUNNEL;
431 }
Tom Herbert57c67ff2014-08-22 13:34:44 -0700432
433 return udp_gro_complete(skb, nhoff);
434}
435
Daniel Borkmannda5bab02013-06-08 12:56:03 +0200436static const struct net_offload udpv4_offload = {
437 .callbacks = {
Daniel Borkmannda5bab02013-06-08 12:56:03 +0200438 .gso_segment = udp4_ufo_fragment,
Tom Herbert57c67ff2014-08-22 13:34:44 -0700439 .gro_receive = udp4_gro_receive,
440 .gro_complete = udp4_gro_complete,
Daniel Borkmannda5bab02013-06-08 12:56:03 +0200441 },
442};
443
444int __init udpv4_offload_init(void)
445{
446 return inet_add_offload(&udpv4_offload, IPPROTO_UDP);
447}