mirror of
https://github.com/slackhq/nebula.git
synced 2025-12-31 02:58:28 +01:00
pre-fill the tx ring with bogus empty packets
This commit is contained in:
@@ -806,8 +806,11 @@ func (t *tun) WriteMany(x []*packet.OutPacket, q int) (int, error) {
|
||||
}
|
||||
|
||||
func (t *tun) RecycleRxSeg(pkt TunPacket, kick bool, q int) error {
|
||||
if pkt.GetPayload() == nil {
|
||||
return nil
|
||||
}
|
||||
vpkt := pkt.(*vhostnet.VirtIOPacket)
|
||||
err := t.vdev[q].ReceiveQueue.OfferDescriptorChains(vpkt.Chains, kick)
|
||||
err := t.vdev[q].ReceiveQueue.OfferDescriptorChains([]uint16{vpkt.Chain}, kick)
|
||||
vpkt.Reset() //intentionally ignoring err!
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user