This commit is contained in:
JackDoan
2026-07-31 14:31:42 -05:00
parent adfacc43c3
commit 42c937d86f
+6 -10
View File
@@ -43,8 +43,8 @@ type Queue interface {
// Single-reader only: not safe for concurrent Reads (it reuses per-queue rx scratch each call). // Single-reader only: not safe for concurrent Reads (it reuses per-queue rx scratch each call).
Read() ([]Packet, error) Read() ([]Packet, error)
// Write emits a single packet on the plaintext (outside→inside) // Write emits a single packet on the plaintext (outside→inside) delivery path.
// delivery path. Safe for concurrent use. // Safe for concurrent use.
Write(p []byte) (int, error) Write(p []byte) (int, error)
} }
@@ -61,17 +61,13 @@ type Packet struct {
// The zero value means Bytes is one regular IP datagram and no segmentation is required. // The zero value means Bytes is one regular IP datagram and no segmentation is required.
type GSOInfo struct { type GSOInfo struct {
// Size is the GSO segment size: max payload bytes per segment // Size is the GSO segment size: max payload bytes per segment
// (== TCP MSS for TSO, == UDP payload chunk for USO). Zero means // (== TCP MSS for TSO, == UDP payload chunk for USO). Zero means not a superpacket.
// not a superpacket.
Size uint16 Size uint16
// HdrLen is the total L3+L4 header length within Bytes (already // HdrLen is the total L3+L4 header length within Bytes (already corrected via correctHdrLen, so safe to slice on).
// corrected via correctHdrLen, so safe to slice on).
HdrLen uint16 HdrLen uint16
// CsumStart is the L4 header offset inside Bytes (== L3 header // CsumStart is the L4 header offset inside Bytes (== L3 header length).
// length).
CsumStart uint16 CsumStart uint16
// Proto picks the L4 protocol (TCP or UDP) so the segmenter knows // Proto picks the L4 protocol (TCP or UDP) so the segmenter knows which checksum/header layout to apply.
// which checksum/header layout to apply.
Proto GSOProto Proto GSOProto
} }