Commit Graph

1228 Commits

Author SHA1 Message Date
Dave Taht
4f72d3ed69 Merge branch 'main' of LibreQoE/LibreQoS
I am not sure if we should default to rebasing, or this.
2023-01-20 01:02:57 +00:00
Dave Taht
01e6f10f22 DRAFT: lqtop keyboard input API
This is a draft attempt at working out what keystrokes and
functionality lqtop could gain for the beleaguered BOFH.

Presently functionality is stuck on:

* Capturing a screen resize event doesn't work
* Needing to be able to send a starting row to the bus
* More bus messages in general
* BOFH ignorance has to how to message the other thread
2023-01-20 00:58:39 +00:00
Herbert Wolverson
e857f20ea1 Roll back on the persistent bus client until reconnect is figured out 2023-01-19 22:42:23 +00:00
Herbert Wolverson
0e03d3bbba CSV reading of ShapedDevices correctly ignores lines starting with # 2023-01-19 20:27:47 +00:00
Herbert Wolverson
12e0f6e0bd Show correct plans on shaped.html 2023-01-19 20:17:25 +00:00
Herbert Wolverson
7a0f066c63 Display errors when loading ShapedDevices 2023-01-19 20:16:20 +00:00
Herbert Wolverson
3e12e95f66 Create lqos_utils as a repository for useful macros. Move the string table macro. Start working on some command wrappers for easier use. 2023-01-19 17:52:19 +00:00
Herbert Wolverson
c676b8a33f Add a standard format file, and use #[rustfmt::skip] to say 'stop formatting this block' 2023-01-19 16:40:36 +00:00
Herbert Wolverson
9c135e8b4f Preallocate ring buffer result size 2023-01-19 15:34:53 +00:00
Herbert Wolverson
d0dd559f1d config_control.rs: Eliminate vector reallocation from get_nic_list
Refactor the get_nic_list function to use iterators with a collect
at the end, ensuring that the result vector is allocated at exactly
the needed size.
2023-01-19 15:15:42 +00:00
Herbert Wolverson
7cb8f930d1 De-async two things that shouldn't have been async to begin with. 2023-01-19 14:59:12 +00:00
Herbert Wolverson
29a9985a5a Remove file that isn't needed anymore. 2023-01-19 14:51:01 +00:00
Dave Taht
d58115fd3d Create a interfaces to test against
Dummy interfaces are commonly used to test stuff like this.
Most Linuxes do support them. A more advanced approach

Linux interfaces have a 15 character limit.

This implementation presently does not remove the created interface
and is a sterling example of how "side effects" in the OS itself
often need to be accounted for.
2023-01-19 14:44:50 +00:00
Herbert Wolverson
4d569e698c Add doc tags and general cleanup 2023-01-19 14:36:09 +00:00
Herbert Wolverson
a5fc96abc9 The lqos_node_manager cache manager uses a persistent BusClient 2023-01-18 23:39:12 +00:00
Herbert Wolverson
2633974839 Missed file from previous commit 2023-01-18 23:29:58 +00:00
Herbert Wolverson
3cb2799beb Still a work in progress, needs work - but adds a persistent client option for the bus. It currently won't work well without a pause between request/replies - but it works well enough for lqtop. More improvements needed. 2023-01-18 23:15:09 +00:00
Herbert Wolverson
da6a8f08a2 Move the socketserver into the bus crate also, makes more sense there. 2023-01-18 22:28:15 +00:00
Herbert Wolverson
2b573708ac Remove auth cookie from bus. Benchmarks show a tiny improvement in overall performance. 2023-01-18 22:18:16 +00:00
Herbert Wolverson
58c692425b Benchmark suite includes local socket round-trip. 2023-01-18 22:01:58 +00:00
Herbert Wolverson
e3b2b71289 Add benches and start benchmarking parts of the client/server setup 2023-01-18 21:46:20 +00:00
Herbert Wolverson
6c52fceb7f WIP - Use a UNIX stream socket rather than TCP for local bus communications. 2023-01-18 21:21:42 +00:00
Herbert Wolverson
0d81df6031 Merge branch 'main' of https://github.com/LibreQoE/LibreQoS 2023-01-18 21:14:46 +00:00
Dave Taht
0f16137c59 Fix comment to clarify tc_handle is calling c func
It was unclear until I read it that it was not shelling.
2023-01-18 19:03:55 +00:00
Herbert Wolverson
ea39de92c0 Fix stale comment 2023-01-18 15:35:30 +00:00
Robert Chacón
f9efbb7be7
Update README.md 2023-01-17 19:55:11 -07:00
Robert Chacón
66a4f9c763
Update README.md 2023-01-17 19:54:50 -07:00
Robert Chacón
b2531fb6dd
Improve documentation for CPU requirements 2023-01-17 19:40:50 -07:00
Dave Taht
0888d3d6da Goofed on /vendor 2023-01-17 17:02:52 -08:00
Dave Taht
3d6e214616 Add defer option to all html
If this actually breaks anything, we can revert.
2023-01-17 17:00:30 -08:00
Dave Taht
0a0248a534 Modern javascript supports the defer option
Move the javascript at the bottom of the file to the top.

Also it seems a matter of luck that vendor/bla worked when
/vendor/bla was needed.
2023-01-17 16:55:07 -08:00
Dave Taht
931b0d8d22 Move Run Bandwidth Test to left of configuration
Basic design principle for muscle memory: always put the same menu
items in the same places as often as you can.
2023-01-17 16:46:58 -08:00
Dave Taht
9bd1d876ab HTB shrunk a little 2023-01-17 16:08:19 -08:00
Dave Taht
e251ef09e3 Forgot to import the right things
Also compiling from the top of the tree doesn't recurse. curses
2023-01-17 16:08:19 -08:00
Dave Taht
c5947fff56 Get rid of 3 more Strings from tc cake parser
DiffServ had a missing (underused) option
AckFilter &
FlowMode now use the nifty dashyenum thing
Bandwidth unlimited is all that we are using cake for today

Only FWmark left to go (which is in hex and I do not know how to
parse with and without the 0x prefix)
2023-01-17 15:33:04 -08:00
Herbert Wolverson
e0552ec55b Break dash-supporting enum into its own macro. 2023-01-17 22:01:56 +00:00
Herbert Wolverson
c6661520dd Support dashes in generated enums by replacing - with _ during
the match phase. Enum options have to replace minus with underscore.

E.g. `ack-filter` becomes `ack_filter`.

So you can do:

`string_table_enum!(DashingEnum, option_1, option2);`

And read `DashingEnum::from_str("option-1")`
2023-01-17 21:42:33 +00:00
Herbert Wolverson
d83c1dc852 Merge branch 'main' of https://github.com/LibreQoE/LibreQoS 2023-01-17 21:15:00 +00:00
Herbert Wolverson
e26a9982ab Add a string table macro to make it easier to pass between JSON
exported text and known-types in queue definitions.
2023-01-17 21:13:08 +00:00
Herbert Wolverson
f9351757ca Remove per-tick printing
Cap number of watched queues at (CPU cores * 2), per belyivulk
2023-01-17 20:06:33 +00:00
Herbert Wolverson
7ea5ab3cd8 Convert diffserv from a string to a nice enum.
Co-authored-by: Dave Taht <davet@taht.net>
2023-01-17 20:00:10 +00:00
Herbert Wolverson
87aaddd82b Cargo format run 2023-01-17 19:54:11 +00:00
Herbert Wolverson
6269f41b67 Use Rayon to parallelize the queue reader 2023-01-17 19:53:59 +00:00
Herbert Wolverson
6f98e0f088 Lazy queue tracking
Instead of polling every TC queue, maintain a "watch list" (with
auto expiration). Opening a queue in the GUI adds that queue to
the "watch list".

Only queues in the watch list are polled.
2023-01-17 19:44:53 +00:00
Dave Taht
7be6a3051c Note some possible string to byte conversions
I wish I understood how to write a simple lookup table in rust...
2023-01-17 09:23:44 -08:00
Herbert Wolverson
5855a3b3ed Move tc queue monitoring into a separate crate
* Remove the `lqosd` lib/main hack.
* Move benchmarks from lqosd into the new `lqos_queue_tracker` crate.
* Move queue tracking into a separate crate, to make it easier to
  work with.
2023-01-17 15:51:11 +00:00
Herbert Wolverson
424925d0d6 Improve the /etc/lqosd example 2023-01-17 14:09:14 +00:00
Herbert Wolverson
1a0b20aa11 Add Criterion-based benchmarks to lqosd
* Add a secondary build option (as library) to lqosd, by including
  a `lib.rs` file that mirrors `main.rs`.
* Add the boilerplate required for a Criterion-based benchmark
  setup.
* Add support for `cargo bench` launching a set of tests that
  benchmark deserializing TC queues, and benchmarks retrieving
  queue statistics from `tc`.
2023-01-17 14:05:28 +00:00
Herbert Wolverson
6403ad21e4 Merge branch 'main' of https://github.com/LibreQoE/LibreQoS 2023-01-16 16:04:05 +00:00
Herbert Wolverson
7548413165 Use Log and Env_log for output. Suppress kernel messages that confuse
people on startup.

Default to "warn" level of logging. You can override by setting
RUST_LOG to "info". (Environment variable)
2023-01-16 16:03:14 +00:00