summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorSargun Dhillon <sargun@sargun.me>2016-11-28 14:52:42 -0800
committerDavid S. Miller <davem@davemloft.net>2016-11-30 10:29:48 -0500
commit1379fd3c426ce98f2936420a43d88b54df218b69 (patch)
treefa1466cac716fbc067492fd270164b04923e9f82 /kernel
parent377fa64f19ff45d49dc95d4f9d9a0a95fea7f768 (diff)
downloadop-kernel-dev-1379fd3c426ce98f2936420a43d88b54df218b69.zip
op-kernel-dev-1379fd3c426ce98f2936420a43d88b54df218b69.tar.gz
samples: bpf: Refactor test_cgrp2_attach -- use getopt, and add mode
This patch modifies test_cgrp2_attach to use getopt so we can use standard command line parsing. It also adds an option to run the program in detach only mode. This does not attach a new filter at the cgroup, but only runs the detach command. Lastly, it changes the attach code to not detach and then attach. It relies on the 'hotswap' behaviour of CGroup BPF programs to be able to change in-place. If detach-then-attach behaviour needs to be tested, the example can be run in detach only mode prior to attachment. Signed-off-by: Sargun Dhillon <sargun@sargun.me> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud