Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133786919
D51590.id159277.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D51590.id159277.diff
View Options
diff --git a/share/man/man9/mbuf.9 b/share/man/man9/mbuf.9
--- a/share/man/man9/mbuf.9
+++ b/share/man/man9/mbuf.9
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd December 28, 2023
+.Dd July 28, 2025
.Dt MBUF 9
.Os
.\"
@@ -1091,7 +1091,7 @@
altered prior to transmission.
.El
.Sh HARDWARE-ASSISTED CHECKSUM CALCULATION
-This section currently applies to TCP/IP only.
+This section currently applies to SCTP, TCP, and UDP over IP only.
In order to save the host CPU resources, computing checksums is
offloaded to the network interface hardware if possible.
The
@@ -1117,7 +1117,7 @@
.Vt mbuf chain
containing the packet.
.Pp
-On output, checksum offloading is attempted after the outgoing
+On output, the computation of the checksum is delayed until the outgoing
interface has been determined for a packet.
The interface-specific field
.Va ifnet.if_data.ifi_hwassist
@@ -1135,12 +1135,15 @@
.Va csum_flags .
.Pp
The flags demanding a particular action from an interface are as follows:
-.Bl -tag -width ".Dv CSUM_TCP" -offset indent
+.Bl -tag -width ".Dv CSUM_SCTP" -offset indent
.It Dv CSUM_IP
The IP header checksum is to be computed and stored in the
corresponding field of the packet.
The hardware is expected to know the format of an IP header
to determine the offset of the IP checksum field.
+.It Dv CSUM_SCTP
+The SCTP checksum is to be computed.
+(See below.)
.It Dv CSUM_TCP
The TCP checksum is to be computed.
(See below.)
@@ -1149,14 +1152,16 @@
(See below.)
.El
.Pp
-Should a TCP or UDP checksum be offloaded to the hardware,
+Should a SCTP, TCP, or UDP checksum be offloaded to the hardware,
the field
.Va csum_data
will contain the byte offset of the checksum field relative to the
end of the IP header.
-In this case, the checksum field will be initially
-set by the TCP/IP module to the checksum of the pseudo header
+In the case of TCP or UDP, the checksum field will be initially
+set by the TCP or UDP implementation to the checksum of the pseudo header
defined by the TCP and UDP specifications.
+In the case of SCTP, the checksum field will be initially
+set by the SCTP implementation to 0.
.Pp
On input, an interface indicates the actions it has performed
on a packet by setting one or more of the following flags in
@@ -1203,6 +1208,20 @@
calculated over any valid packet will be
.Li 0xFFFF
as long as the original checksum field is included.
+.Pp
+If a particular network interface just indicates success or
+failure of SCTP checksum validation without returning
+the exact value of the checksum to the host CPU, its driver can mark
+.Dv CSUM_DATA_VALID
+in
+.Va csum_flags .
+Note that the value of
+.Va csum_data
+is not relevant and
+.Dv CSUM_PSEUDO_HDR
+in
+.Va csum_data
+is not set, since SCTP does not use a pseudo header checksum.
.Sh STRESS TESTING
When running a kernel compiled with the option
.Dv MBUF_STRESS_TEST ,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 29, 10:12 AM (1 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24399760
Default Alt Text
D51590.id159277.diff (2 KB)
Attached To
Mode
D51590: mbuf.9: describe checksum offloading for SCTP
Attached
Detach File
Event Timeline
Log In to Comment