• Andreas Gerstmayr's avatar
    tcptop: fix display of received bytes, reduce syscalls (fixes #1871) · c64f4872
    Andreas Gerstmayr authored
    the keys variable was a reference to ipv4_recv_bytes, and after merging
    the keys of ipv4_send_bytes the original ipv4_recv_bytes BPF table also
    contained all keys, therefore the `if k in ipv4_recv_bytes` check a few
    lines below always evaluates to true
    
    with this commit all BPF tables are copied to userspace as dicts once
    (to reduce the number of syscalls) and the keys are merged in a new dict
    c64f4872
tcptop.py 9.6 KB