]> asedeno.scripts.mit.edu Git - linux.git/commit
samples/bpf: load_bpf.c make callback fixup more flexible
authorJesper Dangaard Brouer <brouer@redhat.com>
Tue, 2 May 2017 12:32:01 +0000 (14:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 May 2017 13:30:24 +0000 (09:30 -0400)
commit6979bcc731f9680824a85a9efc43f36d01cec1b2
tree930220b0624efcd0c0b94e4c3dbaabf85202fc72
parent156450d9d964447adfb44a231c634d2f5609d110
samples/bpf: load_bpf.c make callback fixup more flexible

Do this change before others start to use this callback.
Change map_perf_test_user.c which seems to be the only user.

This patch extends capabilities of commit 9fd63d05f3e8 ("bpf:
Allow bpf sample programs (*_user.c) to change bpf_map_def").

Give fixup callback access to struct bpf_map_data, instead of
only stuct bpf_map_def.  This add flexibility to allow userspace
to reassign the map file descriptor.  This is very useful when
wanting to share maps between several bpf programs.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
samples/bpf/bpf_load.c
samples/bpf/bpf_load.h
samples/bpf/map_perf_test_user.c