« Previous | Next » 

Revision b8168679

IDb81686795b7175d3b9f4c140005aa425688b9aef
Parent 762a28c6
Child 703508c0, c4ae4fb1

Added by Apollon Oikonomopoulos almost 10 years ago

KVM: set IFF_ONE_QUEUE on created tap interfaces

The IFF_ONE_QUEUE flag directs the kernel to only queue tap packets once
(as opposed to queueing them twice, once for the device, and once for the
qdisc), possibly avoiding interface stalls when one of the queues overruns.

This is the default behaviour of the kernel tun/tap driver in Linux

= 3.8. Also, qemu >= 1.5.0 sets this flag when opening the tap device

itself (but not for tap interfaces inherited via fds), according to this
commit:

commit d26e445c80fddcc7483b83f3115e5067fef28fe6
Author: Peter Lieven <>
Date: Mon Feb 25 10:17:08 2013 +0100
tap: set IFF_ONE_QUEUE per default
historically the kernel queues packets two times. once
at the device and second in qdisc. this is believed to cause
interface stalls if one of these queues overruns.
setting IFF_ONE_QUEUE is the default in kernels >= 3.8. the
flag is ignored since then. see kernel commit
5d097109257c03a71845729f8db6b5770c4bbedc
Signed-off-by: Peter Lieven <>
Acked-by: Michael S. Tsirkin <>
Signed-off-by: Stefan Hajnoczi <>

Since we handle tap creation ourselves, we duplicate this behavior in
_OpenTap. IFF_ONE_QUEUE has been there as far back as the kernel's git
history goes (2.6.12), so it is safe to add the flag unconditionally.
Also the flag is invisible to the guest and will not break migrations of
already running instances.

Signed-off-by: Apollon Oikonomopoulos <>
Reviewed-by: Hrvoje Ribicic <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences