summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/packet_buffer.go
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2019-11-22 14:41:04 -0800
committergVisor bot <gvisor-bot@google.com>2019-11-22 14:52:35 -0800
commit9db08c4e583e758e3eb1aed03875743ce02b8cff (patch)
tree97ac9a4fa187428fbd8304338679217447310ed8 /pkg/tcpip/packet_buffer.go
parentf27f38d13717a25721efb2b37fabadae5c34e374 (diff)
Use PacketBuffers with GSO.
PiperOrigin-RevId: 282045221
Diffstat (limited to 'pkg/tcpip/packet_buffer.go')
-rw-r--r--pkg/tcpip/packet_buffer.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/tcpip/packet_buffer.go b/pkg/tcpip/packet_buffer.go
index 695f7b188..ab24372e7 100644
--- a/pkg/tcpip/packet_buffer.go
+++ b/pkg/tcpip/packet_buffer.go
@@ -31,6 +31,14 @@ type PacketBuffer struct {
// or otherwise modified.
Data buffer.VectorisedView
+ // DataOffset is used for GSO output. It is the offset into the Data
+ // field where the payload of this packet starts.
+ DataOffset int
+
+ // DataSize is used for GSO output. It is the size of this packet's
+ // payload.
+ DataSize int
+
// Header holds the headers of outbound packets. As a packet is passed
// down the stack, each layer adds to Header.
Header buffer.Prependable