Page MenuHomeFreeBSD

mbuf.9: describe checksum offloading for SCTP
ClosedPublic

Authored by tuexen on Mon, Jul 28, 10:47 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Aug 5, 6:13 AM
Unknown Object (File)
Tue, Aug 5, 6:08 AM
Unknown Object (File)
Tue, Aug 5, 6:00 AM
Unknown Object (File)
Tue, Aug 5, 5:40 AM
Unknown Object (File)
Tue, Aug 5, 1:51 AM
Unknown Object (File)
Tue, Aug 5, 1:33 AM
Unknown Object (File)
Tue, Aug 5, 1:20 AM
Unknown Object (File)
Tue, Aug 5, 12:07 AM
Subscribers

Details

Summary

This describes the current status of the implementation. While there, be a bit more precise on how long the checksum computation is delayed.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Don't mention SCTP in the wrong place.

Improve description for the receive path of SCTP packets.

share/man/man9/mbuf.9
1216

Sounds like there is a way to return the value of the calculated checksum to the host CPU. Since the csum_data field is not used in the SCTP implementation, I assume there is not.

Also, I don't know how a network interface can indicate failure of checksum validation. It just drops the packet, right?
(This applies to the TCP/UDP paragraph starting at line 1194 as well)

How about this:

The driver of a network interface can indicate success of SCTP checksum validation by marking CSUM_DATA_VALID in csum_flags.

1225

csum_flags

share/man/man9/mbuf.9
1216

Sounds like there is a way to return the value of the calculated checksum to the host CPU. Since the csum_data field is not used in the SCTP implementation, I assume there is not.

I would say, currently there is no interface that provides the correct checksum. But that could change in the future. Also, this is the same text as for TCP and UDP.

Also, I don't know how a network interface can indicate failure of checksum validation. It just drops the packet, right?

No. My understanding is that the success of the validation is indicated by adding the CSUM_DATA_VALID flag. The failure of the validation is indicated by not adding the CSUM_DATA_VALID. However, the failure of the validation does not mean that the packet has an invalid checksum. Only that the hardware validation failed. That is why then the transport stacks perform the validation in software.

(This applies to the TCP/UDP paragraph starting at line 1194 as well)

How about this:

The driver of a network interface can indicate success of SCTP checksum validation by marking CSUM_DATA_VALID in csum_flags.

1225

csum_flags

Thank for catching.

tuexen added inline comments.
share/man/man9/mbuf.9
1216

Sounds like there is a way to return the value of the calculated checksum to the host CPU. Since the csum_data field is not used in the SCTP implementation, I assume there is not.

I would say, currently there is no interface that provides the correct checksum. But that could change in the future. Also, this is the same text as for TCP and UDP.

Also, I don't know how a network interface can indicate failure of checksum validation. It just drops the packet, right?

No. My understanding is that the success of the validation is indicated by adding the CSUM_DATA_VALID flag. The failure of the validation is indicated by not adding the CSUM_DATA_VALID. However, the failure of the validation does not mean that the packet has an invalid checksum. Only that the hardware validation failed. That is why then the transport stacks perform the validation in software.

(This applies to the TCP/UDP paragraph starting at line 1194 as well)

How about this:

The driver of a network interface can indicate success of SCTP checksum validation by marking CSUM_DATA_VALID in csum_flags.

What about the updated wording. I now only add test regarding differences from TCP or UDP.

1225

csum_flags

Thank for catching.

Fixed.

share/man/man9/mbuf.9
1195

Add comma before or?

I don't know if there is a rule, but I saw sometimes a comma before an "and" or "or" in a list.

1200

I find it harder to understand with this separation in two sentences. How about:

...the exact value of the checksum to the host CPU, its driver can mark CSUM_DATA_VALID in csum_flags as well as, for TCP and UDP, CSUM_PSEUDO_HDR and set csum_data to 0xFFFF hexadecimal to indicate a valid checksum.

1209

Should "Internet" be replaced by "TCP/UDP"?

1219

I find "in this case" not helpful here. Can it be omitted?

tuexen added inline comments.
share/man/man9/mbuf.9
1195

Add comma before or?

I don't know if there is a rule, but I saw sometimes a comma before an "and" or "or" in a list.

Fixed. It is called a serial comma.

1200

I find it harder to understand with this separation in two sentences. How about:

...the exact value of the checksum to the host CPU, its driver can mark CSUM_DATA_VALID in csum_flags as well as, for TCP and UDP, CSUM_PSEUDO_HDR and set csum_data to 0xFFFF hexadecimal to indicate a valid checksum.

Good suggestion. Taken.

1209

Should "Internet" be replaced by "TCP/UDP"?

It is called the Internet checksum, see RFC 1071.

1219

I find "in this case" not helpful here. Can it be omitted?

Yes. Done.

tuexen marked 4 inline comments as done.

Address latest comments of Timo.

It improves the documentation because it describes more of what is implemented.

share/man/man9/mbuf.9
1219

How about that?

This revision is now accepted and ready to land.Mon, Jul 28, 9:01 PM
bcr added a subscriber: bcr.

OK from manpages.

This revision was automatically updated to reflect the committed changes.