Add tbf (token bucket filter) qdisc to support egress traffic shaping / rate limiting#13196
Merged
Conversation
Contributor
|
@parth-opensrc I don't have access to buildkite, anything I can do to push this forward? |
Implements a single-rate TBF qdisc modeled on Linux's net/sched/sch_tbf.c and exposes it via --qdisc=tbf, with required --qdisc-tbf-rate and --qdisc-tbf-burst flags. OCI annotations can lower the configured rate and burst ceilings but not raise them without --allow-flag-override. The fifo qdisc's circular packet-buffer list moves into a shared pkg/tcpip/link/qdisc package so both qdiscs share one implementation. Loopback and ingress traffic are not shaped.
fdf96b5 to
e492001
Compare
Contributor
Will check it out |
PiperOrigin-RevId: 918039397
e492001 to
18331ea
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add tbf (token bucket filter) qdisc to support egress traffic shaping / rate limiting
resolves the egress part of #11109.
AI usage disclosure: used ai to help me generate some tests and cleanups after the manual implementation I did by hand modeled after
linux/net/sched/sch_tbf.cTBF implementation. Also used it in guided documentation writing. I understand every line of code written and wrote the core logic manually, and happy to answer questions / revisit parts of the implementation as necessary.Also tested and benchmarked manually against a local Kubernetes kind cluster to ensure it resolves isola-run/isola#290
FUTURE_COPYBARA_INTEGRATE_REVIEW=#13104 from benldrmn:feat/network-traffic-shaping fcb5c35