BPF_TABLE_PINNED doesn't work
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
Hello, I encountered an problem when using BPF_TABLE_PINNED. Has this been fixed in latest version? Thanks!
bcc version
```
bcc-tools-0.16.0-3.el8.x86_64
bcc-0.16.0-3.el8.x86_64
python3-bcc-0.16.0-3.el8.x86_64
```
```
# python3 -c "import bcc; bcc.BPF(text='BPF_TABLE_PINNED(\"hash\", u64, u64, test, 1024, \"/sys/fs/bpf/test\");')"
/virtual/main.c:1:1: error: map not found: /sys/fs/bpf/test
BPF_TABLE_PINNED("hash", u64, u64, test, 1024, "/sys/fs/bpf/test");
^
/virtual/include/bcc/helpers.h:160:92: note: expanded from macro 'BPF_TABLE_PINNED'
#define BPF_TABLE_PINNED(_table_type, _key_type, _leaf_type, _name, _max_entries, _pinned) \
^
/virtual/include/bcc/helpers.h:157:76: note: expanded from macro '\
BPF_TABLE'
#define BPF_TABLE(_table_type, _key_type, _leaf_type, _name, _max_entries) \
^
/virtual/include/bcc/helpers.h:107:4: note: expanded from macro '\
BPF_F_TABLE'
}; \
^
1 error generated.
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.6/site-packages/bcc/__init__.py", line 364, in __init__
raise Exception("Failed to compile BPF module %s" % (src_file or ""))
Exception: Failed to compile BPF module
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.