All of lore.kernel.org
 help / color / mirror / Atom feed
* XDP chain using tail calls
@ 2019-04-17 13:11 Radu Stoenescu
  2019-04-17 13:21 ` Taeung Song
  2019-04-17 13:26 ` Toke Høiland-Jørgensen
  0 siblings, 2 replies; 7+ messages in thread
From: Radu Stoenescu @ 2019-04-17 13:11 UTC (permalink / raw)
  To: xdp-newbies

Hello

I was recently reading through the XDP documentation from Cilium[1]
and I couldn't really wrap my head around the tail cal section.

Is there any tutorial/code example of using this feature with XDP?

Regards
-- 
Radu Stoenescu

[1]: https://docs.cilium.io/en/v1.4/bpf/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: XDP chain using tail calls
  2019-04-17 13:11 XDP chain using tail calls Radu Stoenescu
@ 2019-04-17 13:21 ` Taeung Song
  2019-04-17 13:27   ` Toke Høiland-Jørgensen
  2019-04-17 13:26 ` Toke Høiland-Jørgensen
  1 sibling, 1 reply; 7+ messages in thread
From: Taeung Song @ 2019-04-17 13:21 UTC (permalink / raw)
  To: Radu Stoenescu, xdp-newbies

Hi Radu Stoenescu,

You can run 'BPF tail call' examples at samples/bpf of kernel source
That are sockex3_kern.c or tracex5_kern.c
I think it'd be better to understand it if running tracex5
that just uses bpf_tail_call() helper function for a BPF prog
depending on syscall number.

Thanks,
Taeung

On 4/17/19 10:11 PM, Radu Stoenescu wrote:
> Hello
> 
> I was recently reading through the XDP documentation from Cilium[1]
> and I couldn't really wrap my head around the tail cal section.
> 
> Is there any tutorial/code example of using this feature with XDP?
> 
> Regards
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: XDP chain using tail calls
  2019-04-17 13:11 XDP chain using tail calls Radu Stoenescu
  2019-04-17 13:21 ` Taeung Song
@ 2019-04-17 13:26 ` Toke Høiland-Jørgensen
  2019-04-17 13:29   ` Daniel Borkmann
  1 sibling, 1 reply; 7+ messages in thread
From: Toke Høiland-Jørgensen @ 2019-04-17 13:26 UTC (permalink / raw)
  To: Radu Stoenescu, xdp-newbies

Radu Stoenescu <radu.stoe@gmail.com> writes:

> Hello
>
> I was recently reading through the XDP documentation from Cilium[1]
> and I couldn't really wrap my head around the tail cal section.
>
> Is there any tutorial/code example of using this feature with XDP?

Hmm, I'm not sure there are any current examples. But you make a good
point, we should probably have one. We're building an interactive
tutorial here: https://github.com/xdp-project/xdp-tutorial - please feel
free to open an issue here requesting it to be added! :)

-Toke

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: XDP chain using tail calls
  2019-04-17 13:21 ` Taeung Song
@ 2019-04-17 13:27   ` Toke Høiland-Jørgensen
  2019-04-17 13:31     ` Radu Stoenescu
  0 siblings, 1 reply; 7+ messages in thread
From: Toke Høiland-Jørgensen @ 2019-04-17 13:27 UTC (permalink / raw)
  To: Taeung Song, Radu Stoenescu, xdp-newbies

Taeung Song <treeze.taeung@gmail.com> writes:

> Hi Radu Stoenescu,
>
> You can run 'BPF tail call' examples at samples/bpf of kernel source
> That are sockex3_kern.c or tracex5_kern.c
> I think it'd be better to understand it if running tracex5
> that just uses bpf_tail_call() helper function for a BPF prog
> depending on syscall number.

Oh, there are actually some of the samples that include tail calls.
Guess my grepping foo failed me... Cool :)

-Toke

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: XDP chain using tail calls
  2019-04-17 13:26 ` Toke Høiland-Jørgensen
@ 2019-04-17 13:29   ` Daniel Borkmann
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Borkmann @ 2019-04-17 13:29 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen, Radu Stoenescu, xdp-newbies

On 04/17/2019 03:26 PM, Toke Høiland-Jørgensen wrote:
> Radu Stoenescu <radu.stoe@gmail.com> writes:
> 
>> Hello
>>
>> I was recently reading through the XDP documentation from Cilium[1]
>> and I couldn't really wrap my head around the tail cal section.
>>
>> Is there any tutorial/code example of using this feature with XDP?
> 
> Hmm, I'm not sure there are any current examples. But you make a good
> point, we should probably have one. We're building an interactive
> tutorial here: https://github.com/xdp-project/xdp-tutorial - please feel
> free to open an issue here requesting it to be added! :)

Wrt iproute2, there's some simple examples to start here:

  https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/tree/examples/bpf

If you need more elaborate ones, you might want to check out:

  https://github.com/cilium/cilium/tree/master/bpf

Cheers,
Daniel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: XDP chain using tail calls
  2019-04-17 13:27   ` Toke Høiland-Jørgensen
@ 2019-04-17 13:31     ` Radu Stoenescu
  2019-04-17 13:44       ` Toke Høiland-Jørgensen
  0 siblings, 1 reply; 7+ messages in thread
From: Radu Stoenescu @ 2019-04-17 13:31 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen; +Cc: Taeung Song, xdp-newbies

Thank you!

If you think this might be useful, I could bring it to the xdp-tutorial repo.

It's a bit tricky to find those, I did managed to find the in the
meantime via the kernel commit that introduced them:
https://lwn.net/Articles/645169/

Best,
Radu

On Wed, Apr 17, 2019 at 4:27 PM Toke Høiland-Jørgensen <toke@redhat.com> wrote:
>
> Taeung Song <treeze.taeung@gmail.com> writes:
>
> > Hi Radu Stoenescu,
> >
> > You can run 'BPF tail call' examples at samples/bpf of kernel source
> > That are sockex3_kern.c or tracex5_kern.c
> > I think it'd be better to understand it if running tracex5
> > that just uses bpf_tail_call() helper function for a BPF prog
> > depending on syscall number.
>
> Oh, there are actually some of the samples that include tail calls.
> Guess my grepping foo failed me... Cool :)
>
> -Toke



-- 
Radu Stoenescu

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: XDP chain using tail calls
  2019-04-17 13:31     ` Radu Stoenescu
@ 2019-04-17 13:44       ` Toke Høiland-Jørgensen
  0 siblings, 0 replies; 7+ messages in thread
From: Toke Høiland-Jørgensen @ 2019-04-17 13:44 UTC (permalink / raw)
  To: Radu Stoenescu; +Cc: Taeung Song, xdp-newbies

Radu Stoenescu <radu.stoe@gmail.com> writes:

> Thank you!
>
> If you think this might be useful, I could bring it to the
> xdp-tutorial repo.

Please do! This is definitely something we should cover :)

-Toke

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-04-17 13:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-17 13:11 XDP chain using tail calls Radu Stoenescu
2019-04-17 13:21 ` Taeung Song
2019-04-17 13:27   ` Toke Høiland-Jørgensen
2019-04-17 13:31     ` Radu Stoenescu
2019-04-17 13:44       ` Toke Høiland-Jørgensen
2019-04-17 13:26 ` Toke Høiland-Jørgensen
2019-04-17 13:29   ` Daniel Borkmann

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.