]> git.baikalelectronics.ru Git - kernel.git/commit
samples: bpf: improve xdp1 example
authorMatteo Croce <mcroce@redhat.com>
Sat, 1 Dec 2018 00:23:05 +0000 (01:23 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 1 Dec 2018 06:06:41 +0000 (22:06 -0800)
commitcb9864a72d5c26a25cb8eb52e0d24fc172e5a460
tree23e38205c206765e3920061f596c2e9bd241860f
parent54122a9a8db55f3e3187ccf297742f7b8fdc18a5
samples: bpf: improve xdp1 example

Store only the total packet count for every protocol, instead of the
whole per-cpu array.
Use bpf_map_get_next_key() to iterate the map, instead of looking up
all the protocols.

Signed-off-by: Matteo Croce <mcroce@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
samples/bpf/xdp1_user.c