Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux
[linux-2.6.git] / net / ipv6 / exthdrs_offload.c
blobcf77f3abfd061280f6a211deb4a24bcd247c944a
1 /*
2 * IPV6 GSO/GRO offload support
3 * Linux INET6 implementation
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.
10 * IPV6 Extension Header GSO/GRO support
12 #include <net/protocol.h>
13 #include "ip6_offload.h"
15 static const struct net_offload rthdr_offload = {
16 .flags = INET6_PROTO_GSO_EXTHDR,
19 static const struct net_offload dstopt_offload = {
20 .flags = INET6_PROTO_GSO_EXTHDR,
23 int __init ipv6_exthdrs_offload_init(void)
25 int ret;
27 ret = inet6_add_offload(&rthdr_offload, IPPROTO_ROUTING);
28 if (!ret)
29 goto out;
31 ret = inet6_add_offload(&dstopt_offload, IPPROTO_DSTOPTS);
32 if (!ret)
33 goto out_rt;
35 out:
36 return ret;
38 out_rt:
39 inet_del_offload(&rthdr_offload, IPPROTO_ROUTING);
40 goto out;