Commit Graph

625 Commits

Author SHA1 Message Date
Tirthendu Sarkar
66c0394d7c xdpsock: add rx/tx counters for frags
Signed-off-by: Tirthendu Sarkar <tirthendu.sarkar@intel.com>
2023-09-21 10:46:31 +02:00
Tirthendu Sarkar
f63c7633cc headers/linux: update if_xdp.h from kernel v6.5.0+
Signed-off-by: Tirthendu Sarkar <tirthendu.sarkar@intel.com>
2023-09-21 08:32:53 +02:00
Tirthendu Sarkar
e5a12a2a72 AF_XDP-example: add multi-buffer support to xdpsock
* Add support for handling multi-buffer packets.
* Add a new CLI option to enable frag support.
* xdpsock_kern.c is modified to use num_socks as updated by userspace
  application.
* MAX_PKT_SIZE is set as 9728 as supported by many NICs.
* xdpsock_kern.o is loaded for both frags and shared uemem cases.

Signed-off-by: Tirthendu Sarkar <tirthendu.sarkar@intel.com>
2023-09-11 18:38:17 +02:00
Toke Høiland-Jørgensen
bc9df640cb Merge pull request #91 from simosund/pping-systemd
Add systemd unit files for ePPing setup
2023-08-07 15:48:29 +02:00
Simon Sundberg
f423e39d6b pping: Change single pping-service into generic template
Replace the systemd unit files that needed to be modified for a
specific interface with template files. The template files allows one
to instansiate a service for any interface (by running systemctl
start pping@<interface>.service), and multiple interfaces can be
monitored at once.

Each instance maintains a separtate "log" of data at
/sys/var/log/pping/<interface>/pping.<interface>.json which is rotated
one per minute (see the rotate-pping@.timer file) and placed in daily
subfolders.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-08 18:05:31 +02:00
Simon Sundberg
c6751effb0 pping: Add script for cleaing up leftover tc programs
In case ePPing is not shut down cleanly (ex. when killed with SIGKILL
or OOM killer) it will not be able to detach its eBPF programs, may
remain attached and waste resources. Add a script which can be used
to clean up any remaining programs tc-eBPF programs.

Note, this script should not be run while the any instace of pping is
still running, as that will remove its tc programs and thus its
ability to function properly.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-08 16:17:24 +02:00
Simon Sundberg
6582f6713c pping: Add systemd unit files for running pping
Add some example files for setting up ePPing with systemd.
The setup creates "log" files in /var/log/pping and rotates
them every minute (appending a date at the time of rotation).

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-08 16:17:24 +02:00
Toke Høiland-Jørgensen
4b677fd715 Merge pull request #59 from simosund/pping-agg-prototype
Add aggregation option to ePPing
2023-07-07 16:26:06 +02:00
Simon Sundberg
59310e8ead pping: Preallocate memory for aggregation maps
When maps are not preallocated, the creation of map entries may
sometimes unpredictably fail with ENOMEM, despite plenty of free
memory being available. Solving this memory allocation issue may take
some time, so in the mean time let's just preallocate the memory for
the aggregation maps as well.

Preallocating the maps means the memory usage will be the same
regardless of the amount of traffic actually observed (i.e. regardless
of the number of aggregation entries that need to be created). To
compensate for this higher out-of-the-box memory usage, decrease the
histogram resolution from 1000 1ms bins to 250 4ms bins.

The memory usage (for the aggregation maps) should be approximately:
(56 + NR_BINS * 4) * CPUS * MAP_AGGREGATION_SIZE * 4

With the current values, that translates to roughly 66 MiB per CPU
core (down from ~254 MiB/core with 1000 bins).

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-06 18:01:57 +02:00
Simon Sundberg
aadc7535c1 pping: Reopen output file on SIGHUP
Make the user space process reopen the output file (if used with the
-w/--write option) when it recieves a SIGHUP signal. This makes it
possible to for example rotate the output files with logrotate.

In case the program receives the SIGHUP signal is BEFORE the output
file has been moved, the program will throw a warning and then
continue writing to its current file handle until another SIGHUP
signal is received.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-06 18:01:57 +02:00
Simon Sundberg
965d34ffae pping: Add option to write to file
Add an option -w/--write <filename> which writes the output to the
provided file instead of to stdout. Fail if file the provided file
already exists to avoid data loss (if truncating file) or corrupting
data (if appending file, JSON is not concatable).

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-06 18:01:57 +02:00
Simon Sundberg
1e704be790 pping: Refactor output handling
Refactor code for various output functions to avoid hard-coding stdout
and relying on global variables. Collect output-related parameters
into a new output_context struct which can easily be passed as an
explicit argument to output related functions. Get rid of the global
json_ctx and print_event_func variables, as corresponding information
is now included in the output_context which is directly passed to the
required functions.

Overall, these changes aim to make it more flexible how and where
output is written. This will make it easier to for example add support
for writing directly to files in the future.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-06 18:01:57 +02:00
Simon Sundberg
1319871358 pping: Add aggregation configuration to output
Add an initial entry containing information about the settings used
for the aggregation. For the standard output format it reuses the
message that was previously written to stderr (but is now written to
stdout), while for the json format it adds a more detailed json entry.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-06 18:01:57 +02:00
Simon Sundberg
46f5913e6f pping: Truncate aggregation histograms
In many scenarios, the upper range of an aggregation histogram may be
empty (ex. max histogram bins is for 1000ms but highest observed RTT
was 100 ms, leaving 900 trailing empty bins). As trailing empty bins
contain no useful information, simply truncate the histograms to the
highest non-empty bin.

The truncation of histograms has two benefits.

1. It avoids unnecessary processing of empty bins when internally
calculating statics from the histograms. This should not have any
impact on the output.

2. It reduces the size of the histogram in the JSON output
format. This can potentially save a lot of space in instances where
most maximum observed RTT for a prefix during an aggregation interval
is significantly lower than the highest histogram bin. Removing
trailing empty bins (unlike non-trailing ones) does not require
encoding any additional information (like the number of removed bins
or the index of the remaining ones). It can also never make the
histogram take up more space. Thus there are no obvious drawbacks with
"compressing" the histograms in this manner.

In the future it may be relevant to implement other ways to compress
the histograms, which may be more efficient for certain
distributions (ex. very sparse histograms). However as this method of
removing trailing empty bins is both simple and without drawbacks, so
it makes sense to make the default behavior for now.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-06 18:01:57 +02:00
Simon Sundberg
e9db312ad5 pping: Add fallback entry for aggregation maps
The aggregation maps may become full, in which case the BPF programs
will fail to create new entries for any IP-prefixes not currently in
the map. This would previously result in stats from traffic that
cannot fit into any aggregation entry to be missed.

Add a fallback entry for each map, so that in case the aggregation map
is full stats from any new IP-prefix will be added to this fallback
entry instead. The fallback entry is reported as 0.0.0.0/0 (for IPv4)
or ::/0 (for IPv6) in the output.

Note that this is implemented by adding specific "magic values" as
special keys in the aggregation maps (see IPV{4,6}_BACKUP_KEY in
pping.h). These special keys have been selected so that no real
traffic should collide with them by using prefixes from blocks
reserved for documentation. Furthermore, these entries are added by
the user space program AFTER the BPF programs are attached (as it's
not possible to do it in-between loading and attaching when using
libxdp). In case the BPF programs manage to fill the maps before the
user space component can create the backup entries, it will fail and
abort the program.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-06 18:01:57 +02:00
Simon Sundberg
2224edf85e pping: Add packet and byte counts to aggregated output
In addition to RTTs, also aggregate no. packets and bytes
transmitted and received for each IP-prefix. If both the src and dst
IP address of a packet is within the same IP-prefix, it will be
counted as both sent to and received by that prefix.

The packet stats are added for all successfully parsed
packets (i.e. packets that contain a valid identifier of some sort),
regardless of if the packet actually produces a valid RTT sample. This
means some IP-prefixes may only have packet stats, and no RTT stats,
so only output the packet stats in those instances. From a performance
perspective, it also means each BPF program needs to perform two
lookups of the aggregation map (one for src IP and one for dst IP) for
every packet that is successfully parsed. This is a substantial
increase from only having to perform a single lookup on the subset of
packets that produce an RTT sample.

Packets that are not successfully parsed (i.e. they don't contain a
valid identifier, e.g. UDP traffic) are still ignored to minimize
overhead, and will therefore not be included in the aggregated packet
stats. This means the aggregated packet stats may not include all
traffic for an IP-prefix. Future commits may add some counters to also
account for traffic that is not fully parsed.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-06 18:01:57 +02:00
Simon Sundberg
e5b6c55f42 pping: Add pkt_len to packet_info
Add a field with the total packet length (including all headers) to
the packet_info struct. This information will be needed in later
commits which add byte counts to the aggregated information.

Note that this information is already part of the parsing_context
struct, but this won't be available after the packet has been
parsed (once the parse_packet_identifier_{tc,xdp}() function have
finished). It is unfortunately not trivial to replace current instaces
which use pkt_len from the parsing_context to instead take it from
packet_info, as ex. the parse_tcp_identifier() already takes 5
arguments, and packet_info is not one of them. Therefore, keep both
the pkt_len in parsing_context and packet_info for now.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-06 18:01:57 +02:00
Simon Sundberg
0f6042bf0c pping: Expire old aggregation prefixes
Keep track of when the last update was made to each IP-prefix in the
aggregation map, and delete entries which are older than
--aggregate-timeout (30 seconds by default). If the user specifies
zero (0), that is interpreted as never expire an entry (which is
consistent with how the --cleanup-interval operates).

Note that as the BPF programs rotate between two maps (an active one
for BPF progs to use, and an inactive one the user space can operate
on), it may expire an aggregation prefix from one of the maps even if
it has seen recent action in the other map.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-06 18:01:57 +02:00
Simon Sundberg
ec92f5a91f pping: Add JSON format for aggregation
Add support for outputing the aggregated reports in JSON format. This
format includes the raw histogram bin counts, making it possible to
post-process the aggregated rtt statistics.

The user specifies the format for the aggregated output in the same
way as for the per-RTT output, by using the -F/--format argument. If
the user attempts to use the ppviz format for the aggregated
output (which is not supported) the program will error out.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-06 18:01:57 +02:00
Simon Sundberg
5a8eb8748a pping: Always initialize JSON array
Create start of JSON array during the start of program (if configured
to use JSON format) instead of at report. This ensures that
ePPing provides valid JSON output (an empty array, []) even if the
program is stopped before any report is generated. Before this change,
ePPing could generate empty output (""), which is not valid JSON
output, if it was stopped before the first report.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-06 18:01:57 +02:00
Simon Sundberg
989905e870 pping: Improve aggregated output format
Provide some statistics (min, mean, media, p95, max) instead of
dumping the raw bin counts.

While the raw bin counts provide more information and can be used for
further post processing, they are hard for a human to parse and make
sense of. Therefore, they are more suitable for a data-oriented
format, such as the JSON output.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-06 18:01:57 +02:00
Simon Sundberg
a301900fbd pping: Add switch for which IP stats are aggregated by
By default ePPing will aggregate RTTs based on the src IP of the reply
packet. I.e. the RTT A->B->A will be aggregated based on IP of B. In
some scenarios it may be more interesting to aggregate based on the
dst IP of the reply packet (IP of A in above example). Therefore, add
a switch (--aggregate-reverse) which makes ePPing aggregate RTTs
based on the dst IP of the reply packet instead of the src IP. In
other words, by default ePPing will aggregate traffic based on where
it's going to, but with this switch you can make ePPing aggregate
traffic based on where it's comming from instead.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-06 18:01:57 +02:00
Simon Sundberg
5ef4ffdd1b pping: Reset aggregated RTTs after each report
Instead of keeping all RTTs since ePPing started, reset the aggregated
stats after each time they're reported so the report only shows the
RTTs since the last report.

To avoid concurrency issues due to user space reading and resetting
the map while the BPF programs are updating it, use two aggregation
maps, one active and one inactive. Each time user space wishes to
report the aggregated RTTs it first switches which map is actively
used by the BPF progs, and then reads and resets the now inactive map.

As the RTT stats are now periodically reset, change the
histogram (aggregated_rtt_stats.bins) to use __u32 instead of __u64
counters as risk of overflowing is low (even if 1 million RTTs/s is
added to the same bin, it would take over an hour to overflow, and
report frequency is likely higher than that).

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-06 18:01:57 +02:00
Simon Sundberg
3a7b15ab3e pping: Add option to aggregate RTTs
Add an option -a or --aggregate to provide an aggregate report of RTT
samples every X seconds. This is currently mutually exclusive with the
normal per-RTT sample reports.

The aggregated stats are never reset, and thus contain all RTTs since
the start of tracing. The next commit will change this to reset the
stats after every report, so that each report only contain the RTTs
since the last report.

The RTTs are aggregated and reported per IP-prefix, where the user can
modify the size of the prefixes used for IPv4 and IPv6 using the
--aggregate-subnet-v4/v6 flags.

In this intital implementation for aggregating RTTs, the minimum and
maximum RTT are tracked and all RTTs are added to a histogram. It uses
a predetermined number of bins of equal width (set to 1000 bins, each
1 ms wide), see RTT_AGG_NR_BINS and RTT_AGG_BIN_WIDTH in pping.h. In
the future this could be changed to use more sophisticated histograms
that better capture a wide variety of RTTs.

Implement the periodic reporting of RTTs by using a
timerfd (configured to the user-provided interval) and add it to the
main epoll-loop.

To minimize overhead from the hash lookups, use separate maps for IPv4
and IPv6, so that for IPv4 traffic the hashmap key is only 4
bytes (instead of 16). Furthermore, limit the maximum IPv6 prefix size
to 64 so that the IPv6 map can use a 8 byte key. This limits the
maximum prefix size for IPv6 to /64.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-06 18:01:57 +02:00
Simon Sundberg
149e2c6d90 pping: Define map sizes
Instead of specifying the map size directly in the map definitions,
add them as defines at the top of the file to make them easier to
change (don't have to find the correct map among the map
definitions). This pattern will also simplify future additions of
maps, where multiple maps may share the same size.

While at it, increase the default packet_ts to 131072 (2^17) entries,
as the previous value of 16384 (2^14) which, especially for the
packet_ts map, was fairly underdimensioned. If only half of the
timestamps are echoed back (due to ex. delayed ACK), it would in
theory be enough with just 16k / (500 * 1) = 32 concurrent flows to
fill it up with stale entries (assuming default cleanout interval of
1s). Increasing the size of these maps will increase the corresponding
memory cost from 2^14 * (48 + 4) = 832 KiB and 2^14 * (44 + 144) =
2.94 MiB to 2^17 * (48 + 4) = 6.5 MiB and 2^17 * (44 + 144) = 23.5
MiB, respectively, which should generally not be too problematic.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-06 18:01:57 +02:00
Simon Sundberg
699e8e839e pping: Improve cross-thread abort handling
Remove the global keep_running variable and instead write to a pipe to
tell the main thread to abort in case periodical map cleanup
fails. Add the reading-side of this pipe to the epoll loop in the main
thread and abort if anything is written to the pipe. To abort the main
thread, update the main loop so it silently stops if it receives the
special value PPING_ABORT.

As the map cleaning thread can now immediately tell the main loop to
abort, it is no longer necessary to have a short
timeout (EPOLL_TIMEOUT_MS) on the main loop quickly detect changes in
the keep_running flag. So change the epoll loop to wait indefinitely
for one of the fds to update instead of timing out frequently.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-06 18:01:30 +02:00
Simon Sundberg
12dc63b965 pping: Use signalfd instead of signalhandler
Use the signalfd API to handle graceful shutdown on SIGINT/SIGTERM. To
watch the signalfd, create an epoll instance and add both the signalfd
and the perf-buffer to the epoll instance so that both can be
monitored in the main loop with epoll_wait().

This avoids the signal handler from interrupting the perf-buffer
polling and the other issues with the asynchronous signal
handling. Furthermore, the restructuring of the main loop to support
watching multiple file descriptors makes it possible to add additional
events to the main loop in the future (such as a periodical task
triggered by a timerfd).

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-04 16:10:49 +02:00
Simon Sundberg
1cb4e93b04 pping: Fix edge cases of parse_bounded_double()
Fix two edge cases with the parse_bounded_double() function.

1. It accept an empty string without raising an error. This should not
   have been an issue in practice as getopt_long() should have detected
   it as an lack of argument. This is addressed by adding a check for
   if it has parsed anything at all.

2. It could overflow/underflow without raising an error. This is
   addressed by adding a check of errno (which is set in case of
   overflow/underflow, but not in case of conversion error).

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-05-25 16:30:56 +02:00
Simon Sundberg
83a85adb96 pping: Minor cleanup of argument parsing
The parse_arguments() function used to have a separate variable for
each float (or rather a double) value it would parse from the user. As
only one argument will be parsed at the time this is redudant and will
require more and more variables as new options are added. Replace all
these variables with a single "user_float", which is used for all
options that parse a float from the user.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-05-25 16:30:02 +02:00
Simon Sundberg
22ac4d9192 pping: Factor out sending of RTT event
Extract the logic for filling in and sending an RTT event to a
function. This makes it consistent with other send_*_event() functions
and will make it easier/cleaner to add an option to aggregate the RTT
instead of sending it.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-05-25 13:17:41 +02:00
Simon Sundberg
2578b819d8 pping: Lowercase pping_output_format enum
The enum pping_output_format was uppercased, which is unconventional
for a type. Change it to lowercase.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-05-25 13:16:01 +02:00
Simon Sundberg
9ba9e7cd08 Ignore dirty libxdp submodule
Make Git ignore untracked files in libxdp submodule.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-03-30 18:09:55 +02:00
Ronan Pigott
91f2e1528a configure: update libbpf check for modern api
The system libbpf check would unconditionally fail with a modern libbpf
because the example program used outdated and removed library functions.
Update the test program so that system libbpf check can pass again.

Signed-off-by: Ronan Pigott <ronan@rjp.ie>
2023-03-22 12:57:06 +01:00
Ronan Pigott
eeb154d7a1 preserve-dscp: update for strict section names
The old "classifier/xxx" format is no longer supported.

Signed-off-by: Ronan Pigott <ronan@rjp.ie>
2023-03-20 15:09:11 +01:00
Toke Høiland-Jørgensen
8dedf93c60 lib/xdp-tools: Update submodule version
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>
2023-03-16 23:55:52 +01:00
Toke Høiland-Jørgensen
173c2d943e lib/defines.mk: Don't always set -DDEBUG
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>
2023-03-16 23:55:52 +01:00
Toke Høiland-Jørgensen
be8eb02e0c nat64-bpf: Don't use deprecated 'classifier' section names
Newer versions of libbpf deprecated the 'classifier' section names in
favour of just 'tc'. Update the nat64 code accordingly.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
2023-03-16 23:55:52 +01:00
Toke Høiland-Jørgensen
c7ecb48cfc nat64-bpf: Update TCP and UDP checksums when translating packets
When translating packets, we also need to update the TCP and UDP checksums
as they are computed over a pseudo header that also includes the IP
addresses.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
2023-03-16 23:55:52 +01:00
Tirthendu Sarkar
f27b9881bf AF_XDP-example: fix XDP prog attach for xdp-skb mode
The attach mode is by default set to XDP_MODE_NATIVE and needs to be
overwritten to XDP_MODE_SKB when '-S' option is used. Instead of
overwriting the attach mode was ORed and so was always running in NATIVE
mode. This patch fixes that.

Signed-off-by: Tirthendu Sarkar <tirthendu.sarkar@intel.com>
2023-02-03 17:04:46 +01:00
Chris Ward
54a31ceabc Take off the XDP_ZEROCOPY flag from port_params_default.xsk_cfg.bind_flags
Fix for issue 78; veth does not support zerocopy in bind flags
Take off the XDP_ZEROCOPY flag in the setting of
port_params_default.xsk_cfg.bind_flags in AF_XDP-forwarding/xsk_fwd.c

With this change, libxdp first tries to set up zerocopy, and when it finds
that this is not available it sets up an implementation which copies the
data. So performance will not be impactes for eths which support zerocopy.

Signed-off-by: Chris Ward <tjcw@uk.ibm.com>
2023-01-05 13:56:52 +01:00
Toke Høiland-Jørgensen
112cf3e93b AF_XDP-example: Conditionally define socket options
Old system include headers don't have they SO_PREFER_BUSY_POLL and
SO_BUSY_POLL_BUDGET socket option defines. Add conditional defines to the
AF_XDP-example userspace code so we can still compile if they are missing.

Fixes #76.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
2022-11-29 21:42:27 +01:00
Toke Høiland-Jørgensen
e715364854 lib/xdp-tools: Update version
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>
2022-11-29 20:21:45 +01:00
Toke Høiland-Jørgensen
b471a6d054 AF_XDP-example: Add -lpthread to linker invocation
Fixes #73.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
2022-11-29 14:16:55 +01:00
Toke Høiland-Jørgensen
36fb8a32aa libxdp: Update to latest upstream version
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>
2022-11-25 11:59:44 +01:00
Toke Høiland-Jørgensen
e7522963f4 configure: Exit if libmnl isn't found
Turns out we didn't actually bail out if libmnl was not found. Let's do
that so it becomes obvious what's missing (otherwise the build will just
fail later).

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
2022-11-25 11:58:13 +01:00
Toke Høiland-Jørgensen
d833166797 Add CONTRIBUTING file
Some basic guidelines for contributing code to this repository.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
2022-11-22 12:58:43 +01:00
Toke Høiland-Jørgensen
c92b2c458f lib: Update libbpf submodule to v1.0.1
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>
2022-11-19 13:06:27 +01:00
Toke Høiland-Jørgensen
ac03d27590 pkt-loop-filter: Provide file mode for open() call
This is needed when opening with O_CREAT.

Reported-by: Simon Sundberg <Simon.Sundberg@kau.se>
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
2022-11-16 15:29:57 +01:00
Toke Høiland-Jørgensen
a678c703fc configure: Don't support using system libxdp
We're using libxdp features from an unreleased version of the library, so
always use (and configure) the submodule version of it.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
2022-11-15 23:58:53 +01:00
Toke Høiland-Jørgensen
c72fba40a9 configure: Check for libmnl
The nat64-bpf example uses libmnl, so add a check for it in configure, and
bail if it's not available.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
2022-11-15 23:55:22 +01:00