All of lore.kernel.org
 help / color / mirror / Atom feed
* sharing a simple ebpf code sample
@ 2019-10-18 22:09 Farid Zakaria
  2019-10-19 16:11 ` Alexei Starovoitov
  0 siblings, 1 reply; 4+ messages in thread
From: Farid Zakaria @ 2019-10-18 22:09 UTC (permalink / raw)
  To: xdp-newbies

Hi,

I just wanted to share a code sample I put together which does
MPLSinIP encap/decap via clasct (not xdp).

https://github.com/fzakaria/ebpf-mpls-encap-decap

I know there's quite a few samples in the Linux source tree but I
found them lacking in terms of comments for someone new to the new
space.
(They were more geared at demonstrating a particular feature
specifically rather than simply instructional)

Learning & using ebpf for a project at work in a similar capacity
(encap/decap) has been a joy/fun to work with.

Cheers,
Farid Zakaria

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

* Re: sharing a simple ebpf code sample
  2019-10-18 22:09 sharing a simple ebpf code sample Farid Zakaria
@ 2019-10-19 16:11 ` Alexei Starovoitov
  2019-10-21 18:59   ` Farid Zakaria
  0 siblings, 1 reply; 4+ messages in thread
From: Alexei Starovoitov @ 2019-10-19 16:11 UTC (permalink / raw)
  To: Farid Zakaria; +Cc: Xdp

On Sat, Oct 19, 2019 at 2:37 AM Farid Zakaria <farid.m.zakaria@gmail.com> wrote:
>
> Hi,
>
> I just wanted to share a code sample I put together which does
> MPLSinIP encap/decap via clasct (not xdp).
>
> https://github.com/fzakaria/ebpf-mpls-encap-decap
>
> I know there's quite a few samples in the Linux source tree but I
> found them lacking in terms of comments for someone new to the new
> space.
> (They were more geared at demonstrating a particular feature
> specifically rather than simply instructional)
>
> Learning & using ebpf for a project at work in a similar capacity
> (encap/decap) has been a joy/fun to work with.

Thanks for sharing.
I think we can create new bpf_examples_and_links.rst file in Documentation/bpf/
with links for various repos, samples, examples, etc
Like yours, cilium, cloudflare, Jesper's docs, etc.
At least from kernel tree all the places will be reachable.

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

* Re: sharing a simple ebpf code sample
  2019-10-19 16:11 ` Alexei Starovoitov
@ 2019-10-21 18:59   ` Farid Zakaria
  2019-10-21 22:50     ` Y Song
  0 siblings, 1 reply; 4+ messages in thread
From: Farid Zakaria @ 2019-10-21 18:59 UTC (permalink / raw)
  To: Alexei Starovoitov; +Cc: Xdp, Mark Williams

On Sat, Oct 19, 2019 at 9:12 AM Alexei Starovoitov
<alexei.starovoitov@gmail.com> wrote:
> snip.
>
> Thanks for sharing.
> I think we can create new bpf_examples_and_links.rst file in Documentation/bpf/
> with links for various repos, samples, examples, etc
> Like yours, cilium, cloudflare, Jesper's docs, etc.
> At least from kernel tree all the places will be reachable.

That's a great idea. I know there is
https://github.com/zoidbergwill/awesome-ebpf however having something
maintained in the kernel would preferable I think.
eBPF is interesting because it empowers some user-space developers to
work on code that "looks" kernel like, so I think there is opportunity
to expand on the documentation for that segment.

I will also be attending the LLVM developer conference this week in
San Jose -- if anyone from this mailing list is there I hope to meet
you.

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

* Re: sharing a simple ebpf code sample
  2019-10-21 18:59   ` Farid Zakaria
@ 2019-10-21 22:50     ` Y Song
  0 siblings, 0 replies; 4+ messages in thread
From: Y Song @ 2019-10-21 22:50 UTC (permalink / raw)
  To: Farid Zakaria; +Cc: Alexei Starovoitov, Xdp, Mark Williams

On Mon, Oct 21, 2019 at 12:02 PM Farid Zakaria
<farid.m.zakaria@gmail.com> wrote:
>
> On Sat, Oct 19, 2019 at 9:12 AM Alexei Starovoitov
> <alexei.starovoitov@gmail.com> wrote:
> > snip.
> >
> > Thanks for sharing.
> > I think we can create new bpf_examples_and_links.rst file in Documentation/bpf/
> > with links for various repos, samples, examples, etc
> > Like yours, cilium, cloudflare, Jesper's docs, etc.
> > At least from kernel tree all the places will be reachable.
>
> That's a great idea. I know there is
> https://github.com/zoidbergwill/awesome-ebpf however having something
> maintained in the kernel would preferable I think.
> eBPF is interesting because it empowers some user-space developers to
> work on code that "looks" kernel like, so I think there is opportunity
> to expand on the documentation for that segment.
>
> I will also be attending the LLVM developer conference this week in
> San Jose -- if anyone from this mailing list is there I hope to meet
> you.

Farid,

I will attend the conference as well. You can catch me there.

Yonghong

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

end of thread, other threads:[~2019-10-21 22:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18 22:09 sharing a simple ebpf code sample Farid Zakaria
2019-10-19 16:11 ` Alexei Starovoitov
2019-10-21 18:59   ` Farid Zakaria
2019-10-21 22:50     ` 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.