Skip to content

Wkz/if#13

Merged
troglobit merged 36 commits intomainfrom
wkz/if
Apr 17, 2023
Merged

Wkz/if#13
troglobit merged 36 commits intomainfrom
wkz/if

Conversation

@wkz
Copy link
Copy Markdown
Contributor

@wkz wkz commented Apr 14, 2023

No description provided.

wkz added 3 commits April 13, 2023 22:00
Unfortunately, sysrepo considers it an error to load a module that is
already loaded, ruling out using `sr_install_modules`.

Therefore, provide `require_modules` instead, which ensures that a
given set of modules are loaded, or loads them otherwise.
@wkz wkz requested a review from troglobit April 14, 2023 10:39
@wkz wkz marked this pull request as draft April 14, 2023 10:40
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Prevent // in new srx_require_module() when composing module PATH.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
It started its life as a copy of systemf() anyway, time to clean up.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Note: new API, srx_get_bool() returns -1 on error, leaving 0 and 1 as
false and true, respectively.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
All value functions, except the new srx_enabled(), now return clear
error indication, with the value as a separate argument.

The srx_enabled() predicate function is for cases where the default
value is disabled and code checks enable a subsystem or flag.  I.e.,
when an error can safely be returned as 'false'.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Some users still prefer the old netmask style to set up an interface.
This patch enables the corresponding model feature and checks for a
netmask only if prefix-length is unset.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Calling sr_get_time() for an xpath that has no data causes sysrepo to
always log the access as an error.  With sr_get_items() it is left to
the callee to determine if the missing data should cause an error.

This patch is a refactor that silences the syslog message and also
fixes one or tow memory leaks.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
We now have our own srx_set_item() that hides a lot of the complexity.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Copy link
Copy Markdown
Contributor

@troglobit troglobit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your part looks great! I've extended upon it a bit, and in retrospect, that's not what one should do. GitHub gets confused about who's who.

Maybe you can have a look at it @wkz and we can merge it together in the morning? Next step after this is to add libnl support to get ifflags, etc. as well as ethtool to fetch counters.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Copy link
Copy Markdown
Contributor Author

@wkz wkz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff!

Instead of having to rely on the kernel command line, we convert all the
kernel functionality in question into modules and rely on the auto-load
feature in the kernel and modprobe to add options at load time.

The fb_tunnels setting is a net core setting, for that we use sysctl.

This commit also syncs the kernel config between our two main archs,
disabling DRM and SOUND for the Amd64 build as a spin-off.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The per-interface and per-af setting in the ietf-ip yang module allow
the user to enable a more granular forwarding between interfaces, which
is disabled by default.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@troglobit troglobit marked this pull request as ready for review April 17, 2023 12:08
@troglobit troglobit merged commit b7058b2 into main Apr 17, 2023
@troglobit troglobit deleted the wkz/if branch April 17, 2023 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants