less garbage

This commit is contained in:
JackDoan
2025-11-17 13:30:02 -06:00
parent f07275edff
commit 625acb7cc0
7 changed files with 16 additions and 15 deletions

View File

@@ -347,7 +347,8 @@ func (f *Interface) listenIn(reader overlay.TunDev, queueNum int) {
for i, pkt := range packets[:n] {
outPackets[i].OutLen = -1
f.consumeInsidePacket(pkt.Payload, fwPacket, nb, outPackets[i], queueNum, conntrackCache.Get(f.l), now)
_ = pkt.Recycle(i == (n - 1))
reader.RecycleRxSeg(pkt, i == (n-1), queueNum) //todo handle err?
pkt.Reset()
}
_, err = f.writers[queueNum].WriteBatch(outPackets[:n])
if err != nil {