net/ipv6/exthdrs_offload.c
Source file repositories/reference/linux-study-clean/net/ipv6/exthdrs_offload.c
File Facts
- System
- Linux kernel
- Corpus path
net/ipv6/exthdrs_offload.c- Extension
.c- Size
- 954 bytes
- Lines
- 49
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: implementation source
- Status
- source implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
net/protocol.hip6_offload.h
Detected Declarations
function ipv6_exthdrs_offload_init
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* IPV6 GSO/GRO offload support
* Linux INET6 implementation
*
* IPV6 Extension Header GSO/GRO support
*/
#include <net/protocol.h>
#include "ip6_offload.h"
static const struct net_offload rthdr_offload = {
.flags = INET6_PROTO_GSO_EXTHDR,
};
static const struct net_offload dstopt_offload = {
.flags = INET6_PROTO_GSO_EXTHDR,
};
static const struct net_offload hbh_offload = {
.flags = INET6_PROTO_GSO_EXTHDR,
};
int __init ipv6_exthdrs_offload_init(void)
{
int ret;
ret = inet6_add_offload(&rthdr_offload, IPPROTO_ROUTING);
if (ret)
goto out;
ret = inet6_add_offload(&dstopt_offload, IPPROTO_DSTOPTS);
if (ret)
goto out_rt;
ret = inet6_add_offload(&hbh_offload, IPPROTO_HOPOPTS);
if (ret)
goto out_dstopts;
out:
return ret;
out_dstopts:
inet6_del_offload(&dstopt_offload, IPPROTO_DSTOPTS);
out_rt:
inet6_del_offload(&rthdr_offload, IPPROTO_ROUTING);
goto out;
}
Annotation
- Immediate include surface: `net/protocol.h`, `ip6_offload.h`.
- Detected declarations: `function ipv6_exthdrs_offload_init`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.