Yes I'm using tail-calls, and yes that's definitely the problem I was thinking about. Gotta upgrade to 4.19 then. Thanks a lot for the fast replies. Il giorno mer 21 nov 2018 alle ore 11:52 Jesper Dangaard Brouer <brouer@xxxxxxxxxx> ha scritto: > > On Wed, 21 Nov 2018 11:01:45 +0100 > Pavel Popa <pashinho1990@xxxxxxxxx> wrote: > > > For what I see, the only way to return -EFAULT is in this case > > https://elixir.bootlin.com/linux/v4.18.10/source/net/core/filter.c#L3259. > > This may explain the "to_ifindex=0" thing, as 'fwd' is initialized > > NULL. But I don't understand the meaning of the > > "xdp_map_invalid(xdp_prog, map_owner)" condition. So, if that's really > > the case, what can be inferred from this? > > Are you using BPF-tail calls? > > Well that code got removed in kernel 4.19: > > Commit f6069b9aa993 ("bpf: fix redirect to map under tail calls") > https://git.kernel.org/torvalds/c/f6069b9aa993 > > -- > Best regards, > Jesper Dangaard Brouer > MSc.CS, Principal Kernel Engineer at Red Hat > LinkedIn: http://www.linkedin.com/in/brouer > > $ git describe --contains f6069b9aa993 > v4.19-rc1~86^2~6^2