Signed-off-by: Eric Leblond
Acked-by: Alexei Starovoitov
---
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 9c88f6e4156d
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
Acked-by: Alexei Starovoitov
---
tools/lib/bpf/bpf.c| 122 +
tools/lib/bpf/libbpf.c | 2 +
tools/lib
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
Acked-by: Alexei Starovoitov
---
samples/bpf/Makefile | 2 +-
tools/lib
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
---
samples/bpf/bpf_load.c | 102
samples/bpf/bpf_load.h | 2 +-
samples
The headers are necessary for libbpf compilation on system with older
version of the headers.
Signed-off-by: Eric Leblond
---
tools/include/uapi/linux/if_link.h | 943 +
tools/include/uapi/linux/netlink.h | 251 ++
tools/lib/bpf/Makefile
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
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 inclu
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
>
Signed-off-by: Eric Leblond
Acked-by: Alexei Starovoitov
---
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 765fd95b0657
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
Acked-by: Alexei Starovoitov
remote rtne
Signed-off-by: Eric Leblond
The header is necessary for libbpf compilation on system with older
version of the headers.
Signed-off-by: Eric Leblond
---
tools/include/uapi/linux/netlink.h | 251 +
tools/lib/bpf/Makefile | 3 +
2 files changed, 254 insertions(+)
create mode
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
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
Acked-by: Alexei Starovoitov
---
tools/lib/bpf/bpf.c| 127 +
tools/lib/bpf/libbpf.c | 2 +
tools/lib
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
---
samples/bpf/bpf_load.c | 102
samples/bpf/bpf_load.h | 2 +-
samples
Parse netlink ext attribute to get the error message returned by
the card. Code is partially take from libnl.
Signed-off-by: Eric Leblond
Acked-by: Alexei Starovoitov
---
samples/bpf/Makefile | 2 +-
tools/lib/bpf/Build| 2 +-
tools/lib/bpf/bpf.c| 8 +++
tools/lib/bpf/nlattr.c
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
Acked-by: Alexei Starovoitov
---
tools/lib/bpf/bpf.c| 126 +
tools/lib/bpf/libbpf.c | 2 +
tools/lib
Hello,
This patchset rebases the libbpf code on latest bpf-next code and addresses
remarks by Daniel.
Best regards,
--
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
---
samples/bpf/bpf_load.c | 102
samples/bpf/bpf_load.h | 2 +-
samples
Signed-off-by: Eric Leblond
Acked-by: Alexei Starovoitov
---
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 4517dce6849d
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
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
---
samples/bpf/bpf_load.c | 102
samples/bpf/bpf_load.h | 2 +-
samples
Signed-off-by: Eric Leblond
Acked-by: Alexei Starovoitov
---
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 10d71b9fdbd0
Parse netlink ext attribute to get the error message returned by
the card. Code is partially take from libnl.
Signed-off-by: Eric Leblond
Acked-by: Alexei Starovoitov
---
samples/bpf/Makefile | 2 +-
tools/lib/bpf/Build| 2 +-
tools/lib/bpf/bpf.c| 10 ++-
tools/lib/bpf/nlattr.c
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
Acked-by: Alexei Starovoitov
---
tools/lib/bpf/bpf.c| 126 +
tools/lib/bpf/libbpf.c | 2 +
tools/lib
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 so
Signed-off-by: Eric Leblond
Acked-by: Alexei Starovoitov
---
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 ceb20c5cae3b
Parse netlink ext attribute to get the error message returned by
the card. Code is partially take from libnl.
Signed-off-by: Eric Leblond
Acked-by: Alexei Starovoitov
---
tools/lib/bpf/Build| 2 +-
tools/lib/bpf/bpf.c| 10 ++-
tools/lib/bpf/nlattr.c | 187
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
Acked-by: Alexei Starovoitov
---
tools/lib/bpf/bpf.c| 126 -
tools/lib/bpf/libbpf.c | 2 +
tools/lib
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
Signed-off-by: Eric Leblond
Acked-by: Alexei Starovoitov
---
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
Hello,
This patchset adds support for loading eBPF code as XDP filter.
Best regards,
--
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
Acked-by: Alexei Starovoitov
---
tools/lib/bpf/bpf.c| 126 -
tools/lib/bpf/libbpf.c | 2 +
tools/lib
Parse netlink ext attribute to get the error message returned by
the card. Code is partially take from libnl.
Signed-off-by: Eric Leblond
Acked-by: Alexei Starovoitov
---
tools/lib/bpf/Build| 2 +-
tools/lib/bpf/bpf.c| 9 +++
tools/lib/bpf/nlattr.c | 187
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
> > ---
> > tools/lib/bpf/libbpf.c | 1 +
Get out of the loop when we have a match.
Signed-off-by: Eric Leblond
---
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/tools/lib/bpf/libbpf.c
Signed-off-by: Eric Leblond
---
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..9e53dbbca2bd 100644
--- a/tools
Parse netlink ext attribute to get the error message returned by
the card. Code is partially take from libnl.
Signed-off-by: Eric Leblond
---
tools/lib/bpf/Build| 2 +-
tools/lib/bpf/bpf.c| 9 +++
tools/lib/bpf/nlattr.c | 187 +
tools
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
---
tools/lib/bpf/bpf.c| 126 -
tools/lib/bpf/libbpf.c | 2 +
tools/lib/bpf/libbpf.h | 4 ++
3 files
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
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
Get out of the loop when we have a match.
Signed-off-by: Eric Leblond
---
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/tools/lib/bpf/libbpf.c
Parse netlink ext attribute to get the error message returned by
the card.
Signed-off-by: Eric Leblond
---
tools/lib/bpf/Build| 2 +-
tools/lib/bpf/bpf.c| 9 +++
tools/lib/bpf/nlattr.c | 188 +
tools/lib/bpf/nlattr.h | 164
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
---
tools/lib/bpf/bpf.c| 126 -
tools/lib/bpf/libbpf.c | 2 +
tools/lib/bpf/libbpf.h | 4 ++
3 files
Hello,
On Sat, 2017-12-09 at 15:57 -0800, Jakub Kicinski wrote:
> On Sat, 9 Dec 2017 15:43:15 +0100, Eric Leblond wrote:
> > + for (nh = (struct nlmsghdr *)buf; NLMSG_OK(nh, len);
> > +nh = NLMSG_NEXT(nh, len)) {
> > + if (nh
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
---
tools/lib/bpf/bpf.c| 108 -
tools/lib/bpf/libbpf.c | 2 +
tools/lib/bpf/libbpf.h | 4 ++
3 files
Commit-ID: 4708bbda5cb2f6cdc331744597527143f46394d5
Gitweb: http://git.kernel.org/tip/4708bbda5cb2f6cdc331744597527143f46394d5
Author: Eric Leblond
AuthorDate: Tue, 15 Nov 2016 04:05:47 +
Committer: Arnaldo Carvalho de Melo
CommitDate: Fri, 25 Nov 2016 11:27:33 -0300
tools lib bpf
s patch 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,
--
Eric Leblond
Blog: https://home.regit.org/
Signed-off-by: Eric Leblond
---
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 +802,8
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
---
tools/lib/bpf/libbpf.c | 19 +--
tools/lib/bpf/libbpf.h
ols/lib/bpf/libbpf.h | 12 +++-
7 files changed, 166 insertions(+), 34 deletions(-)
Best regards,
--
Eric Leblond
s
API.
Signed-off-by: Eric Leblond
---
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
+++ b/tools/li
Signed-off-by: Eric Leblond
---
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/include/uapi/linux/bpf.h
+++ b
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
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
---
tools/lib/bpf/Makefile | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/tools/lib/bpf/Makefile b/tools
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
---
tools/lib/bpf/bpf.c| 35
It will be used to detect userspace trying to set invalid value.
Signed-off-by: Eric Leblond
---
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/include/uapi/linux/bpf.h
+++ b
Hi,
This patch adds support for Sierra Wireless AC850 which has the same Ids
as the AC710/750 but has a different firmware.
PS: Please CC answer as I've not subscribed to the list.
BR,
--
Eric Leblond <[EMAIL PROTECTED]>
INL SARL
Signed-off-by: Eric Leblond <[EMAIL PROTECTED]
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 an
58 matches
Mail list logo