On Fri, 13 Dec 2019 at 16:52, Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> wrote: > > On Fri, Dec 13, 2019 at 7:49 AM Björn Töpel <bjorn.topel@xxxxxxxxx> wrote: > > > > On Fri, 13 Dec 2019 at 16:04, Alexei Starovoitov > > <alexei.starovoitov@xxxxxxxxx> wrote: > > > > > > On Fri, Dec 13, 2019 at 08:51:47AM +0100, Björn Töpel wrote: > > > > > > > > > I hope my guess that compiler didn't inline it is correct. Then extra noinline > > > > > will not hurt and that's the only thing needed to avoid the issue. > > > > > > > > > > > > > I'd say it's broken not marking it as noinline, and I was lucky. It > > > > would break if other BPF entrypoints that are being called from > > > > filter.o would appear. I'll wait for more comments, and respin a v5 > > > > after the weekend. > > > > > > Also noticed that EXPORT_SYMBOL for dispatch function is not necessary atm. > > > Please drop it. It can be added later when need arises. > > > > > > > It's needed for module builds, so I cannot drop it! > > Not following. Which module it's used out of? The trampoline is referenced from bpf_prog_run_xdp(), which is inlined. Without EXPORT, the symbol is not visible for the module. So, if, say i40e, is built as a module, you'll get a linker error.