• Stanislav Fomichev's avatar
    bpftool: add push and enqueue commands · 549d4d3d
    Stanislav Fomichev authored
    This is intended to be used with queues and stacks and be more
    user-friendly than 'update' without the key.
    
    Example:
    bpftool map create /sys/fs/bpf/q type queue value 4 entries 10 name q
    bpftool map push pinned /sys/fs/bpf/q value 0 1 2 3
    bpftool map peek pinned /sys/fs/bpf/q
    value: 00 01 02 03
    
    bpftool map create /sys/fs/bpf/s type stack value 4 entries 10 name s
    bpftool map enqueue pinned /sys/fs/bpf/s value 0 1 2 3
    bpftool map peek pinned /sys/fs/bpf/s
    value: 00 01 02 03
    Signed-off-by: default avatarStanislav Fomichev <sdf@google.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    549d4d3d
bpftool-map.rst 8.42 KB