Skip to content
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

ignore checksum during loopback #919

Merged
merged 1 commit into from
Apr 10, 2024
Merged

Conversation

skpupil
Copy link

@skpupil skpupil commented Apr 10, 2024

There is no need to check the checksum during loopback.
According to tests, this optimization improves performance by more than 30%.

@Dirbaio Dirbaio added this pull request to the merge queue Apr 10, 2024
Merged via the queue into smoltcp-rs:main with commit f9c850b Apr 10, 2024
24 checks passed
@whitequark
Copy link
Contributor

Do we... care about loopback performance?

@skpupil
Copy link
Author

skpupil commented Apr 11, 2024

Do we... care about loopback performance?

We don't check the checksum during loopback according to the Linux network stack. The performance improvement then becomes just a fringe benefit. BTW, if we aim to identify the performance bottleneck of smoltcip, it's easier to do so after excluding checksum checking.

@whitequark
Copy link
Contributor

That is true in some cases, though I would expect most performance bottlenecks to come from the relatively (compared to e.g. Linux) immature TCP implementation, not the basic and straightforward bit manipulation code.

@skpupil
Copy link
Author

skpupil commented Apr 11, 2024

That is true in some cases, though I would expect most performance bottlenecks to come from the relatively (compared to e.g. Linux) immature TCP implementation, not the basic and straightforward bit manipulation code.

emmm, perhaps both are needed. I'll try my best to do more. Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants