iovisor / bcc

BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more
Apache License 2.0
20.56k stars 3.88k forks source link

what is the relationship between sk_buff and __sk_buff? #1209

Open suokun opened 7 years ago

suokun commented 7 years ago

what is the relationship between sk_buff in the kernel source code and __sk_buff in bcc?

pchaigno commented 7 years ago

__sk_buff is a user accessible mirror of sk_buff. The eBPF verifier in the kernel translates accesses to __sk_buff into accesses for sk_buff. You can find more information here: https://lwn.net/Articles/636647/.