diff options
author | Quentin Monnet <quentin.monnet@netronome.com> | 2017-10-24 20:11:28 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-26 17:52:59 +0900 |
commit | 3fc27b71b894f5e2ad611297d5817b6092c96626 (patch) | |
tree | 874ab256c51d7e7372d05a4a81f5eed6c85eb5a6 /net/smc/af_smc.c | |
parent | e233df01576bba9f5bafacccd571353b72152bd5 (diff) | |
download | lwn-3fc27b71b894f5e2ad611297d5817b6092c96626.tar.gz lwn-3fc27b71b894f5e2ad611297d5817b6092c96626.zip |
tools: bpftool: try to mount bpffs if required for pinning objects
One possible cause of failure for `bpftool {prog|map} pin * file FILE`
is the FILE not being in an eBPF virtual file system (bpffs). In this
case, make bpftool attempt to mount bpffs on the parent directory of the
FILE. Then, if this operation is successful, try again to pin the
object.
The code for mnt_bpffs() is a copy of function bpf_mnt_fs() from
iproute2 package (under lib/bpf.c, taken at commit 4b73d52f8a81), with
modifications regarding handling of error messages.
Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/af_smc.c')
0 files changed, 0 insertions, 0 deletions