All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Adel Fuchs <adelfuchs@gmail.com>
Cc: xdp-newbies@vger.kernel.org, iovisor-dev@lists.iovisor.org,
	brouer@redhat.com
Subject: Re: Running Prototype-kernel package
Date: Thu, 1 Jun 2017 18:59:34 +0200	[thread overview]
Message-ID: <20170601185934.73ab06a4@redhat.com> (raw)
In-Reply-To: <CAErYV9HG9H=62DL49qY1iewshx3NcMqAq6u3O=RsYEWdZp3Hjw@mail.gmail.com>


On Thu, 1 Jun 2017 17:45:03 +0300 Adel Fuchs <adelfuchs@gmail.com> wrote:

> Thank you so much for your help. I need to run an eBPF programs that
> filters packets according to IP address or port. I'm trying to run the
> prototype-kernel package but encounter problems.

The prototype-kernel github repo[1] is actually originally meant for
developing real kernel module.  I guess, I should/could have placed the
eBPF/XDP examples[3] in another github repo.

[1] https://github.com/netoptimizer/prototype-kernel
[2] http://netoptimizer.blogspot.dk/2014/11/announce-github-repo-prototype-kernel.html
[3] https://github.com/netoptimizer/prototype-kernel/tree/master/kernel/samples/bpf

> I went over the "getting started" tutorial, but I couldn'f find a
> tutorial which explains how to actually run the samples. So this is
> what I did:
> 
> clang -O2 -Wall -target bpf -c xdp_ddos01_blacklist_cmdline.c -o
> xdp_ddos01_blacklist_cmdline

Don't do this... as you found out all the included path are screwed
this way.  There is a Makefile in the directory[3] kernel/samples/bpf,
so simply chdir into this dir and run 'make'.  Just like you would do
in the kernel tree[4].

[4] https://github.com/torvalds/linux/blob/master/samples/bpf/README.rst

[...] 
> Could you please help me run these samples? Could you please guide me
> to the right sample that I need and tell me how to run it?
> Note that I was able to run a simple XDP program on this computer, so
> I think that it is configured all right...

I've also been touring with a tutorial talk, see latest here[5]

[5] http://people.netfilter.org/hawk/presentations/LLC2017/XDP_DDoS_protecting_LLC2017.pdf

I guess, I'll update the documentation a bit after your feedback,
thanks.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

  parent reply	other threads:[~2017-06-01 16:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAErYV9HG9H=62DL49qY1iewshx3NcMqAq6u3O=RsYEWdZp3Hjw@mail.gmail.com>
2017-06-01 15:45 ` [iovisor-dev] Running Prototype-kernel package Y Song
2017-06-01 16:59 ` Jesper Dangaard Brouer [this message]
2017-06-01 19:11   ` Jesper Dangaard Brouer
2017-06-05 12:14     ` Adel Fuchs
2017-06-05 13:10       ` Adel Fuchs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170601185934.73ab06a4@redhat.com \
    --to=brouer@redhat.com \
    --cc=adelfuchs@gmail.com \
    --cc=iovisor-dev@lists.iovisor.org \
    --cc=xdp-newbies@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.