This source file includes following definitions.
- ipv6_exthdrs_offload_init
1
2
3
4
5
6
7
8 #include <net/protocol.h>
9 #include "ip6_offload.h"
10
11 static const struct net_offload rthdr_offload = {
12 .flags = INET6_PROTO_GSO_EXTHDR,
13 };
14
15 static const struct net_offload dstopt_offload = {
16 .flags = INET6_PROTO_GSO_EXTHDR,
17 };
18
19 int __init ipv6_exthdrs_offload_init(void)
20 {
21 int ret;
22
23 ret = inet6_add_offload(&rthdr_offload, IPPROTO_ROUTING);
24 if (ret)
25 goto out;
26
27 ret = inet6_add_offload(&dstopt_offload, IPPROTO_DSTOPTS);
28 if (ret)
29 goto out_rt;
30
31 out:
32 return ret;
33
34 out_rt:
35 inet6_del_offload(&rthdr_offload, IPPROTO_ROUTING);
36 goto out;
37 }