On Tue, Oct 24, 2017 at 08:11:28PM -0700, Jakub Kicinski wrote:
> From: Quentin Monnet <[email protected]>
> 
> 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 <[email protected]>
> Signed-off-by: Jakub Kicinski <[email protected]>

the choice of mounting in the dir where the file is feels a bit
too simplistic, but I don't have better ideas and it helps new users, so
Acked-by: Alexei Starovoitov <[email protected]>

Reply via email to