Skip to content

fix: remove redundant memset on af_packet recv - #139

Merged
BobAnkh merged 1 commit into
mainfrom
fix_6898
Aug 11, 2025
Merged

fix: remove redundant memset on af_packet recv#139
BobAnkh merged 1 commit into
mainfrom
fix_6898

Conversation

@Lethe10137

Copy link
Copy Markdown
Member

#138 Again

It should be noticed that, when built with cargo 1.86 and --release flag, this fix does provide performance gain (450Mbps -> 700Mbps) on a rattan link with no cells. Here are the flamegraphs:

Current main, 1.86
current main, 1.86
This fix, 1.86
this fix, 1.86

Yet when compiled with cargo 1.89, which is the latest stable version of cargo, there is no difference in neither performance (~800Mbps, yet on another machine) nor flame graph:
Current main, 1.89
current main, 1.89
This fix, 1.89
this fix: 1.86

It seems that cargo 1.89 can optimize out the redundant memset that this fix manually handles.

@BobAnkh BobAnkh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BobAnkh
BobAnkh merged commit f3ac476 into main Aug 11, 2025
13 checks passed
@BobAnkh
BobAnkh deleted the fix_6898 branch August 11, 2025 01:18
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.

2 participants