summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/link/qdisc
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-01-15 23:20:59 +0000
committergVisor bot <gvisor-bot@google.com>2021-01-15 23:20:59 +0000
commit7fabef0a1c7ffd7a97234a83360f48aebd791d9b (patch)
tree0cadac4f2f602baa079d2a87b10c586d90cc857c /pkg/tcpip/link/qdisc
parent8103a494e649e9e7dcbe90bcd8cb38684f6cc669 (diff)
parent55c7fe48d223ee5678dff7f5bf9a9e5f0482ab37 (diff)
Merge release-20210112.0-34-g55c7fe48d (automated)
Diffstat (limited to 'pkg/tcpip/link/qdisc')
-rw-r--r--pkg/tcpip/link/qdisc/fifo/endpoint.go11
1 files changed, 4 insertions, 7 deletions
diff --git a/pkg/tcpip/link/qdisc/fifo/endpoint.go b/pkg/tcpip/link/qdisc/fifo/endpoint.go
index b7458b620..1af5daa11 100644
--- a/pkg/tcpip/link/qdisc/fifo/endpoint.go
+++ b/pkg/tcpip/link/qdisc/fifo/endpoint.go
@@ -166,15 +166,12 @@ func (e *endpoint) WritePacket(r *stack.Route, gso *stack.GSO, protocol tcpip.Ne
}
// WritePackets implements stack.LinkEndpoint.WritePackets.
-//
-// Being a batch API, each packet in pkts should have the following fields
-// populated:
-// - pkt.EgressRoute
-// - pkt.GSOOptions
-// - pkt.NetworkProtocolNumber
-func (e *endpoint) WritePackets(_ *stack.Route, _ *stack.GSO, pkts stack.PacketBufferList, _ tcpip.NetworkProtocolNumber) (int, *tcpip.Error) {
+func (e *endpoint) WritePackets(r *stack.Route, gso *stack.GSO, pkts stack.PacketBufferList, protocol tcpip.NetworkProtocolNumber) (int, *tcpip.Error) {
enqueued := 0
for pkt := pkts.Front(); pkt != nil; {
+ pkt.EgressRoute = r
+ pkt.GSOOptions = gso
+ pkt.NetworkProtocolNumber = protocol
d := e.dispatchers[int(pkt.Hash)%len(e.dispatchers)]
nxt := pkt.Next()
if !d.q.enqueue(pkt) {