0001
0002
0003
0004
0005
0006
0007
0008 #include <net/protocol.h>
0009 #include "ip6_offload.h"
0010
0011 static const struct net_offload rthdr_offload = {
0012 .flags = INET6_PROTO_GSO_EXTHDR,
0013 };
0014
0015 static const struct net_offload dstopt_offload = {
0016 .flags = INET6_PROTO_GSO_EXTHDR,
0017 };
0018
0019 int __init ipv6_exthdrs_offload_init(void)
0020 {
0021 int ret;
0022
0023 ret = inet6_add_offload(&rthdr_offload, IPPROTO_ROUTING);
0024 if (ret)
0025 goto out;
0026
0027 ret = inet6_add_offload(&dstopt_offload, IPPROTO_DSTOPTS);
0028 if (ret)
0029 goto out_rt;
0030
0031 out:
0032 return ret;
0033
0034 out_rt:
0035 inet6_del_offload(&rthdr_offload, IPPROTO_ROUTING);
0036 goto out;
0037 }