tools/testing/selftests/bpf/progs/bpf_qdisc_common.h

Source file repositories/reference/linux-study-clean/tools/testing/selftests/bpf/progs/bpf_qdisc_common.h

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/bpf/progs/bpf_qdisc_common.h
Extension
.h
Size
675 bytes
Lines
28
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: implementation source
Status
source implementation candidate

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _BPF_QDISC_COMMON_H
#define _BPF_QDISC_COMMON_H

#define NET_XMIT_SUCCESS        0x00
#define NET_XMIT_DROP           0x01    /* skb dropped                  */
#define NET_XMIT_CN             0x02    /* congestion notification      */

#define TC_PRIO_CONTROL  7
#define TC_PRIO_MAX      15

#define private(name) SEC(".data." #name) __hidden __attribute__((aligned(8)))

struct bpf_sk_buff_ptr;

static struct qdisc_skb_cb *qdisc_skb_cb(const struct sk_buff *skb)
{
	return (struct qdisc_skb_cb *)skb->cb;
}

static inline unsigned int qdisc_pkt_len(const struct sk_buff *skb)
{
	return qdisc_skb_cb(skb)->pkt_len;
}

#endif

Annotation

Implementation Notes