diff options
author | Ghanan Gowripalan <ghanan@google.com> | 2021-09-09 12:31:53 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-09-09 12:34:54 -0700 |
commit | 2d9b33c0fd7d812a7296cd71f14c03925f815f28 (patch) | |
tree | 2ef3cfd9a7521a12b453f9d85b22229df80984d7 /pkg/tcpip/link/qdisc/fifo/endpoint.go | |
parent | 5e9c3a0b934f0dd7513e21372b3fd8593b87525b (diff) |
Remove link/packetsocket
This change removes NetworkDispatcher.DeliverOutboundPacket.
Since all packet writes go through the NIC (the only NetworkDispatcher),
we can deliver outgoing packets to interested packet endpoints before
writing the packet to the link endpoint as the stack expects that all
packets that get delivered to a link endpoint are transmitted on the
wire. That is, link endpoints no longer need to let the stack know when
it writes a packet as the stack already knows about the packet it writes
through a link endpoint.
PiperOrigin-RevId: 395761629
Diffstat (limited to 'pkg/tcpip/link/qdisc/fifo/endpoint.go')
-rw-r--r-- | pkg/tcpip/link/qdisc/fifo/endpoint.go | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/pkg/tcpip/link/qdisc/fifo/endpoint.go b/pkg/tcpip/link/qdisc/fifo/endpoint.go index dc63e5fb0..b41e3e2fa 100644 --- a/pkg/tcpip/link/qdisc/fifo/endpoint.go +++ b/pkg/tcpip/link/qdisc/fifo/endpoint.go @@ -108,11 +108,6 @@ func (e *endpoint) DeliverNetworkPacket(remote, local tcpip.LinkAddress, protoco e.dispatcher.DeliverNetworkPacket(remote, local, protocol, pkt) } -// DeliverOutboundPacket implements stack.NetworkDispatcher.DeliverOutboundPacket. -func (e *endpoint) DeliverOutboundPacket(remote, local tcpip.LinkAddress, protocol tcpip.NetworkProtocolNumber, pkt *stack.PacketBuffer) { - e.dispatcher.DeliverOutboundPacket(remote, local, protocol, pkt) -} - // Attach implements stack.LinkEndpoint.Attach. func (e *endpoint) Attach(dispatcher stack.NetworkDispatcher) { // nil means the NIC is being removed. |