Date   

Re: Facing an error while compiling for bpf using clang

Daniel Borkmann
 

On 05/22/2019 09:26 AM, Prashanth Fernando wrote:
Thank You, I updated clang and now I am able to compile the code in CentOS-7.

I am facing another issue while loading the ebpf code in tc. I am able to run this in Ubuntu-18.04, but the usecase is to run it in CentOS. Can someone please help me out in resolving it.
replicator.o is my objext file and classifier/action are the classifier/action code.

# sudo tc filter add dev enp0s8 parent ffff: bpf obj replicator.o sec classifier flowid ffff:1 \
action bpf obj replicator.o sec action ok
What is "obj"?
Usage: ... bpf ...
Judging from above error and that it works on Ubuntu 18.04, then your iproute2
version in CentOS-7 is simply too old aka lacking eBPF support.

Try compiling one from recent Git [0] or some more recent tarball, then it
should work provided you have a proper kernel with it.

Perhaps also [1] might help you getting started, e.g. you can use cls_bpf in
direct action mode which is much more efficient than going through ac_bpf,
see the guide for more info.

[0] https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/
[1] https://cilium.readthedocs.io/en/latest/bpf/#iproute2

[inline]:     run bytecode BPF_BYTECODE
[from file]:  run bytecode-file FILE

[ police POLICE_SPEC ] [ action ACTION_SPEC ]
[ classid CLASSID ]

Where BPF_BYTECODE := 's,c t f k,c t f k,c t f k,...'
c,t,f,k and s are decimals; s denotes number of 4-tuples
Where FILE points to a file containing the BPF_BYTECODE string

Tks,
PRashanth




Re: Facing an error while compiling for bpf using clang

Toke Høiland-Jørgensen
 

Prashanth Fernando <prashanth.fernando@...> writes:

Hi,
Thanks for your response. I had a doubt that the kernel has to be upgraded.
So I upgraded the kernel to 5.1.3, still I face the issue.
You also need to compile a new version of iproute2 (where the 'tc' and
'ip' utilities come from).

-Toke


Re: Facing an error while compiling for bpf using clang

Prashanth Fernando
 

Hi, 
Thanks for your response. I had a doubt that the kernel has to be upgraded.
So I upgraded the kernel to 5.1.3, still I face the issue. 

I compiled the kernel with these options, have I missed out some option ?

CONFIG_CGROUP_BPF=y
CONFIG_BPF=y
CONFIG_BPF_SYSCALL=y
CONFIG_BPF_JIT_ALWAYS_ON=y
CONFIG_NETFILTER_XT_MATCH_BPF=m
CONFIG_BPFILTER=y
CONFIG_BPFILTER_UMH=m
CONFIG_NET_CLS_BPF=m
CONFIG_NET_ACT_BPF=m
CONFIG_BPF_JIT=y
CONFIG_BPF_STREAM_PARSER=y
CONFIG_LWTUNNEL_BPF=y
CONFIG_HAVE_EBPF_JIT=y
CONFIG_BPF_EVENTS=y
CONFIG_BPF_KPROBE_OVERRIDE=y
CONFIG_TEST_BPF=m



[root@localhost linux-5.1.3]# uname -msr
Linux 5.1.3 x86_64
 


Re: Facing an error while compiling for bpf using clang

Jesper Dangaard Brouer
 

On Wed, 22 May 2019 00:26:54 -0700
"Prashanth Fernando" <prashanth.fernando@...> wrote:

Thank You, I updated clang and now I am able to compile the code in
CentOS-7.

I am facing another issue while loading the ebpf code in tc. I am
able to run this in Ubuntu-18.04, but the usecase is to run it in
CentOS. Can someone please help me out in resolving it.
You have to use CentOS-8 for TC (and XDP) support, or install a newer
kernel version on CentOS-7.

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

https://linuxhint.com/centos8-release-date-and-features/


Re: Facing an error while compiling for bpf using clang

Jesper Dangaard Brouer
 

On Tue, 21 May 2019 23:17:28 -0700
"Yonghong Song" <ys114321@...> wrote:

bpf needs 3.7.1 and higher version. Later clang (>= 3.7.1) has more features.
In the kernel tree it is documented here:
https://github.com/torvalds/linux/blob/master/samples/bpf/README.rst

But the kernel says:
clang >= version 3.4.0 + llvm >= version 3.7.1

What is your 'llc' version?
(run command: llc --version )



On Tue, May 21, 2019 at 11:13 PM Prashanth Fernando
<prashanth.fernando@...> wrote:

Hi,

The clang version I am using is 3.4.2

clang --version
clang version 3.4.2 (tags/RELEASE_34/dot2-final)
Target: x86_64-redhat-linux-gnu
Thread model: posix
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer


Re: Facing an error while compiling for bpf using clang

Prashanth Fernando
 

Thank You, I updated clang and now I am able to compile the code in CentOS-7.

I am facing another issue while loading the ebpf code in tc. I am able to run this in Ubuntu-18.04, but the usecase is to run it in CentOS. Can someone please help me out in resolving it. 
replicator.o is my objext file and classifier/action are the classifier/action code.

# sudo tc filter add dev enp0s8 parent ffff: bpf obj replicator.o sec classifier flowid ffff:1 \
        action bpf obj replicator.o sec action ok
What is "obj"?
Usage: ... bpf ...
 
 [inline]:     run bytecode BPF_BYTECODE
 [from file]:  run bytecode-file FILE
 
               [ police POLICE_SPEC ] [ action ACTION_SPEC ]
               [ classid CLASSID ]
 
Where BPF_BYTECODE := 's,c t f k,c t f k,c t f k,...'
      c,t,f,k and s are decimals; s denotes number of 4-tuples
Where FILE points to a file containing the BPF_BYTECODE string

Tks,
PRashanth


Re: Facing an error while compiling for bpf using clang

Yonghong Song
 

bpf needs 3.7.1 and higher version. Later clang (>= 3.7.1) has more features.

On Tue, May 21, 2019 at 11:13 PM Prashanth Fernando
<prashanth.fernando@...> wrote:

Hi,

The clang version I am using is 3.4.2

clang --version
clang version 3.4.2 (tags/RELEASE_34/dot2-final)
Target: x86_64-redhat-linux-gnu
Thread model: posix

Tks,
PRashanth


Re: Facing an error while compiling for bpf using clang

Prashanth Fernando
 

Hi, 

The clang version I am using is 3.4.2

clang --version
clang version 3.4.2 (tags/RELEASE_34/dot2-final)
Target: x86_64-redhat-linux-gnu
Thread model: posix

Tks,
PRashanth 
 


Re: how to run bcc xdp_redirect_cpu.py example

Jesper Dangaard Brouer
 

On Wed, 22 May 2019 12:28:46 +0800
"Gary Lin" <glin@...> wrote:

On Tue, May 21, 2019 at 08:17:16PM -0700, forrest0579@... wrote:
Hi,
I’m new to bpf and when run `iovisor/bcc` examples with
`xdp_redirect_cpu.py` in my vm, the connection will lost and I have
to restart my vm. In my understanding this example just foword the
package from one cpu to another and the package should not lost. Am
I missing something? Anyone can help me? Thank you

PS: xdp is loaded in xdpgeneric mode
CPUMAP is not supported by generic XDP(*). Besides, it provides very little
benefit since the packet is already packaged into a skb and there is no need
to package it again with another CPU.

(*) https://github.com/torvalds/linux/blob/v5.1/net/core/filter.c#L3560-L3563
Thanks you Gary, for pointing this out. I added the TODO in the code,
and it is still on my todo list for CPUMAP here:

https://github.com/xdp-project/xdp-project/blob/master/areas/cpumap.org

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


Re: how to run bcc xdp_redirect_cpu.py example

Gary Lin
 

On Tue, May 21, 2019 at 08:17:16PM -0700, forrest0579@... wrote:
Hi, I’m new to bpf and when run `iovisor/bcc` examples with `xdp_redirect_cpu.py` in my vm, the connection will lost and I have to restart my vm. In my understanding this example just foword the package from one cpu to another and the package should not lost. Am I missing something? Anyone can help me? Thank you

PS: xdp is loaded in xdpgeneric mode
CPUMAP is not supported by generic XDP(*). Besides, it provides very little
benefit since the packet is already packaged into a skb and there is no need
to package it again with another CPU.

Cheers,

Gary Lin

(*) https://github.com/torvalds/linux/blob/v5.1/net/core/filter.c#L3560-L3563


Re: Facing an error while compiling for bpf using clang

Tom Stellard
 

On 05/21/2019 08:42 PM, Prashanth Fernando wrote:
Hi,

I'm new to XDP, I am trying to compile a simple code to start with.
When I compile with clang, I face an error. Can someone please help me out in resolving this issue.

# clang -target bpf -c drop.c -o drop.o
error: unknown target triple 'bpf', please use -triple or -arch
Which version of clang are you using? It looks like it is missing the bpf
target.

-Tom

OS: CentOS 7
Updated Kernel:
# uname -msr
Linux 5.1.3 x86_64

Built the kernel with the following flags on:
CONFIG_CGROUP_BPF=y
CONFIG_BPF=y
CONFIG_BPF_SYSCALL=y
CONFIG_BPF_JIT_ALWAYS_ON=y
CONFIG_NETFILTER_XT_MATCH_BPF=m
CONFIG_BPFILTER=y
CONFIG_BPFILTER_UMH=m
CONFIG_NET_CLS_BPF=m
CONFIG_NET_ACT_BPF=m
CONFIG_BPF_JIT=y
CONFIG_BPF_STREAM_PARSER=y
CONFIG_LWTUNNEL_BPF=y
CONFIG_HAVE_EBPF_JIT=y
CONFIG_BPF_EVENTS=y
CONFIG_BPF_KPROBE_OVERRIDE=y
CONFIG_TEST_BPF=m

I am not sure what I am missing still.


Facing an error while compiling for bpf using clang

Prashanth Fernando
 

Hi, 

I'm new to XDP, I am trying to compile a simple code to start with.
When I compile with clang, I face an error. Can someone please help me out in resolving this issue.

# clang -target bpf -c drop.c -o drop.o
error: unknown target triple 'bpf', please use -triple or -arch

OS: CentOS 7
Updated Kernel:
# uname -msr
Linux 5.1.3 x86_64

Built the kernel with the following flags on:
CONFIG_CGROUP_BPF=y
CONFIG_BPF=y
CONFIG_BPF_SYSCALL=y
CONFIG_BPF_JIT_ALWAYS_ON=y
CONFIG_NETFILTER_XT_MATCH_BPF=m
CONFIG_BPFILTER=y
CONFIG_BPFILTER_UMH=m
CONFIG_NET_CLS_BPF=m
CONFIG_NET_ACT_BPF=m
CONFIG_BPF_JIT=y
CONFIG_BPF_STREAM_PARSER=y
CONFIG_LWTUNNEL_BPF=y
CONFIG_HAVE_EBPF_JIT=y
CONFIG_BPF_EVENTS=y
CONFIG_BPF_KPROBE_OVERRIDE=y
CONFIG_TEST_BPF=m

I am not sure what I am missing still.


how to run bcc xdp_redirect_cpu.py example

Forrest Chen
 

Hi, I’m new to bpf and when run `iovisor/bcc` examples with `xdp_redirect_cpu.py` in my vm, the connection will lost and I have to restart my vm. In my understanding this example just foword the package from one cpu to another and the package should not lost. Am I missing something? Anyone can help me? Thank you

PS: xdp is loaded in xdpgeneric mode


Linux Plumbers BPF micro-conference CFP

Daniel Borkmann
 

This is a call for proposals for the BPF micro-conference at this
years' Linux Plumbers Conference (LPC) 2019 which will be held in
Lisbon, Portugal for September 9-11.

The goal of the BPF micro-conference is to bring BPF developers
together to discuss topics around Linux kernel work related to
the BPF core infrastructure as well as its many subsystems under
tracing, networking, security, and BPF user space tooling (LLVM,
libbpf, bpftool and many others).

The format of the micro-conference has a main focus on discussion,
therefore each accepted topic will provide a short 1-2 slide
introduction with subsequent discussion for the rest of the given
time slot.

The BPF micro-conference is a community-driven event and open to
all LPC attendees, there is no additional registration required.

Please submit your discussion proposals to the LPC BPF micro-conference
organizers at:

lpc-bpf@...

Proposals must be submitted until August 2nd, and submitters will
be notified of acceptance at latest by August 9. (Please note that
proposals must not be sent as html mail as they are otherwise dropped
by vger.)

The format of the submission and many other details can be found at:

http://vger.kernel.org/lpc-bpf.html

Looking forward to seeing you all in Lisbon in September!


minutes: IO Visor/TSC Dev Meeting

Brenden Blanco
 

Hi all,

Thanks for joining the call today. As usual, here are my notes from the
discussion.

=== Discussion ===
Alexei:
LSF/MM - BPF track
* overall went quite well
* planning BPF conference for next year
* notes @ http://vger.kernel.org/bpfconf2019.html

Yonghong:
* Compiler work to support compile-once-run-anywhere
* LLVM code review fabricator - search for yonghong to find patch
* Send signal bpf helper RFC1 has some issues
* trying instead to send to current, even if in interrupt context
* Other updates: some work for map of maps support in bcc

John:
* Some progress on bounded loop
* Performing arithmetic on induction variables in one pass through loop
* Many loops have simple enough induction variable strides to satisfy this
simple algorithm
* other sockmap and ktls fixes
* release/acquire socket lock issue in ktls
* fuzzing fixes

Jiong:
* 32 bit patchset work continues
* Currently determining how to test
* Setting up arm 32 bit qemu environment has issues
* Cross-compiling kernel + selftest suite
* Some offers to test on 32 bit x86

Brendan:
* BPF book is currently being reviewed
* If someone on the call would like to contribute reviews, reach out to
Brendan
* bpftrace syntax to be finalized
* some compiler hints would be nice to pass __user pointer annotation to the
scripts, otherwise explicit wrapper is necessary
* necessary only for mixed mode tools

Joe:
* socket_assign helper for proxying support in bpf
* tproxy working for tcp, working on udp
* skc_lookup[_tcp] helper needed?
* some leakiness in the socket api/bpf abstraction, needs to be worked out

Daniel:
* Out of bounds fix
* cgroups hooks for sendmsg
* breaks for DNS
* add recvmsg hooks for reverse path, to avoid lookup failure
* some minor fixes for connected (tcp) case

Andrii:
* Improving libbpf for BTF (and in prior kernels)
* BTF to C converter
* next: using BTF to define bpf maps

=== Attendees ===
Alexei Starovoitov
Andrii Nakryiko
Augusto Caringi
Dan Siemon
Jesper Brouer
Richard Elling
Brenden Blanco
Jiong
Yonghong Song
Andy Gospodarek
Daniel Borkmann
Jakub Kicinski
Brendan Gregg
John Fastabend
Mauricio Vasquez
Paul Chaignon
Joe Stringer


reminder: IO Visor TSC/Dev Meeting

Brenden Blanco
 

Please join us tomorrow for our bi-weekly call. As usual, this meeting is
open to everybody and completely optional.
You might be interested to join if:
You want to know what is going on in BPF land
You are doing something interesting yourself with BPF and would like to share
You want to know what the heck BPF is

=== IO Visor Dev/TSC Meeting ===

Every 2 weeks on Wednesday, from Wednesday, January 25, 2017, to no end date
11:00 am | Pacific Daylight Time (San Francisco, GMT-07:00) | 30 min

https://bluejeans.com/568677804/

https://www.timeanddate.com/worldclock/meetingdetails.html?year=2019&month=5&day=15&hour=18&min=0&sec=0&p1=900


Re: XDP on driver nfp_netvf

Jakub Kicinski
 

On Tue, 14 May 2019 10:15:04 -0700, mdimolianis@... wrote:
Hi all,
We have acquired some Netronome Agilio CX 10GbE, installed on a
server running a Proxmox node. We have created a virtual function and
pass through them to a Virtual Machine running Ubuntu 18 with kernel
4.18.0 since Netronome does not support pass through the physical NIC
interface directly to the VM. The driver that is used in the VM is
the nfp_netvf. We tried to execute an XDP program on the interface
but we couldn't. I assume that this driver does not support XDP
execution.

Has anyone achieved to pass through the smartNIC directly to a VM?
Do you know if XDP is going to be supported in nfp_netvf driver?
Unfortunately current SR-IOV implementation on the CX and LX series
of cards does not provide enough resources on the VFs to implement
XDP in driver mode :(


XDP on driver nfp_netvf

mdimolianis@...
 

Hi all,
We have acquired some Netronome Agilio CX 10GbE, installed on a server running a Proxmox node. We have created a virtual function and pass through them to a Virtual Machine running Ubuntu 18 with kernel 4.18.0 since Netronome does not support pass through the physical NIC interface directly to the VM. The driver that is used in the VM is the nfp_netvf. We tried to execute an XDP program on the interface but we couldn't. I assume that this driver does not support XDP execution.
Has anyone achieved to pass through the smartNIC directly to a VM?
Do you know if XDP is going to be supported in nfp_netvf driver?
Thank you in advance.
Regards,
Marinos



Re: how to starts ? but It is fully installed :)

Dorian ROSSE
 

I will wait my Dyn IT worker answer it should be answer if my DDOS dectector seems works

I send an e-mail to DNSSEC e-mail worker of Dyn

Have a Nice evening,

Regards.


Dorian Rosse.

Télécharger Outlook pour Android


From: Jugurtha BELKALEM <jugurtha.belkalem@...>
Sent: Tuesday, May 14, 2019 12:52:46 PM
To: Dorian ROSSE
Cc: iovisor-dev@...
Subject: Re: [iovisor-dev] how to starts ? but It is fully installed :)
 
I guess it's going to work,

But be sure to test (use hping3 to simulate an attack).

Regards.


Jugurtha BELKALEM.


Re: how to starts ? but It is fully installed :)

Jugurtha BELKALEM
 

I guess it's going to work,

But be sure to test (use hping3 to simulate an attack).

Regards.


Jugurtha BELKALEM.

341 - 360 of 2021