Does a Linux or OpenBSD TAP adapter queue up packets, or will it miss packets if I try to process them on a single thread as they come in? I'm not worried about not being able to process all the packets that come in, but if multiple packets come in right as processing starts on one then it might miss some if the adapter doesn't have an internal queue.

  • I don't know the answer, but I can't think of a situation where that would be an issue, because one should start the application that is "the other end" of the tun/tap interface and does the processing well before anything interesting happens. Starting it at just the moment when the packets you want to process arrive would be very tricky. And in general, all network software should expect that packets get dropped (possibly far before they even reach the tun/tap interface).
    – dirkt
    Commented Feb 16, 2018 at 18:29

1 Answer 1


After reading through Linux' drivers/net/tun.c and OpenBSD's sys/net/if_tun.c I have come to the conclusion that they both use queues for the packets.

Specifically, Linux uses a queue within the tun/tap driver and OpenBSD uses the preexisting network stack's queue.

I have not manually tested the queue functionality.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .