* Still need to inline functions?
@ 2019-06-16 0:07 Elerion
2019-06-25 17:40 ` Y Song
0 siblings, 1 reply; 2+ messages in thread
From: Elerion @ 2019-06-16 0:07 UTC (permalink / raw)
To: xdp-newbies
What version of Linux is required so I can use functions without
__always_inline in the xdp kernel object?
I read here https://lwn.net/Articles/741773/ it was supposed to be
allowed a long time ago.
When I remove __always_inline on a medium sized function,
bpf_load_program() will say:
"jump out of range from insn 5 to 796"
Is this possible to fix, or do you still need to put __always_inline
on every function?
Software versions:
Ubuntu 18.04.02 LTS x64
4.18.0-20-generic
5.0.0-16-generic
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
LLVM (http://llvm.org/):
LLVM version 6.0.0
Optimized build.
Default target: x86_64-pc-linux-gnu
Host CPU: broadwell
Compile flags:
clang -O2 -target bpf -I/usr/include/x86_64-linux-gnu -c kern.c -o kern.o
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Still need to inline functions?
2019-06-16 0:07 Still need to inline functions? Elerion
@ 2019-06-25 17:40 ` Y Song
0 siblings, 0 replies; 2+ messages in thread
From: Y Song @ 2019-06-25 17:40 UTC (permalink / raw)
To: Elerion; +Cc: Xdp
As of today, the `__always_inline` is still required. Some work will
be needed, e.g., to merge codes between different sections, before
`__always_inline` can be removed.
On Sat, Jun 15, 2019 at 5:07 PM Elerion <elerion1000@gmail.com> wrote:
>
> What version of Linux is required so I can use functions without
> __always_inline in the xdp kernel object?
>
> I read here https://lwn.net/Articles/741773/ it was supposed to be
> allowed a long time ago.
>
> When I remove __always_inline on a medium sized function,
> bpf_load_program() will say:
>
> "jump out of range from insn 5 to 796"
>
> Is this possible to fix, or do you still need to put __always_inline
> on every function?
>
> Software versions:
>
> Ubuntu 18.04.02 LTS x64
> 4.18.0-20-generic
> 5.0.0-16-generic
>
> clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
> Target: x86_64-pc-linux-gnu
> Thread model: posix
> InstalledDir: /usr/bin
>
> LLVM (http://llvm.org/):
> LLVM version 6.0.0
>
> Optimized build.
> Default target: x86_64-pc-linux-gnu
> Host CPU: broadwell
>
> Compile flags:
>
> clang -O2 -target bpf -I/usr/include/x86_64-linux-gnu -c kern.c -o kern.o
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-25 17:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-16 0:07 Still need to inline functions? Elerion
2019-06-25 17:40 ` Y Song
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.