diff options
-rw-r--r-- | pkg/tcpip/link/fdbased/mmap_amd64_unsafe.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkg/tcpip/link/fdbased/mmap_amd64_unsafe.go b/pkg/tcpip/link/fdbased/mmap_amd64_unsafe.go index d88c3f8a5..e49cf9f61 100644 --- a/pkg/tcpip/link/fdbased/mmap_amd64_unsafe.go +++ b/pkg/tcpip/link/fdbased/mmap_amd64_unsafe.go @@ -40,11 +40,13 @@ const ( // We overallocate the frame size to accommodate space for the // TPacketHdr+RawSockAddrLinkLayer+MAC header and any padding. // +// Memory allocated for the ring buffer: tpBlockSize * tpBlockNR = 2 MiB +// // NOTE: Frames need to be aligned at 16 byte boundaries. const ( tpFrameSize = 65536 + 128 - tpBlockSize = tpFrameSize * 128 - tpBlockNR = 10 + tpBlockSize = tpFrameSize * 32 + tpBlockNR = 1 tpFrameNR = (tpBlockSize * tpBlockNR) / tpFrameSize ) |