Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map lookup failure #68

Open
lorenzobracciale opened this issue Jul 22, 2022 · 1 comment
Open

Map lookup failure #68

lorenzobracciale opened this issue Jul 22, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@lorenzobracciale
Copy link
Collaborator

The two last commands on README seem to have problems

python eclat.py --dumpmap /sys/fs/bpf/maps/system/hvm_chain_map

Traceback (most recent call last): File "/opt/eclat-daemon/eclat.py", line 153, in <module> main() File "/opt/eclat-daemon/eclat.py", line 139, in main ret = dump_map(*args['dumpmap']) File "/opt/eclat-daemon/eclat.py", line 100, in dump_map return json.loads(response.message) File "/usr/lib/python3.9/json/__init__.py", line 346, in loads return _default_decoder.decode(s) File "/usr/lib/python3.9/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.9/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 36 column 41 (char 1316)

python eclat.py --lookup /sys/fs/bpf/maps/system/hvm_chain_map 64

(Traceback on eclatd)
Exec: bpftool map update pinned /sys/fs/bpf/maps/hike_default/ip6_simple_classifier/ipv6_simple_classifier_map key hex 0 0 0 0 value hex 1 0 0 40 Exec: bpftool map dump pinned /sys/fs/bpf/maps/system/hvm_chain_map Exec: bpftool map lookup --json pinned /sys/fs/bpf/maps/system/hvm_chain_map key 0x40 0x0 0x0 0x0 Traceback (most recent call last): File "/opt/eclat-daemon/eclatd.py", line 82, in GetMapValue ret = self.controller.get_map_value( File "/opt/eclat-daemon/controller.py", line 162, in get_map_value return cal.bpftool_map_lookup(mapname, int(key)) File "/opt/eclat-daemon/cal.py", line 350, in bpftool_map_lookup raise Exception(f"Map lookup {map_reference} failed.") Exception: Map lookup /sys/fs/bpf/maps/system/hvm_chain_map failed.

@lorenzobracciale lorenzobracciale added the bug Something isn't working label Jul 22, 2022
@lorenzobracciale lorenzobracciale changed the title Map Map lookup failure Jul 22, 2022
@StefanoSalsano
Copy link
Member

there is an error when the info is showing correctly

Traceback (most recent call last):
File "/opt/eclat-daemon/eclat.py", line 252, in
main()
File "/opt/eclat-daemon/eclat.py", line 182, in main
print(f"status: {ret.status}")
AttributeError: 'list' object has no attribute 'status'

29 python eclat.py read-map /sys/fs/bpf/maps/hike_default/monitor/map_pcpu_mon
30 python eclat.py read-map /sys/fs/bpf/maps/hike_default/monitor/map_pcpu_mon --lookup 0
31 python eclat.py read-map /sys/fs/bpf/maps/hike_default/monitor/map_pcpu_mon --lookup 1
32 python eclat.py read-map /sys/fs/bpf/maps/system/hvm_chain_map

to run the testbed
testbed/ddos_double_token_bucket_with_sampler.sh
the go in the SUT window

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants