Commit Graph

11 Commits

Author SHA1 Message Date
Toke Høiland-Jørgensen
b0536ce4ec lib: Add lib/util for adding utility library code
Add the directory and Makefile rules to prepare for storing library
functions in lib/util like we do in xdp-tools. With this, library code can
be added by just dropping the .c and .h into lib/util and updating
lib/util/util.mk with the object name.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
2021-06-01 17:16:24 +02:00
Toke Høiland-Jørgensen
30a6d54da8 lib/libbpf: update to latest upstream version
This updates the libbpf submodule to the latest upstream version, which
notably includes the new API for directly attaching TC programs without
shelling out to the 'tc' binary.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
2021-06-01 17:00:01 +02:00
Toke Høiland-Jørgensen
0e7c5d03da lib/common.mk: Depend on all header files in include/ and headers/
The wildcards picking up header files only included specific subdirectories
of include/ and headers/. There are actually files in multiple subdirs,
though, so just expand the wildcard to include all subdirectories to make
sure objects are rebuilt properly.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
2021-06-01 16:56:30 +02:00
Jesper Dangaard Brouer
5cf96508df Move parsing_helpers.h into new include directory
Adjust makefile construct to use the new include direcory.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
2021-02-09 17:03:55 +01:00
Jesper Dangaard Brouer
74e549520a Change libbpf install location to fix "dirty" submodule
When installing libbpf headers into 'lib/libbpf/src/root/' then the git
submodule for libbpf is marked dirty. This result in stgit complains under
different operations.

This patch fix the issue by installing libbpf outside submodule directory.
Choose directory 'lib/libbpf-install/' to emphasize relation to 'lib/libbpf/'.

V2: Don't install the library only the header files as before. Also
installing the should be a separate commit.  Patch still statically
link with libbpf/src/libbpf.a.

Signed-off-by: Jesper Dangaard Brouer <netoptimizer@brouer.com>
2021-01-13 18:31:45 +01:00
Toke Høiland-Jørgensen
378dcd476b Update libbpf submodule to latest upstream 2021-01-12 21:45:03 +01:00
Toke Høiland-Jørgensen
f0fce8f62b Update kernel headers and libbpf version
This makes the encap-forward example compile and fixes #3.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
2020-11-25 11:19:24 +01:00
Toke Høiland-Jørgensen
bc91d4d456 encap-forward: Support conditional IPv6 encapsulation with IPV6=1
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
2020-10-07 13:35:38 +02:00
Toke Høiland-Jørgensen
e08a4e085d lib/testenv: Don't get iface MAC address before we need it
Resolves a race condition where the MAC can change

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
2020-10-06 17:13:44 +02:00
Toke Høiland-Jørgensen
b7544155f7 Add lib/Makefile
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
2020-10-06 15:59:44 +02:00
Toke Høiland-Jørgensen
4513664ca3 Initial import with encap-forward example
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
2020-10-06 15:53:55 +02:00