linux/samples
John Fastabend 464bc0fd62 bpf: convert sockmap field attach_bpf_fd2 to type
In the initial sockmap API we provided strparser and verdict programs
using a single attach command by extending the attach API with a the
attach_bpf_fd2 field.

However, if we add other programs in the future we will be adding a
field for every new possible type, attach_bpf_fd(3,4,..). This
seems a bit clumsy for an API. So lets push the programs using two
new type fields.

   BPF_SK_SKB_STREAM_PARSER
   BPF_SK_SKB_STREAM_VERDICT

This has the advantage of having a readable name and can easily be
extended in the future.

Updates to samples and sockmap included here also generalize tests
slightly to support upcoming patch for multiple map support.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Fixes: 174a79ff95 ("bpf: sockmap with sk redirect support")
Suggested-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-28 11:13:21 -07:00
..
auxdisplay samples: move auxdisplay example code from Documentation 2016-09-23 11:52:32 -06:00
blackfin samples: move blackfin gptimers-example from Documentation 2016-10-10 07:12:02 -06:00
bpf bpf: Allow numa selection in INNER_LRU_HASH_PREALLOC test of map_perf_test 2017-08-19 21:35:43 -07:00
configfs configfs: remove old API 2015-10-13 22:17:57 -07:00
connector make use of make variable CURDIR instead of calling pwd 2016-12-11 12:12:56 +01:00
hidraw HID: samples/hidraw: make it possible to select device 2015-03-15 10:11:21 -04:00
hw_breakpoint perf: Add context field to perf_event 2011-07-01 11:06:38 +02:00
kdb kdb: Add kdb kernel module sample 2010-10-29 13:14:39 -05:00
kfifo kfifo: clean up example to not use page_link 2017-07-12 16:26:01 -07:00
kobject samples/kobject: be explicit in the module license 2015-03-25 13:41:42 +01:00
kprobes samples/kretprobe: fix the wrong type 2016-08-04 08:50:07 -04:00
livepatch livepatch: allow removal of a disabled patch 2017-03-08 09:38:43 +01:00
mei mei: drop the TODO from samples 2017-04-26 11:38:56 +02:00
mic/mpssd samples: move mic/mpssd example code from Documentation 2016-09-20 12:38:48 -06:00
pktgen pktgen: Specify the index of first thread 2017-06-16 12:32:34 -04:00
rpmsg rpmsg: Allow callback to return errors 2016-09-08 22:15:25 -07:00
seccomp samples/seccomp: fix 64-bit comparison macros 2017-01-09 17:22:03 +11:00
sockmap bpf: convert sockmap field attach_bpf_fd2 to type 2017-08-28 11:13:21 -07:00
statx statx: Include a mask for stx_attributes in struct statx 2017-04-03 01:06:00 -04:00
timers samples: move timers example code from Documentation 2016-09-23 11:51:58 -06:00
trace_events sched/core: Remove the tsk_cpus_allowed() wrapper 2017-03-02 08:42:24 +01:00
trace_printk tracing: Add trace_printk sample code 2016-06-20 09:54:21 -04:00
uhid HID: uhid: improve uhid example client 2013-09-04 11:35:14 +02:00
v4l [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
vfio-mdev vfio-mdev: remove some dead code 2017-01-11 12:12:37 -07:00
watchdog samples: move watchdog example code from Documentation 2016-09-23 11:52:14 -06:00
Kconfig statx: Add a system call to make enhanced file info available 2017-03-02 20:51:15 -05:00
Makefile statx: Add a system call to make enhanced file info available 2017-03-02 20:51:15 -05:00