-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
Set SCTP zero checksum #1015
Set SCTP zero checksum #1015
Conversation
128872e
to
02739d5
Compare
02739d5
to
283488d
Compare
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.
I don't think this works, since checksums for outgoing packets will always be computed here, even if the remote side is willing to accept zero-checksum packets:
libdatachannel/src/impl/sctptransport.cpp
Line 977 in 283488d
*checksum = usrsctp_crc32c(data, len); |
I see, it seems I misunderstood the specification. Thank you for the comment. I'll make the corrections. |
I had been working on an implementation to eliminate the CRC calculation during transmission, but there were some issues. The first issue is that it seems usrsctp users cannot be informed when Thus, I decided to disable CRC offloading and let usrsctp handle the CRC computation. As long as we include The second issue is that, when usrsctp is connected using the AF_CONN address family, it appears to compute the CRC even if If there's a better implementation approach, please let me know. |
8f6203f
to
b450b76
Compare
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.
It looks good now, thank you! I hope the issue with AF_CONN sockets in usrsctp can be sorted out, thanks for submitting the PR.
Based on the discussion at #1012, where it was concluded that enabling
SCTP_ACCEPT_ZERO_CHECKSUM
is not an issue, I have implemented zero checksum.