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
2021-06-21 22:51:57 +02:00
2023-07-06 18:01:57 +02:00
2022-03-06 21:54:01 +08:00
2023-03-30 18:09:55 +02:00
2022-11-22 12:58:43 +01:00
2021-11-06 12:33:09 +00:00

Practical BPF examples

This git repository contains a diverse set of practical BPF examples that solve (or demonstrate) a specific use-case using BPF.

It is meant to ease doing rapid prototyping and development, writing C-code BPF programs using libbpf. The goal is to make it easier for developers to get started coding.

Many developers struggle to get a working BPF build environment. The repo enviroment makes it easy to build/compile BPF programs by doing the necessary libbpf setup transparently and detect missing compile dependencies (via the configure script). It is a declared goal to make BPF programming more consumable by detecting and reporting issues (when possible).

Description
No description provided
Readme 25 MiB
Languages
C 93.6%
Shell 4.7%
Makefile 1.6%