diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-09-30 22:56:27 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-09-30 22:56:27 +0000 |
commit | d983f94cc45ab937cd5d9483797c4e7eeeb243fa (patch) | |
tree | 279358d8e2a6dcff11ba97bbb7d6b6e7dff5c712 | |
parent | 11dab63263763bb078a34ed7def4ac435ac6c9ba (diff) | |
parent | bcbb3ef317cb029f2553a8cdc03801f517b0fde4 (diff) |
Merge release-20190806.1-213-gbcbb3ef (automated)
-rw-r--r-- | pkg/tcpip/link/fdbased/endpoint.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/pkg/tcpip/link/fdbased/endpoint.go b/pkg/tcpip/link/fdbased/endpoint.go index 584db710e..7636418b1 100644 --- a/pkg/tcpip/link/fdbased/endpoint.go +++ b/pkg/tcpip/link/fdbased/endpoint.go @@ -82,7 +82,19 @@ const ( PacketMMap ) -// An endpoint implements the link-layer using a message-oriented file descriptor. +func (p PacketDispatchMode) String() string { + switch p { + case Readv: + return "Readv" + case RecvMMsg: + return "RecvMMsg" + case PacketMMap: + return "PacketMMap" + default: + return fmt.Sprintf("unknown packet dispatch mode %v", p) + } +} + type endpoint struct { // fds is the set of file descriptors each identifying one inbound/outbound // channel. The endpoint will dispatch from all inbound channels as well as |