-
Notifications
You must be signed in to change notification settings - Fork 929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for network device limits.priority option #12135
Add support for network device limits.priority option #12135
Conversation
d252419
to
f5a7b8a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few questions and remarks :)
Thanks for your review, Julian! ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!, just a question and one small nit :)
f5a7b8a
to
aaeb652
Compare
aaeb652
to
d514ab6
Compare
@mihalicyn whilst we think about the netfilter netprio stuff, do you want to split the bug fixes for the cgroup functionality into a separate PR we can merge for LXD 5.17? |
sure as you say. I just thought that this thing is simple enough to be merged at once. |
d514ab6
to
67bcf99
Compare
67bcf99
to
596d77a
Compare
@mihalicyn when you're ready for another review please can you click the refresh review button on my name top right so that I get a notification and it'll appear on my todo list on https://github.com/pulls/review-requested Thanks |
596d77a
to
da15f4e
Compare
fdfa52e
to
5bc9328
Compare
sure, but I also wanted to write extra tests with |
OK I'll hold off then. Thanks! |
3677e9a
to
192b7fb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doc update looks good now. :)
74194ec
to
7db74f6
Compare
Ok. Now Taking this change into account now I'm not sure that I need to change anything in the https://github.com/canonical/lxd-ci/blob/main/tests/network-bridge-firewall test because this test is about checking that everything works equally for nftables/xtables. For |
For xtables we use xt_CLASSIFY target to set skb->priority and NF_INET_FORWARD hook. Which is not an ideal solution because it won't work in bridged configuration. But we can do nothing with that. With nftables we use netdev family and egress hook introduced in torvalds/linux@42df6e1 (starting from Linux kernel v5.16) it allows to catch and process all skb's which go out from the container's veth device. Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Make it to take *deviceCommon, oldConfig and "is bridged" flag Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
This is a replacement feature for per-instance limits.network.priority option. New approach does not require netprio cgroup to be suppored (it's from legacy cgroup v1) and also it allows to set priority for virtual machine instances. Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Add nic_bridged test for limits.priority per-device option. Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
… without NetPrio cgroup Currently, we issue the following warning in the logs: Couldn't find the CGroup network priority controller, network priority will be ignored Let's change text to: Couldn't find the CGroup network priority controller, per-instance network priority will be ignored. Please use per-device limits.priority instead Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Update limits.network.priority documentation description and mention that option is deprecated and replaced by per-NIC limits.priority option and run: $ make update-metadata Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
7db74f6
to
47d6d6f
Compare
I've rebased PR and resolved conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@mihalicyn we should just add a check for nftables in lxd-ci bridge firewall now. |
changes applied
sure, I think we discuss approach to this thing during our regular call ;-) |
lxd/device: add support for network device limits.priority option
This is a replacement feature for per-instance limits.network.priority option.
New approach does not require netprio cgroup to be suppored (it's from legacy
cgroup v1) and also it allows to set priority for virtual machine instances.
The recommended Linux kernel version (for full functionality) is 5.16.