Linux Audio

Check our new training course

Loading...
v3.15
 
 1/*
 2 *	IPV6 GSO/GRO offload support
 3 *	Linux INET6 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 *      IPV6 Extension Header GSO/GRO support
11 */
12#include <net/protocol.h>
13#include "ip6_offload.h"
14
15static const struct net_offload rthdr_offload = {
16	.flags		=	INET6_PROTO_GSO_EXTHDR,
17};
18
19static const struct net_offload dstopt_offload = {
20	.flags		=	INET6_PROTO_GSO_EXTHDR,
21};
22
23int __init ipv6_exthdrs_offload_init(void)
24{
25	int ret;
26
27	ret = inet6_add_offload(&rthdr_offload, IPPROTO_ROUTING);
28	if (ret)
29		goto out;
30
31	ret = inet6_add_offload(&dstopt_offload, IPPROTO_DSTOPTS);
32	if (ret)
33		goto out_rt;
34
35out:
36	return ret;
37
38out_rt:
39	inet_del_offload(&rthdr_offload, IPPROTO_ROUTING);
40	goto out;
41}
v6.2
 1// SPDX-License-Identifier: GPL-2.0-or-later
 2/*
 3 *	IPV6 GSO/GRO offload support
 4 *	Linux INET6 implementation
 5 *
 
 
 
 
 
 6 *      IPV6 Extension Header GSO/GRO support
 7 */
 8#include <net/protocol.h>
 9#include "ip6_offload.h"
10
11static const struct net_offload rthdr_offload = {
12	.flags		=	INET6_PROTO_GSO_EXTHDR,
13};
14
15static const struct net_offload dstopt_offload = {
16	.flags		=	INET6_PROTO_GSO_EXTHDR,
17};
18
19int __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
31out:
32	return ret;
33
34out_rt:
35	inet6_del_offload(&rthdr_offload, IPPROTO_ROUTING);
36	goto out;
37}