On Mon, Dec 18, 2017 at 10:23 AM, Avi Cohen (A) <[email protected]> wrote:
> [Avi Cohen (A)] > > Thank you Paul and Y. Song > I have 2 questions: > 1. I’m already running some ‘packet filtering’ , e.g ICMP pkts, I try to > ’DROP’ > all ICMP pkts (return 0) Indeed it is not sent to userspace (python > program) , > but pass the whole ip-stack and [Avi Cohen (A)] ping is working (I expect > that ping will fail) – I thought that the > packet is dropped also from the ip-stack > We really can't do much to help without the source code. > 2. I understand that eBPF function is invoked before sk-buff is allocated > for the pkt in the ip-stack (i.e. before the > DMA) – so where is the packet being read from by the eBPF? from the > physical device buffer ? > I'm guessing you're referring to the XDP hook. The eBPF program is executed on the packets before the skbuff is allocated but after the DMA. The DMA writes the packet in memory, so without it the eBPF program won't run. > Best Regards > Avi > > > > From: Paul Chaignon [mailto:[email protected]] > > Sent: Monday, 18 December, 2017 10:52 AM > > To: Avi Cohen (A) > > Cc: [email protected] > > Subject: Re: [iovisor-dev] Simple example to start XDP/eBPF programming > > > > > > On Sun, Dec 17, 2017 at 12:55 PM, Avi Cohen (A) via iovisor-dev <iovisor- > > [email protected]> wrote: > > I've installed (packaged) bcc as per > > https://github.com/iovisor/bcc/blob/master/INSTALL.md > > Now I want to start playing. a simple one like 'hello-world' . I > couldn't find a > > guide for this simple example in this tutorial > > [https://github.com/iovisor/bcc/blob/master/docs/reference_guide.md] > > Can you refer to a step by step tutorial ? > > > > If bcc is correctly installed, to run the hello_world example, you should > > only need to run ./examples/hello_world.py as root. > > This tutorial is probably a better source of information in your case: > > https://github.com/iovisor/bcc/blob/master/docs/tutorial_ > bcc_python_develop > > er.md > > > > Best Regards > > Avi > > _______________________________________________ > > iovisor-dev mailing list > > [email protected] > > https://lists.iovisor.org/mailman/listinfo/iovisor-dev > >
_______________________________________________ iovisor-dev mailing list [email protected] https://lists.iovisor.org/mailman/listinfo/iovisor-dev
