include/net/gro.h
Source file repositories/reference/linux-study-clean/include/net/gro.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/gro.h- Extension
.h- Size
- 16714 bytes
- Lines
- 623
- 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
linux/indirect_call_wrapper.hlinux/ip.hlinux/ipv6.hnet/ip6_checksum.hlinux/skbuff.hnet/udp.hnet/hotdata.h
Detected Declarations
struct napi_gro_cbstruct gro_remcsumfunction gro_recursion_inc_testfunction skb_gro_offsetfunction skb_gro_lenfunction skb_gro_pullfunction skb_gro_may_pullfunction skb_gro_receive_network_offsetfunction inet_gro_compute_pseudofunction skb_gro_postpull_rcsumfunction skb_at_gro_remcsum_startfunction __skb_gro_checksum_validate_neededfunction __skb_gro_checksum_validate_completefunction skb_gro_incr_csum_unnecessaryfunction __skb_gro_checksum_convert_checkfunction __skb_gro_checksum_convertfunction skb_gro_remcsum_initfunction skb_gro_remcsum_cleanupfunction skb_gro_flush_finalfunction skb_gro_flush_final_remcsumfunction skb_gro_flush_finalfunction skb_gro_flush_final_remcsumfunction ip6_gro_compute_pseudofunction inet_gro_flushfunction ipv6_gro_flushfunction __gro_receive_network_flushfunction gro_receive_network_flushfunction gro_flushfunction napi_gro_flushfunction gro_normal_listfunction gro_flush_normalfunction gro_normal_onefunction skb_valid_dstfunction skb_valid_dst
Annotated Snippet
struct napi_gro_cb {
union {
struct {
/* Virtual address of skb_shinfo(skb)->frags[0].page + offset. */
void *frag0;
/* Length of frag0. */
unsigned int frag0_len;
};
struct {
/* used in skb_gro_receive() slow path */
struct sk_buff *last;
/* jiffies when first packet was created/queued */
unsigned long age;
};
};
/* This indicates where we are processing relative to skb->data. */
int data_offset;
/* This is non-zero if the packet cannot be merged with the new skb. */
u16 flush;
/* Number of segments aggregated. */
u16 count;
/* Used in ipv6_gro_receive() and foo-over-udp and esp-in-udp */
u16 proto;
u16 pad;
/* Used in napi_gro_cb::free */
#define NAPI_GRO_FREE 1
#define NAPI_GRO_FREE_STOLEN_HEAD 2
/* portion of the cb set to zero at every gro iteration */
struct_group(zeroed,
/* Start offset for remote checksum offload */
u16 gro_remcsum_start;
/* This is non-zero if the packet may be of the same flow. */
u8 same_flow:1;
/* Used in tunnel GRO receive */
u8 encap_mark:1;
/* GRO checksum is valid */
u8 csum_valid:1;
/* Number of checksums via CHECKSUM_UNNECESSARY */
u8 csum_cnt:3;
/* Free the skb? */
u8 free:2;
/* Used in GRE, set in fou/gue_gro_receive */
u8 is_fou:1;
/* Used to determine if ipid_offset can be ignored */
u8 ip_fixedid:2;
/* Number of gro_receive callbacks this packet already went through */
u8 recursion_counter:4;
/* GRO is done by frag_list pointer chaining. */
u8 is_flist:1;
);
/* used to support CHECKSUM_COMPLETE for tunneling protocols */
__wsum csum;
/* L3 offsets */
union {
struct {
u16 network_offset;
u16 inner_network_offset;
};
u16 network_offsets[2];
};
};
#define NAPI_GRO_CB(skb) ((struct napi_gro_cb *)(skb)->cb)
#define GRO_RECURSION_LIMIT 15
static inline int gro_recursion_inc_test(struct sk_buff *skb)
{
return ++NAPI_GRO_CB(skb)->recursion_counter == GRO_RECURSION_LIMIT;
}
Annotation
- Immediate include surface: `linux/indirect_call_wrapper.h`, `linux/ip.h`, `linux/ipv6.h`, `net/ip6_checksum.h`, `linux/skbuff.h`, `net/udp.h`, `net/hotdata.h`.
- Detected declarations: `struct napi_gro_cb`, `struct gro_remcsum`, `function gro_recursion_inc_test`, `function skb_gro_offset`, `function skb_gro_len`, `function skb_gro_pull`, `function skb_gro_may_pull`, `function skb_gro_receive_network_offset`, `function inet_gro_compute_pseudo`, `function skb_gro_postpull_rcsum`.
- 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.