Update the xdp-tools submodule version to the newest upstream. Among other
things, this contains some build fixes for newer versions of libbpf.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
The defines.mk file always set -DDEBUG, inherited from the xdp-tools build
system. However, the configure script in this repository doesn't actually
support the PRODUCTION variable, so change the define to only set -DDEBUG
if a DEBUG variable is supplied to 'make'. This way DEBUG can be turned on
with a command-line DEBUG=1 parameter to 'make', but will be unset
otherwise.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
This updates the xdp-tools embedded version to fix an issue with the
feature testing of the custom libbpf copy that the bpf-examples repository
is using.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Update the xdp-tools submodule version; in particular, this there's a
bugfix for AF_XDP that wasn't in the submodule version.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
No reason to keep using the old version, updating doesn't even require
any other source code changes.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
This contains a fix to the xdp-tools configure script so it works with the
Dash shell used on Debian and derivatives.
Fixes#50.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Update the version of xdp-tools to pull in some configure changes that
makes interoperating between a libbpf submodule and an xdp-tools submodule
work better, and set the LIBBPF_UNBUILT variable in the top-level configure
to enables this support.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Include logging.{h,c} from xdp-tools so utilities can use them for setting
libxdp and libbpf logging.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Pull the latest version of xdp-tools into the submodule. Change the
wildcard pattern for libxdp to not include the XDP programs to avoid
constantly recompiling it.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Instead of having the someone redundantly named 'lib/lib-install' folder,
let's rename it to just 'lib/install', and drop the 'usr/' prefix of the
files installed into that directory. Also, to simplify the configure
script, check in the directory to git so it's always present, and always
include it in the include and linker paths. On clean we just clear out the
contents.
Also, copy over libbpf.a to lib/install/lib alongside libxdp.a instead of
putting libbpf/src in the linker path.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
This adds libxdp as a submodule and link target alongside libbpf. This
should make it just as easy for examples to use libxdp as it currently is
for libbpf. Some hoops need to be jumped through to make libxdp link
against the same version of libbpf as the one we use in this repository.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Update the libbpf submodule to the latest version, and update the configure
script so we check for the newer bpf_object__next_program() helper (to fix
deprecation warnings).
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
This USER_TARGETS_OBJS_DEPS allows makefiles to define
dependencies for USER_TARGETS_OBJS targets.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
This allows including Makefile to define USER_TARGETS_OBJS
that contain code that USER_TARGETS depend on and needs
to be compiled as objects and later linked with.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Seems some distributions will change the clang version output to be
something like 'Ubuntu clang version
12.0.1-++20210918042554+fed41342a82f-1~exp1~20210918143322.141'. Fix the
version parsing in configure to not barf on such weird version strings.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Remember that xdp-project have fork of libbpf we use
https://github.com/xdp-project/libbpf
Synced to this libbpf via running command:
git submodule update --remote
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Use a JSON-writer library from iproute instead of complicated printf
statement. Also output timestamp, rtt and min_rtt as integers in
nanoseconds, rather than floats in seconds.
Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
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>
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>
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>
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>