Linux bridge forwarding from/to TAP interfaces
0
votes
0
answers
24
views
As explained here in my own Q&A, reconsider the following scenario.
A Linux host with a two port Linux
bridge
and two Linux guest VMs
connected to it: the first bridge's port is connected to TAP
interface tap0
while the second to tap1
. tap0
and tap1
are backend TAP
interfaces associated to virtio-net
(frontend) interfaces each exposed to a QEMU
based VM
(lets say VM0
and VM1
).
As far as I can tell, when VM0
sends a frame/packet targeted to VM1
, VM0
QEMU
process's userland code calls write()
syscall on the fd
virtio-net
interface is associated to. From tap0
driver-code viewpoint, the RX
path is involved (basically tap0
is receiving a packet/frame from its "logical wires"), hence for instance the kernel netif_receive_skb()
function is executed in the context of VM0
QEMU
's process.
Furthermore the packet/frame is forwarded from the Linux bridge to the tap1
interface hence, from tap1
driver-code viewpoint, the TX
path is involved (basically tap1
is transmitting a packet/frame on its "logical wires"), hence for instance the kernel net_dev_xmit()
function is executed/run in the context of VM0
QEMU
's process as well.
Does it makes sense ? Thanks.
Asked by CarloC
(385 rep)
Jul 11, 2025, 10:19 AM
Last activity: Jul 11, 2025, 11:58 AM
Last activity: Jul 11, 2025, 11:58 AM