-
Notifications
You must be signed in to change notification settings - Fork 1
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
dp_flow flags rename #435
dp_flow flags rename #435
Conversation
|
||
uint8_t aged : 2; | ||
|
||
bool aged; |
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.
I removed the bit sizes because those usually make the code slower (unaligned access, masking, ...).
Now if this structure needs to be small (I did not find a reason for it to be), then I will put the sizes back, though the structure needs some changes to make them effective (for example merge pf0
, pf1
and aged
to a byte, etc.
806e14a
to
7eef0a4
Compare
10e8c74
to
edafa09
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.
Thanks. The flags are definitely more readable now.
I noticed there are a few bitfield-type variables in
dp_flow
(which makes sense as this is actually stored in the packet space), but these are calledflags
even though they are not flags, but enums.So I moved them out of the structure (made sure the bitfield still works) and put the right types to them. I also moved
nxt_hop
to a better-aligned place.This also lead to some connected refactorings (mentioned in notes below)