tio.Offload.WriteGSO: reject 0-len packets, check seg lengths

This commit is contained in:
JackDoan
2026-07-29 11:51:12 -05:00
parent 5c0f6e2b5f
commit b39bae57ec
4 changed files with 64 additions and 80 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ const (
// (mutable: the L4 checksum field must hold the pseudo-header partial, single-fold not inverted, per virtio NEEDS_CSUM semantics).
// pays are non-overlapping payload fragments whose concatenation is the full superpacket payload.
// They are read-only from the writer's perspective and must remain valid until the call returns.
// Every segment in pays except possibly the last is exactly the same size.
// Every segment in pays except possibly the last must be exactly the same size.
// proto picks the L4 protocol so the writer knows which gsoType / CsumOffset to set.
//
// Callers should also consult CapsProvider (via SupportsGSO) for the per-protocol negotiated capability: