Open
Conversation
cece100 to
fc3bb15
Compare
fc3bb15 to
b701a31
Compare
Collaborator
Author
|
@kp-mariappan-ramasamy reworked commits and review comments |
kp-omer-shamash
commented
Jan 14, 2025
Comment on lines
+169
to
+187
| let old_bytes = old.octets(); | ||
| let new_bytes = new.octets(); | ||
|
|
||
| // Convert to u16 pairs for checksum calculation | ||
| let old_words = [ | ||
| u16::from_be_bytes([old_bytes[0], old_bytes[1]]), | ||
| u16::from_be_bytes([old_bytes[2], old_bytes[3]]), | ||
| ]; | ||
| let new_words = [ | ||
| u16::from_be_bytes([new_bytes[0], new_bytes[1]]), | ||
| u16::from_be_bytes([new_bytes[2], new_bytes[3]]), | ||
| ]; | ||
|
|
||
| Self(vec![ | ||
| (old_words[0], new_words[0]), | ||
| (old_words[1], new_words[1]), | ||
| ]) |
Collaborator
Author
There was a problem hiding this comment.
usually loop-unrolling optimization would've fixed this for us, but since we use vec.push - it might miss it, so I unrolled manually
Comment on lines
+201
to
+205
| if unlikely(true) { | ||
| warn!(protocol = ?protocol, "Unknown protocol, skipping checksum update"); | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
if you are wondering on all the unlikely(true) - it's basically a way to ensure that the WARN gets pushed out of the HOT path, so it's intended
| let mut tcp_packet = MutableTcpPacket::new(packet.payload_mut()).unwrap(); | ||
| let checksum = tcp_packet.get_checksum(); | ||
| // Only update if checksum is present (not 0) | ||
| if checksum != 0 { |
Collaborator
Author
There was a problem hiding this comment.
added checksum != 0 check on all layers to allow OFFLOADING to hardware when possible
fe3d4bb to
e37adb4
Compare
|
Code coverage summary for 5dbdad5: ✅ Region coverage 56% passes |
ac802b3 to
d04f77e
Compare
xv-pete-m
reviewed
Jan 27, 2025
b655365 to
ebfb4bd
Compare
c024622 to
2fb5424
Compare
ae3799e to
66b7f3a
Compare
+ add un/likely primitives (when RUST supports we should change) + consolidate checksum calculations (now support offload on all layers)
+ introduce parking_lot for better performence lock primitives + introduce DashMap for faster atomic hashmap management + adapt API usage to new primitives (no need to unwrap)
66b7f3a to
4e6c30e
Compare
this way it'll be kept in commit-history for reference
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.
Description
feat: introduce cpu-arch, dashmap, parking_lot
Motivation and Context