From 9d148627f82f4325b499e023c5cbf8afd5f988f6 Mon Sep 17 00:00:00 2001 From: Bruno Dal Bo Date: Wed, 18 Nov 2020 07:03:02 -0800 Subject: Introduce stack.WritePacketToRemote, remove LinkEndpoint.WriteRawPacket Redefine stack.WritePacket into stack.WritePacketToRemote which lets the NIC decide whether to append link headers. PiperOrigin-RevId: 343071742 --- pkg/tcpip/link/fdbased/endpoint.go | 5 ----- 1 file changed, 5 deletions(-) (limited to 'pkg/tcpip/link/fdbased/endpoint.go') diff --git a/pkg/tcpip/link/fdbased/endpoint.go b/pkg/tcpip/link/fdbased/endpoint.go index 975309fc8..fc620c7d5 100644 --- a/pkg/tcpip/link/fdbased/endpoint.go +++ b/pkg/tcpip/link/fdbased/endpoint.go @@ -558,11 +558,6 @@ func viewsEqual(vs1, vs2 []buffer.View) bool { return len(vs1) == len(vs2) && (len(vs1) == 0 || &vs1[0] == &vs2[0]) } -// WriteRawPacket implements stack.LinkEndpoint.WriteRawPacket. -func (e *endpoint) WriteRawPacket(vv buffer.VectorisedView) *tcpip.Error { - return rawfile.NonBlockingWrite(e.fds[0], vv.ToView()) -} - // InjectOutobund implements stack.InjectableEndpoint.InjectOutbound. func (e *endpoint) InjectOutbound(dest tcpip.Address, packet []byte) *tcpip.Error { return rawfile.NonBlockingWrite(e.fds[0], packet) -- cgit v1.2.3