Comments (8)
assign netns ID to an existing netns to facilitate your proposed debugging?
By reading the kernel source code net_namespace/peernet2id, netnsid is not retrieved from struct net
neither struct ns_common
.
inode is a good way to identify an net namespace. In kernel space, inode is the unsigned int inum
field of struct ns_common
. In user space, inode is the inode of the net namespace file, wherever the file is, like /proc/<pid>/ns/net
, /var/run/docker/netns/<netns name>
.
For example:
log of pwru: 0xffff8f26c23d4500 [isc-worker0000] neigh_resolve_output 3355665098061 netns=4026531992 mark=0x0 ifindex=2 proto=8 mtu=1500 len=62
inode of netns file: got netns: NS(4:4026531992)
(Go code to get inode: ns.UniqueID)
from pwru.
/assign @duanjiong
from pwru.
@duanjiong What would you use to identify netns from both user and kernel space?
from pwru.
I haven't seriously considered this question, just for the record first
from pwru.
@duanjiong What would you use to identify netns from both user and kernel space?
Most net namespaces should have a netnsid to match against. If not, can we consider using the net namespace's memory address to match? Or can we use inode?
from pwru.
I'm wondering whether you can assign netns ID to an existing netns to facilitate your proposed debugging? If yes, then netns ID seems to be a good candidate.
from pwru.
@Asphaltt Thanks! Using the inode makes sense to me. Would you like to work on this?
from pwru.
Fixed by #34.
from pwru.
Related Issues (20)
- IPv6 filtering is broken
- Release script fails to create group HOT 1
- Add large GHA runner to replace self-hosted
- How to uninstall all probes after a ssh disconnection? HOT 1
- IPv6 L4 Protocol HOT 1
- Enable kprobe-multi backend for kernel modules tracing (--kmods)
- Add datetime to the output HOT 2
- a few minutes delay to complete the pwru multi kprobe attachment HOT 16
- IPv6 filter-src-ip/filter-dst-ip does not filter packets HOT 2
- no BTF found for kernel HOT 2
- pwru fails to run if compiled on machine with more CPUs than target HOT 2
- Long start time on bpf-next (6.4-rc3) HOT 5
- Track SKB clones HOT 6
- Failed to --output-skb on Ubuntu 23.04 HOT 4
- kprobe_pwru.c:set_tuple() reads wrong L4 for ESP on some kprobes HOT 2
- "make release" fails: ln: failed to create symbolic link './clang': File exists
- release.yaml: Cross compile libpcap.a for arm64
- Update vendored cilium/ebpf
- Use clang for libpcap and CGO compilation HOT 5
- Can this watch arp request? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pwru.