include/linux/skb_array.h
Source file repositories/reference/linux-study-clean/include/linux/skb_array.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/skb_array.h- Extension
.h- Size
- 5561 bytes
- Lines
- 221
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/ptr_ring.hlinux/skbuff.hlinux/if_vlan.h
Detected Declarations
struct skb_arrayfunction __skb_array_fullfunction skb_array_fullfunction skb_array_producefunction skb_array_produce_irqfunction skb_array_produce_bhfunction skb_array_produce_anyfunction __skb_array_emptyfunction skb_array_emptyfunction skb_array_empty_bhfunction skb_array_empty_irqfunction skb_array_empty_anyfunction skb_array_consume_batchedfunction skb_array_consume_batched_irqfunction skb_array_consume_batched_anyfunction skb_array_consume_batched_bhfunction __skb_array_len_with_tagfunction skb_array_peek_lenfunction skb_array_peek_len_irqfunction skb_array_peek_len_bhfunction skb_array_peek_len_anyfunction skb_array_init_noproffunction __skb_array_destroy_skbfunction skb_array_unconsumefunction skb_array_resizefunction skb_array_resize_multiple_bh_noproffunction alloc_hooks
Annotated Snippet
struct skb_array {
struct ptr_ring ring;
};
/* Might be slightly faster than skb_array_full below, but callers invoking
* this in a loop must use a compiler barrier, for example cpu_relax().
*/
static inline bool __skb_array_full(struct skb_array *a)
{
return __ptr_ring_full(&a->ring);
}
static inline bool skb_array_full(struct skb_array *a)
{
return ptr_ring_full(&a->ring);
}
static inline int skb_array_produce(struct skb_array *a, struct sk_buff *skb)
{
return ptr_ring_produce(&a->ring, skb);
}
static inline int skb_array_produce_irq(struct skb_array *a, struct sk_buff *skb)
{
return ptr_ring_produce_irq(&a->ring, skb);
}
static inline int skb_array_produce_bh(struct skb_array *a, struct sk_buff *skb)
{
return ptr_ring_produce_bh(&a->ring, skb);
}
static inline int skb_array_produce_any(struct skb_array *a, struct sk_buff *skb)
{
return ptr_ring_produce_any(&a->ring, skb);
}
/* Might be slightly faster than skb_array_empty below, but only safe if the
* array is never resized. Also, callers invoking this in a loop must take care
* to use a compiler barrier, for example cpu_relax().
*/
static inline bool __skb_array_empty(struct skb_array *a)
{
return __ptr_ring_empty(&a->ring);
}
static inline struct sk_buff *__skb_array_peek(struct skb_array *a)
{
return __ptr_ring_peek(&a->ring);
}
static inline bool skb_array_empty(struct skb_array *a)
{
return ptr_ring_empty(&a->ring);
}
static inline bool skb_array_empty_bh(struct skb_array *a)
{
return ptr_ring_empty_bh(&a->ring);
}
static inline bool skb_array_empty_irq(struct skb_array *a)
{
return ptr_ring_empty_irq(&a->ring);
}
static inline bool skb_array_empty_any(struct skb_array *a)
{
return ptr_ring_empty_any(&a->ring);
}
static inline struct sk_buff *__skb_array_consume(struct skb_array *a)
{
return __ptr_ring_consume(&a->ring);
}
static inline struct sk_buff *skb_array_consume(struct skb_array *a)
{
return ptr_ring_consume(&a->ring);
}
static inline int skb_array_consume_batched(struct skb_array *a,
struct sk_buff **array, int n)
{
return ptr_ring_consume_batched(&a->ring, (void **)array, n);
}
static inline struct sk_buff *skb_array_consume_irq(struct skb_array *a)
{
return ptr_ring_consume_irq(&a->ring);
Annotation
- Immediate include surface: `linux/ptr_ring.h`, `linux/skbuff.h`, `linux/if_vlan.h`.
- Detected declarations: `struct skb_array`, `function __skb_array_full`, `function skb_array_full`, `function skb_array_produce`, `function skb_array_produce_irq`, `function skb_array_produce_bh`, `function skb_array_produce_any`, `function __skb_array_empty`, `function skb_array_empty`, `function skb_array_empty_bh`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.