mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-15 16:16:52 +01:00
more ram -> more speed
This commit is contained in:
1 parent
7896f2093b
commit
1c9d8bcceb
4 files changed
+22
-5
No files matched your search
@@ -45,6 +45,11 @@ func (b *SendBatch) Reserve(sz int) []byte {
|
||||
return b.backing[start : start+sz : start+sz]
|
||||
}
|
||||
|
||||
// Len reports how many packets are queued for the next Flush. Callers use
|
||||
// it to flush incrementally once a full sendmmsg batch has accumulated,
|
||||
// bounding how long the first packet of a large read batch waits.
|
||||
func (b *SendBatch) Len() int { return len(b.bufs) }
|
||||
|
||||
func (b *SendBatch) Commit(pkt []byte, dst netip.AddrPort, outerECN byte) {
|
||||
b.bufs = append(b.bufs, pkt)
|
||||
b.dsts = append(b.dsts, dst)
|
||||
|
||||
Reference in new issue
Block a user