Skip to content

Support 64 bit limit for police actions #1084

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jfogh-akamai
Copy link

The issue

The library currently only supports 32 bit values for "rate" and "peak rate" in police actions.

Fixes #1081.

Implementation notes

The fields are stored in the struct nl.TcPolice, which only supports 32 bits. The protocol supports separate 64 bit attributes, which can be appended after the nl.TcPolice instance.

This change is completely analogous to the commit "implemented handling of uint64 for HTB class rate/ceil
".

Related bug fixes

It is possible to receive the 64 bit attribute before the TcPolice instance. (I saw this during my testing.)
That means we must check if we have already received the value, to avoid overwriting it with an incorrect 32 bit value.

In the existing code, we fail to account for this when parsing TCA_HTB_PARMS and TCA_TBF_PARMS.
I have added checks there, but I have not tested it thoroughly to see if there are other bugs.

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.

Support 64bit limit for police actions
1 participant