* The frequency with which TC queues are polled for statistics is
now controled by `queue_check_period_ms` in `/etc/lqos`.
* Example file updated.
* Configuration display updated.
This is designed to act as a compromise: for detailed analysis, it
can be updated to a low number. For regular running, it can be updated
to 1000 or more.
Signed-off-by: Herbert Wolverson <herberticus@gmail.com>
* Adds the `lqos_python` module to the Rust build system.
* `lqos_python` exposes an API for calling bus commands
directly, instead of via a helper. Currently, "is alive"
for testing the daemon, and IP mappings are exported.
* Update the build script to build the .so file and put
it where Python can find it.
* Exclude the binary from Git.
* Update `LibreQoS.py` to use bus commands for clearing,
deleting IP mappings. Adding is not yet covered, due
to the way commands are batched - and that not yet being
supported by the library.
* Add a check to `LibreQoS.py` that the `lqosd` daemon
is running and accepting connections. Abort if it isn't,
since nothing else will work anyway.
Signed-off-by: Herbert Wolverson <herberticus@gmail.com>
* Adds build_rust.sh:
* Creates `src/bin` and `src/bin/static` if needed.
* Compiles all of the executables in the `rust` tree.
* Copies the executables into `src/bin`
* Copies the static web data for `lqos_node_manager`
into `bin/static`.
* Updates .gitignore to ignore the bin/ folder
* Updates LibreQoS.py to call bin/xdp_iphash_to_cpu_cmdline
instead of ./xdp_iphash_to_cpu_cmdline (cleaner).
* Updates graphInfluxDB.py to call the temporary Rust shim
that provides output like the previous one, hopefully
(poorly tested) allowing the existing graph system to work
with the new structure.
See #181
Signed-off-by: Herbert Wolverson <herberticus@gmail.com>
Replaces the previously separate repo, merging the Rust
system into the mainline ready for 1.4.
The Rust system currently provides:
* lqos_bus: type definitions for localhost control bus.
* lqos_config: handler for configuration files.
* lqos_node_manager: local web-based monitor and manager.
* lqos_sys: eBPF program that handles all of the tracking,
CPU assignment, VLAN redirect, TC queue assignment,
and RTT tracking. Wrapped in a Rust core, providing
consistent in-Rust building and mostly-safe wrappers
to C code.
* lqosd: a daemon designed to run continually while
LibreQoS is operating. On start, it parses the configuration
files and sets up interface mapping (the Python code is still
required to actually build queues). It then assigns the various
eBPF programs to appropriate interfaces. The eBPF systems are
removed when the daemon terminates.
lqosd also provides a "bus", listening to requests for changes
or information on localhost, providing a control plane for
the rest of the project.
* lqtop: An example program demonstrating how to use the bus,
acts like "top", showing current network traffic and mappings.
* xdp_iphash_to_cpu_cmdline: a Rust wrapper providing the same
services as the cpumap originated tool of the same name. This is
a "shim" - it will go away once the native Python library is
ready.
* xdp_pping: also a shim, providing equivalent services to the
cpumap service of the same name.
A helper shell script "remove_pinned_maps.sh" can be used to
remove all pinned eBPF maps from the system, allowing for eBPF
program upgrades that change persistent map structures without
a reboot.
Signed-off-by: Herbert Wolverson <herberticus@gmail.com>
* Add src/rust/target to the .gitignore file,
to avoid including Rust build artifacts in the
Git tree.
* Fix the syntax when calling the IP mapping helper
and deleting IP mappings.
Signed-off-by: Herbert Wolverson <herberticus@gmail.com>
* Modifies ispConfig.example.py to include work-in-progress
"on a stick" configuration. You can specify 2 VLANs on a
single interface and operate on a single interface.
* LibreQoS.py no longer calls cpumap commands, but instead
calls the Rust shims that do the same thing with the new
Rust environment (which is in the next commit).
* LibreQoS.py detects when running "on a stick", and divides
the number of available queues by 2. The first half are
used for download queues, the second for upload queues.
This allows a single TC hierarchy to be installed on the
single "stick" interface, and still divide traffic by core.
Part of #181
Signed-off-by: Herbert Wolverson <herberticus@gmail.com>
FIXES#177
Apply the change suggested in the issue body: UISP can report
devices with duplicate IP addresses across interfaces. Check
that an IP address is unique before applying it.
Changed for both Flat and Hierarchy networks.
When the repo was rearranged, it broke a unit test that expected
to find network.json.example in the "1.3" folder. It now looks
in the src/ folder, and the test passes.