-
Notifications
You must be signed in to change notification settings - Fork 140
[PATCH v2] Move user area and user flag to common event header #2221
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
JannePeltonen
wants to merge
7
commits into
OpenDataPlane:master
Choose a base branch
from
JannePeltonen:event-uarea-flag
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[PATCH v2] Move user area and user flag to common event header #2221
JannePeltonen
wants to merge
7
commits into
OpenDataPlane:master
from
JannePeltonen:event-uarea-flag
Conversation
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
MatiasElo
reviewed
Jun 9, 2025
Add new variants of odp_packet_parse() tests with and without L4
checksumming.
Add new variants of odp_event_user_area(), odp_event_user_flag_set()
and odp_event_user_area_and_flag() tests.
Add tests for odp_packet_l{2,3,4}_type() functions and for the packet
flag getter functions.
Use packets/events of multiple types in a pseudorandom order in
the new tests to make things less predictable for branchy code and
hopefully slightly more realistic.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Remove _odp_event_hdr_t::type which is not used for anything. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Remove unused flags from _odp_packet_input_flags_t. The flags are set but never read. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Remove L4 protocol flags (TCP, UDP, etc) from the packet input flags stored in the packet header and store the L4 protocol number directly. This slightly simplifies odp_packet_l4_type() and packet parsing and makes it possible to make _odp_packet_input_flags_t smaller to make room for other things in the packet header. This causes an application visible change that multiple L4 packet flags (e.g. both TCP and UDP) can no longer be set at the same time, which is probably more in line with the spirit of the ODP API, even though the old behaviour seemed to be allowed too. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Now with fewer packet input flags, shrink _odp_packet_input_flags_t from 8 to 4 bytes. This reduces the size of packet_parset_t by 8 bytes since structure padding there gets reduced too. Add explicit unused padding bytes in packet header (for now) to avoid moving other packet header fields between cache lines. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Add user area pointer in the common event header and remove it from event type specific headers. This simplifies and speeds up functions like odp_event_user_area() that operate on generic events. This does not change which event types support user area. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Add user flag in the common event header and remove it from event type specific headers. This simplifies and speeds up functions like odp_event_user_flag() that operate on generic events. This does not change which event types have a user flag visible through ODP API. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
fb22abd to
51619e3
Compare
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.
Simplify and streamline code by moving user area and user flag from event type specific event headers to the common event header. This does not change for which event types user area and flag are available.