Re: Netlink connector

2005-07-25 Thread Eric Leblond
Le lundi 25 juillet 2005 à 16:32 +0200, Patrick McHardy a écrit : Evgeniy Polyakov wrote: On Mon, Jul 25, 2005 at 02:02:10AM -0400, James Morris ([EMAIL PROTECTED]) wrote: If I understand correctly it tries to workaround some netlink limitations (limited number of netlink families and

Re: ebpf: issue with clang

2016-06-12 Thread Eric Leblond
Hello, On Thu, 2016-06-09 at 17:34 -0700, Alexei Starovoitov wrote: > On Thu, Jun 09, 2016 at 11:10:05PM +0200, Eric Leblond wrote: > > Hello, > > > > I'm working on integrating ebpf cluster load balancing for > > AF_PACKET > > and I've got some problem to get

Re: ebpf: issue with clang

2016-06-12 Thread Eric Leblond
Hello, On Sun, 2016-06-12 at 20:35 +0200, Daniel Borkmann wrote: > On 06/12/2016 07:37 PM, Eric Leblond wrote: > > On Thu, 2016-06-09 at 17:34 -0700, Alexei Starovoitov wrote: > > > On Thu, Jun 09, 2016 at 11:10:05PM +0200, Eric Leblond wrote: > > > > Hello

ebpf: issue with clang

2016-06-09 Thread Eric Leblond
4.6.0 kernel and a 4.5.x kernel. What did I miss here ? BR, -- Eric Leblond <e...@regit.org> Blog: https://home.regit.org/

[PATCH net-next 0/2] libbpf: minor fix and API update

2016-08-13 Thread Eric Leblond
Hello, Here's a small patchset on libbpf fixing two issues I've encountered when adding some eBPF related features to Suricata. Patchset statistics: tools/lib/bpf/libbpf.c | 16 +++- tools/lib/bpf/libbpf.h | 4 +++- 2 files changed, 10 insertions(+), 10 deletions(-) BR, -- Eric

[PATCH net-next 2/2] tools lib bpf: export function to set type

2016-08-13 Thread Eric Leblond
Current API was not allowing the user to set a type like socket filter. To avoid a setter function for each type, the patch simply exports a set function that takes the type in parameter. Signed-off-by: Eric Leblond <e...@regit.org> --- tools/lib/bpf/libbpf.c | 15 ++- tools/l

[PATCH net-next 1/2] tools lib bpf: suppress useless include

2016-08-13 Thread Eric Leblond
The include of err.h is not explicitely needed in exported functions and it was causing include conflict with some existing code due to redefining some macros. Signed-off-by: Eric Leblond <e...@regit.org> --- tools/lib/bpf/libbpf.c | 1 + tools/lib/bpf/libbpf.h | 1 - 2 files chan

eBPF: how to check the flow table

2016-09-18 Thread Eric Leblond
a few flows but on a real system with log of insertion in the table, the loop is never returning because we dequeue slower than we enqueue. Is there a better algorithm or an other way to do it ?  BR, -- Eric Leblond <e...@regit.org> Blog: https://home.regit.org/

Re: eBPF: how to check the flow table

2016-09-19 Thread Eric Leblond
Hello, On Sun, 2016-09-18 at 14:02 +0200, Eric Leblond wrote: > Hello, > > I'm currently testing a code implementing AF_PACKET bypass for > Suricata. The idea is that Suricata is updating a hash table > containing > a list of flows it does not want to see anymore. > &

Re: [PATCH 7/8] tools lib bpf: fix maps resolution

2016-11-07 Thread Eric Leblond
ch 7/8 into my local code base and send to Arnaldo > with my other patches. If ok with you, I propose that you collect patch 7/8 it you have no news from me on Friday. If an issue for you, just collect it now and I will synchronize with updated code when resending my patchset. BR, --

[PATCH 1/8] tools lib bpf: add error functions

2016-10-16 Thread Eric Leblond
. Signed-off-by: Eric Leblond <e...@regit.org> --- tools/lib/bpf/libbpf.c | 11 +++ tools/lib/bpf/libbpf.h | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index b699aea..90932f1 100644 --- a/tools/lib/bpf/libbpf.c

[PATCH 6/8] tools lib bpf: improve warning

2016-10-16 Thread Eric Leblond
Signed-off-by: Eric Leblond <e...@regit.org> --- tools/lib/bpf/libbpf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 7cd341e..1fe4532 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -802,7

[PATCH 7/8] tools lib bpf: fix maps resolution

2016-10-16 Thread Eric Leblond
It is not correct to assimilate the elf data of the maps section to an array of map definition. In fact the sizes differ. The offset provided in the symbol section has to be used instead. This patch fixes a bug causing a elf with two maps not to load correctly. Signed-off-by: Eric Leblond &l

[PATCH 3/8] tools: Sync tools/include/uapi/linux/bpf.h with the kernel

2016-10-16 Thread Eric Leblond
Signed-off-by: Eric Leblond <e...@regit.org> --- tools/include/uapi/linux/bpf.h | 52 ++ 1 file changed, 52 insertions(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 9e5fc16..570287f 100644 --- a/tools/includ

[PATCH 2/8] uapi linux bpf: add max value to enum

2016-10-16 Thread Eric Leblond
It will be used to detect userspace trying to set invalid value. Signed-off-by: Eric Leblond <e...@regit.org> --- include/uapi/linux/bpf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index f09c70b..570287f 100644 --- a/includ

[PATCH 0/8] tools lib bpf: fixes and functional upgrade

2016-10-16 Thread Eric Leblond
| 12 +++- 7 files changed, 166 insertions(+), 34 deletions(-) Best regards, -- Eric Leblond

[PATCH 8/8] tools lib bpf: install header file

2016-10-16 Thread Eric Leblond
Makefile was not installing the header file of the library and a manual copy was needed to have a usable library on the system. Signed-off-by: Eric Leblond <e...@regit.org> --- tools/lib/bpf/Makefile | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/l

[PATCH 4/8] tools lib bpf: export function to set type

2016-10-16 Thread Eric Leblond
Current API was not allowing the user to set a type like socket filter. To avoid a setter function for each type, the patch simply exports a set function that takes the type in parameter. Signed-off-by: Eric Leblond <e...@regit.org> --- tools/lib/bpf/libbpf.c | 19 +-- too

[PATCH 5/8] tools lib bpf: add missing functions

2016-10-16 Thread Eric Leblond
Some functions were missing in the library to be able to use it in the case where the userspace is handling the maps in kernel. The patch also renames functions to have a homogeneous naming convention. Signed-off-by: Eric Leblond <e...@regit.org> --- tools/lib/bpf/bpf.c

[PATCH] tools lib bpf: improve warning

2017-08-20 Thread Eric Leblond
Signed-off-by: Eric Leblond <e...@regit.org> --- tools/lib/bpf/libbpf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 1cc3ea0ffdc3..35f6dfcdc565 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@

ixgbe tuning reset when XDP is setup

2017-12-15 Thread Eric Leblond
? Is there a known workaround for this issue ? BR, -- Eric Leblond <e...@regit.org>

net-next libbpf broken on prev kernel release

2017-12-14 Thread Eric Leblond
his a wanted behavior to have libbpf that needs to be in sync with kernel ? or should it be fixed ? BR, -- Eric Leblond <e...@regit.org>

[PATCH net-next] libbpf: add function to setup XDP

2017-12-09 Thread Eric Leblond
Most of the code is taken from set_link_xdp_fd() in bpf_load.c and slightly modified to be library compliant. Signed-off-by: Eric Leblond <e...@regit.org> --- tools/lib/bpf/bpf.c| 108 - tools/lib/bpf/libbpf.c | 2 + tools/lib/bpf/li

[PATCH bpf-next v4 1/3] libbpf: add function to setup XDP

2017-12-30 Thread Eric Leblond
Most of the code is taken from set_link_xdp_fd() in bpf_load.c and slightly modified to be library compliant. Signed-off-by: Eric Leblond <e...@regit.org> Acked-by: Alexei Starovoitov <a...@kernel.org> --- tools/lib/bpf/bpf.c| 126

[PATCH bpf-next v4 3/3] libbpf: add missing SPDX-License-Identifier

2017-12-30 Thread Eric Leblond
Signed-off-by: Eric Leblond <e...@regit.org> Acked-by: Alexei Starovoitov <a...@kernel.org> --- tools/lib/bpf/bpf.c| 2 ++ tools/lib/bpf/bpf.h| 2 ++ tools/lib/bpf/libbpf.c | 2 ++ tools/lib/bpf/libbpf.h | 2 ++ 4 files changed, 8 insertions(+) diff --git a/tools/lib/bpf/b

[PATCH bpf-next v4 0/3] libbpf: add function to setup XDP

2017-12-30 Thread Eric Leblond
Hello, This updated patchset address the remarks by Toshiaki Makita and Philippe Ombredanne: - fixes on errno handling - correct usage of SPDX header Best regards, -- Eric Leblond

[PATCH bpf-next v4 2/3] libbpf: add error reporting in XDP

2017-12-30 Thread Eric Leblond
Parse netlink ext attribute to get the error message returned by the card. Code is partially take from libnl. Signed-off-by: Eric Leblond <e...@regit.org> Acked-by: Alexei Starovoitov <a...@kernel.org> --- tools/lib/bpf/Build| 2 +- tools/lib/bpf/bpf.c| 10 ++- tools/lib/

[PATCH 3/4] libbpf: break loop earlier

2017-12-27 Thread Eric Leblond
Get out of the loop when we have a match. Signed-off-by: Eric Leblond <e...@regit.org> --- tools/lib/bpf/libbpf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 5fe8aaa2123e..d263748aa341 100644 --- a/tools/lib/bpf/libbpf.c +++ b

[PATCH 2/4] libbpf: add error reporting in XDP

2017-12-27 Thread Eric Leblond
Parse netlink ext attribute to get the error message returned by the card. Code is partially take from libnl. Signed-off-by: Eric Leblond <e...@regit.org> --- tools/lib/bpf/Build| 2 +- tools/lib/bpf/bpf.c| 9 +++ tools/lib/bpf/nlattr.c

[PATCH bpf-next v2 0/4] libbpf: add function to setup XDP

2017-12-27 Thread Eric Leblond
Hello, This patchset address the remark about license. It now uses libnl code as a base for the netlink parsing. The library seems to report error correctly when used over a netdevsim interface. I did not manage to test it on a real hardware. Best regards, -- Eric Leblond

[PATCH 4/4] libbpf: add missing SPDX-License-Identifier

2017-12-27 Thread Eric Leblond
Signed-off-by: Eric Leblond <e...@regit.org> --- tools/lib/bpf/bpf.c| 2 ++ tools/lib/bpf/bpf.h| 2 ++ tools/lib/bpf/libbpf.c | 2 ++ tools/lib/bpf/libbpf.h | 2 ++ 4 files changed, 8 insertions(+) diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c index cdfabbe118cc..9e53db

[PATCH 1/4] libbpf: add function to setup XDP

2017-12-27 Thread Eric Leblond
Most of the code is taken from set_link_xdp_fd() in bpf_load.c and slightly modified to be library compliant. Signed-off-by: Eric Leblond <e...@regit.org> --- tools/lib/bpf/bpf.c| 126 - tools/lib/bpf/libbpf.c | 2 + tools/lib/bpf/li

[PATCH bpf-next v5 2/4] libbpf: add error reporting in XDP

2018-01-04 Thread Eric Leblond
Parse netlink ext attribute to get the error message returned by the card. Code is partially take from libnl. Signed-off-by: Eric Leblond <e...@regit.org> Acked-by: Alexei Starovoitov <a...@kernel.org> --- samples/bpf/Makefile | 2 +- tools/lib/bpf/Build| 2 +- tools/l

[PATCH bpf-next v5 1/4] libbpf: add function to setup XDP

2018-01-04 Thread Eric Leblond
Most of the code is taken from set_link_xdp_fd() in bpf_load.c and slightly modified to be library compliant. Signed-off-by: Eric Leblond <e...@regit.org> Acked-by: Alexei Starovoitov <a...@kernel.org> --- tools/lib/bpf/bpf.c| 126

[PATCH bpf-next v5 4/4] samples/bpf: use bpf_set_link_xdp_fd

2018-01-04 Thread Eric Leblond
Use bpf_set_link_xdp_fd instead of set_link_xdp_fd to remove some code duplication and benefit of netlink ext ack errors message. Signed-off-by: Eric Leblond <e...@regit.org> --- samples/bpf/bpf_load.c | 102 samples/bpf/bpf_

[PATCH bpf-next v5 3/4] libbpf: add missing SPDX-License-Identifier

2018-01-04 Thread Eric Leblond
Signed-off-by: Eric Leblond <e...@regit.org> Acked-by: Alexei Starovoitov <a...@kernel.org> --- tools/lib/bpf/bpf.c| 2 ++ tools/lib/bpf/bpf.h| 2 ++ tools/lib/bpf/libbpf.c | 2 ++ tools/lib/bpf/libbpf.h | 2 ++ 4 files changed, 8 insertions(+) diff --git a/tools/lib/bpf/b

[PATCH bpf-next v6 1/4] libbpf: add function to setup XDP

2018-01-18 Thread Eric Leblond
Most of the code is taken from set_link_xdp_fd() in bpf_load.c and slightly modified to be library compliant. Signed-off-by: Eric Leblond <e...@regit.org> Acked-by: Alexei Starovoitov <a...@kernel.org> --- tools/lib/bpf/bpf.c| 126

[PATCH bpf-next v6 3/4] libbpf: add missing SPDX-License-Identifier

2018-01-18 Thread Eric Leblond
Signed-off-by: Eric Leblond <e...@regit.org> Acked-by: Alexei Starovoitov <a...@kernel.org> --- tools/lib/bpf/bpf.c| 2 ++ tools/lib/bpf/bpf.h| 2 ++ tools/lib/bpf/libbpf.c | 2 ++ tools/lib/bpf/libbpf.h | 2 ++ 4 files changed, 8 insertions(+) diff --git a/tools/lib/bpf/b

[PATCH bpf-next v7 5/5] samples/bpf: use bpf_set_link_xdp_fd

2018-01-24 Thread Eric Leblond
Use bpf_set_link_xdp_fd instead of set_link_xdp_fd to remove some code duplication and benefit of netlink ext ack errors message. Signed-off-by: Eric Leblond <e...@regit.org> --- samples/bpf/bpf_load.c | 102 samples/bpf/bpf_

[PATCH bpf-next v7 0/5] libbpf: add XDP setup support

2018-01-24 Thread Eric Leblond
Hello, This patchset fixes the problem found by Alexei when building libbpf on a system with old headers. It has been tested on an old Ubuntu and seems to behave fine. Best regards, -- Eric

[PATCH bpf-next v7 4/5] libbpf: add missing SPDX-License-Identifier

2018-01-24 Thread Eric Leblond
Signed-off-by: Eric Leblond <e...@regit.org> Acked-by: Alexei Starovoitov <a...@kernel.org> --- tools/lib/bpf/bpf.c| 2 ++ tools/lib/bpf/bpf.h| 2 ++ tools/lib/bpf/libbpf.c | 2 ++ tools/lib/bpf/libbpf.h | 2 ++ 4 files changed, 8 insertions(+) diff --git a/tools/lib/bpf/b

[PATCH bpf-next v7 1/5] tools: import netlink header in tools uapi

2018-01-24 Thread Eric Leblond
The header is necessary for libbpf compilation on system with older version of the headers. Signed-off-by: Eric Leblond <e...@regit.org> --- tools/include/uapi/linux/netlink.h | 251 + tools/lib/bpf/Makefile | 3 + 2 files changed, 254 inse

[PATCH bpf-next v7 3/5] libbpf: add error reporting in XDP

2018-01-24 Thread Eric Leblond
the inclusion. Using a direct define could have been an issue as NLMSGERR_ATTR_MAX can change in the future. We also define SOL_NETLINK if not defined to avoid to have to copy socket.h for a fixed value. Signed-off-by: Eric Leblond <e...@regit.org> Acked-by: Alexei Starovoitov <a...@kernel.org>

[PATCH bpf-next v7 2/5] libbpf: add function to setup XDP

2018-01-24 Thread Eric Leblond
Most of the code is taken from set_link_xdp_fd() in bpf_load.c and slightly modified to be library compliant. Signed-off-by: Eric Leblond <e...@regit.org> Acked-by: Alexei Starovoitov <a...@kernel.org> --- tools/lib/bpf/bpf.c| 127

[PATCH bpf-next v8 5/5] samples/bpf: use bpf_set_link_xdp_fd

2018-01-30 Thread Eric Leblond
Use bpf_set_link_xdp_fd instead of set_link_xdp_fd to remove some code duplication and benefit of netlink ext ack errors message. Signed-off-by: Eric Leblond <e...@regit.org> --- samples/bpf/bpf_load.c | 102 samples/bpf/bpf_

[PATCH bpf-next v8 0/5] libbpf: add XDP binding support

2018-01-30 Thread Eric Leblond
Hello Daniel, No problem with the delay in the answer. I'm doing far worse. Here is an updated version: - add if_link.h in uapi and remove the definition - fix a commit message - remove uapi from a include Best Regards, -- Eric

[PATCH bpf-next v8 1/5] tools: add netlink.h and if_link.h in tools uapi

2018-01-30 Thread Eric Leblond
The headers are necessary for libbpf compilation on system with older version of the headers. Signed-off-by: Eric Leblond <e...@regit.org> --- tools/include/uapi/linux/if_link.h | 943 + tools/include/uapi/linux/netlink.h | 251 ++ tools/l

[PATCH bpf-next v8 3/5] libbpf: add error reporting in XDP

2018-01-30 Thread Eric Leblond
the inclusion. Using a direct define could have been an issue as NLMSGERR_ATTR_MAX can change in the future. We also define SOL_NETLINK if not defined to avoid to have to copy socket.h for a fixed value. Signed-off-by: Eric Leblond <e...@regit.org> Acked-by: Alexei Starovoitov <a...@kernel.org>

[PATCH bpf-next v8 4/5] libbpf: add missing SPDX-License-Identifier

2018-01-30 Thread Eric Leblond
Signed-off-by: Eric Leblond <e...@regit.org> Acked-by: Alexei Starovoitov <a...@kernel.org> --- tools/lib/bpf/bpf.c| 2 ++ tools/lib/bpf/bpf.h| 2 ++ tools/lib/bpf/libbpf.c | 2 ++ tools/lib/bpf/libbpf.h | 2 ++ 4 files changed, 8 insertions(+) diff --git a/tools/lib/bpf/b

[PATCH bpf-next v8 2/5] libbpf: add function to setup XDP

2018-01-30 Thread Eric Leblond
Most of the code is taken from set_link_xdp_fd() in bpf_load.c and slightly modified to be library compliant. Signed-off-by: Eric Leblond <e...@regit.org> Acked-by: Alexei Starovoitov <a...@kernel.org> --- tools/lib/bpf/bpf.c| 122

Re: [PATCH bpf-next v7 2/5] libbpf: add function to setup XDP

2018-01-27 Thread Eric Leblond
Hi, On Sat, 2018-01-27 at 02:23 +0100, Daniel Borkmann wrote: > On 01/25/2018 01:05 AM, Eric Leblond wrote: > > Most of the code is taken from set_link_xdp_fd() in bpf_load.c and > > slightly modified to be library compliant. > > > > Signed-off-by: Eric Leblond

Re: [PATCH bpf-next v7 3/5] libbpf: add error reporting in XDP

2018-01-27 Thread Eric Leblond
Hi, On Sat, 2018-01-27 at 02:28 +0100, Daniel Borkmann wrote: > On 01/25/2018 01:05 AM, Eric Leblond wrote: > > Parse netlink ext attribute to get the error message returned by > > the card. Code is partially take from libnl. > > > > We add netlink.h to the uapi in

Re: [bpf-next PATCH 5/5] tools/libbpf: handle issues with bpf ELF objects containing .eh_frames

2018-01-28 Thread Eric Leblond
he name of the relocation > section, to skip that too. I confirm this fixes the issue I have seen when loading XDP filter with libbpf in Suricata. BR, -- Eric Leblond <e...@regit.org> Blog: https://home.regit.org/

Re: [suricata PATCH 1/3] suricata/ebpf: take clang -target bpf include issue of stdint.h into account

2018-02-07 Thread Eric Leblond
CLANG} -Wall $(BPF_CFLAGS) -O2 \ + -I/usr/include/$(host_cpu)-$(host_os)/ \ -D__KERNEL__ -D__ASM_SYSREG_H \ -target bpf -S -emit-llvm $< -o ${@:.bpf=.ll} # From LLVM-IR to BPF-bytecode in ELF-obj file Let me know if it is ok for you. Best regards, -- Eric Leblond <e...@regit.org>

Re: [suricata PATCH 0/3] Suricata cleanup makefile

2018-02-07 Thread Eric Leblond
d I will do a Pull Request on github. Thanks a lot for that, that's a really valuable help! BR, -- Eric Leblond <e...@regit.org>

[PATCH bpf-next 1/3] libbpf: add function to setup XDP

2017-12-25 Thread Eric Leblond
Most of the code is taken from set_link_xdp_fd() in bpf_load.c and slightly modified to be library compliant. Signed-off-by: Eric Leblond <e...@regit.org> --- tools/lib/bpf/bpf.c| 126 - tools/lib/bpf/libbpf.c | 2 + tools/lib/bpf/li

[PATCH bpf-next 2/3] libbpf: add error reporting in XDP

2017-12-25 Thread Eric Leblond
Parse netlink ext attribute to get the error message returned by the card. Signed-off-by: Eric Leblond <e...@regit.org> --- tools/lib/bpf/Build| 2 +- tools/lib/bpf/bpf.c| 9 +++ tools/lib/bpf/nlattr.c | 188 + tools/lib/bpf/nl

[PATCH bpf-next 0/3] add XDP loading support to libbpf

2017-12-25 Thread Eric Leblond
Hello, This patchset adds a function to load XDP eBPF file in the libbpf library. It gets the netlink extended ack from the driver in case of failure and print the error to stderr. Best regards, -- Eric Leblond

[PATCH bpf-next 3/3] libbpf: break loop earlier

2017-12-25 Thread Eric Leblond
Get out of the loop when we have a match. Signed-off-by: Eric Leblond <e...@regit.org> --- tools/lib/bpf/libbpf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 5fe8aaa2123e..d263748aa341 100644 --- a/tools/lib/bpf/libbpf.c +++ b

Re: [PATCH 3/4] libbpf: break loop earlier

2017-12-27 Thread Eric Leblond
Hello, On Wed, 2017-12-27 at 11:00 -0800, Alexei Starovoitov wrote: > On Wed, Dec 27, 2017 at 07:02:28PM +0100, Eric Leblond wrote: > > Get out of the loop when we have a match. > > > > Signed-off-by: Eric Leblond <e...@regit.org> > > --- > > tools/lib/bp

[PATCH bpf-next v3 2/3] libbpf: add error reporting in XDP

2017-12-28 Thread Eric Leblond
Parse netlink ext attribute to get the error message returned by the card. Code is partially take from libnl. Signed-off-by: Eric Leblond <e...@regit.org> Acked-by: Alexei Starovoitov <a...@kernel.org> --- tools/lib/bpf/Build| 2 +- tools/lib/bpf/bpf.c| 9 +++ tools/lib/

[PATCH bpf-next v3 3/3] libbpf: add missing SPDX-License-Identifier

2017-12-28 Thread Eric Leblond
Signed-off-by: Eric Leblond <e...@regit.org> Acked-by: Alexei Starovoitov <a...@kernel.org> --- tools/lib/bpf/bpf.c| 2 ++ tools/lib/bpf/bpf.h| 2 ++ tools/lib/bpf/libbpf.c | 2 ++ tools/lib/bpf/libbpf.h | 2 ++ 4 files changed, 8 insertions(+) diff --git a/tools/lib/bpf/b

[PATCH bpf-next v3 1/3] libbpf: add function to setup XDP

2017-12-28 Thread Eric Leblond
Most of the code is taken from set_link_xdp_fd() in bpf_load.c and slightly modified to be library compliant. Signed-off-by: Eric Leblond <e...@regit.org> Acked-by: Alexei Starovoitov <a...@kernel.org> --- tools/lib/bpf/bpf.c| 126

[PATCH bpf-next v3 0/3] libbpf: add XDP setup support

2017-12-28 Thread Eric Leblond
Hello, This patchset adds support for loading eBPF code as XDP filter. Best regards, -- Eric Leblond

Re: [PATCH bpf-next v4 1/3] libbpf: add function to setup XDP

2018-01-03 Thread Eric Leblond
Hello, On Sat, 2017-12-30 at 21:41 +0100, Eric Leblond wrote: > Most of the code is taken from set_link_xdp_fd() in bpf_load.c and > slightly modified to be library compliant. I've just discovered this patch is breaking the build of samples/bpf/ (nlattr not included at least and some in

Re: [PATCH bpf-next v5 2/4] libbpf: add error reporting in XDP

2018-01-18 Thread Eric Leblond
Hi, Sorry for the delay, missed the mail. On Sat, 2018-01-06 at 22:16 +0100, Daniel Borkmann wrote: > On 01/04/2018 09:21 AM, Eric Leblond wrote: > > Parse netlink ext attribute to get the error message returned by > > the card. Code is partially take from libnl. > > &g

[PATCH bpf-next v6 4/4] samples/bpf: use bpf_set_link_xdp_fd

2018-01-18 Thread Eric Leblond
Use bpf_set_link_xdp_fd instead of set_link_xdp_fd to remove some code duplication and benefit of netlink ext ack errors message. Signed-off-by: Eric Leblond <e...@regit.org> --- samples/bpf/bpf_load.c | 102 samples/bpf/bpf_

[PATCH bpf-next v6 2/4] libbpf: add error reporting in XDP

2018-01-18 Thread Eric Leblond
Parse netlink ext attribute to get the error message returned by the card. Code is partially take from libnl. Signed-off-by: Eric Leblond <e...@regit.org> Acked-by: Alexei Starovoitov <a...@kernel.org> --- samples/bpf/Makefile | 2 +- tools/lib/bpf/Build| 2 +- tools/l

[PATCH bpf-next 0/4] libbpf: add XDP binding support

2018-01-18 Thread Eric Leblond
Hello, This patchset rebases the libbpf code on latest bpf-next code and addresses remarks by Daniel. Best regards, -- Eric Leblond

Re: [RFC PATCH v2 00/14] Introducing AF_XDP support

2018-03-28 Thread Eric Leblond
ver does not have support for XDP, or XDP_SKB is explicitly chosen ... Thanks a lot for this work, I'm gonna try to implement this in Suricata. Best regards, -- Eric Leblond