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
Pkt ptrs/v45 #10961
Closed
Closed
Pkt ptrs/v45 #10961
Conversation
This file contains 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
For better readability and type checking. Ticket: OISF#5517.
To match function naming style. Ticket: OISF#5517.
Replace it with inline functions. Adds inline functions to wrap PKT_IS_IPV4/PKT_IS_IPV6. This is in preparation of removing the macro's, and cleaning up the header pointers. Ticket: OISF#5517.
To prepare future changes to the Packet header pointers. Ticket: OISF#5517.
Improve readability by setting up data/data_len once before passing on to the other decoders. Work in preparation of other decoder changes. Ticket: OISF#5517.
In preparation of future Packet structure changes. Ticket: OISF#6938.
In preparation of making them union members.
Store IPv4 decoder vars in a new Packet::l3 section in the packet. Use inline functions instead of the often multi-layer macro's for various IPv4 header getters. Ticket: OISF#6938.
Store IPv6 decoder vars in a new Packet::l3 section in the packet. Use inline functions instead of the often multi-layer macro's for various IPv6 header getters. Ticket: OISF#6938.
Take less space in the TCPVars for tracking if SACKOK is set. Reduces size by 16 bytes. Ticket: OISF#6938.
Part of effort to make Packet more compact. Ticket: OISF#6938.
Part of effort to make Packet more compact. Ticket: OISF#6938.
Part of effort to make Packet more compact. Ticket: OISF#6938.
Part of effort to make Packet more compact. Ticket: OISF#6938.
No longer use a pointer, but rather an offset. Part of effort to make Packet more compact. Ticket: OISF#6938.
SET_OPTS is now unused, so remove.
Addresses are pulled from embedded IPv4 header directly. Embeded hlen was unused. Part of effort to make Packet more compact. Ticket: OISF#6938.
Remove unused L4 header pointers. Part of effort to make Packet more compact. Ticket: OISF#6938.
Not used, so no need to keep them. Part of effort to make Packet more compact. Ticket: OISF#6938.
Only used in tests. For the tests, switch to getting headers from embedded IPv6 header. Part of effort to make Packet more compact. Ticket: OISF#6938.
Was only set, never checked. Part of effort to make Packet more compact. Ticket: OISF#6938.
Part of effort to make Packet more compact. Ticket: OISF#6938.
To prepare future changes to the Packet header pointers. Ticket: OISF#5517.
Use a flag to indicate a calculated csum is available. Allows packet reset to just use memset.
To prepare future changes to the Packet header pointers. Ticket: OISF#5517.
To prepare future changes to the Packet header pointers. Ticket: OISF#5517.
Replace PKT_IS_UDP macro with PacketIsUDP inline function. For better readability and type checking. Ticket: OISF#5517.
For better readability and type checking. Ticket: OISF#5517.
For better readability and type checking. Ticket: OISF#5517.
For better readability and type checking. Ticket: OISF#5517.
Reduces Packet size. Ticket: OISF#6938.
To reduce Packet size. Ticket: OISF#6938.
To reduce Packet size. Ticket: OISF#6938.
Also start vars section in L4 for icmpv6vars. To reduce Packet size. Ticket: OISF#6938.
To reduce Packet size. Ticket: OISF#6938.
Remove header pointer from Packet as there were no users of it. Ticket: OISF#6938.
Remove from Packet struct as there were no users of it. Ticket: OISF#6938.
L2 section similar to L3 and L4 sections. Ticket: OISF#6938.
To recude Packet size. Ticket: OISF#6938.
To reduce Packet size. Ticket: OISF#6938.
To reduce Packet size and make similar fields follow the same pattern. Ticket: OISF#6938.
Reduce gaps in the structure. Ticket: OISF#6938.
Reduces direct pointer usage and reduces Packet size. Ticket: OISF#6938.
Reduces direct pointer usage and reduces Packet size. Ticket: OISF#6938.
Follows function nameing style. Ticket: OISF#5517.
Avoid NULL pointer calculations.
Closed
jasonish
approved these changes
Apr 26, 2024
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.
Commits read much better; overall a nice cleanup. Have been running the previous version of this PR live since yesterday. And it satisfies the tickets.
Information: QA ran without warnings. Pipeline 20368 |
Merged
Merged in #10971, thanks! |
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.
https://redmine.openinfosecfoundation.org/issues/6938
https://redmine.openinfosecfoundation.org/issues/5517
replaces #10953