qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How does virtio-net tx and rx work in TCG?


From: Arnabjyoti Kalita
Subject: How does virtio-net tx and rx work in TCG?
Date: Sun, 13 Jun 2021 12:47:45 +0530

Hello all,

I am trying to understand how the virtio-net device works without ioeventfd mechanisms (that happens in a system that has KVM support). I'm still trying to figure out the internals of ioeventfd (but that doesn't matter at this point).

My host and target architecture are both x86_64.

I start QEMU (version 5.1) using the below command line -

sudo ./qemu-system-x86_64 -m 1024 -netdev tap,id=tap1,ifname=tap0,script=no,downscript=no -device virtio-net-pci,netdev=tap1,mac=00:00:00:00:00:00,tx=timer -drive file=~/os_images_for_qemu/ubuntu-16.04-desktop-amd64.qcow2,format=qcow2,if=none,id=img-direct -device virtio-blk-pci,drive=img-direct -loadvm vm-20210608070105 -d nochain,in_asm,cpu,exec

In KVM, the processing of network packets happens in a deferred method outside of the vCPU thread. There is a VMEXIT via "vp_notify" that wakes up the IOThread to start processing n/w packets.

How does it happen when the tcg mode is in operation and the guest wants to send or receive network packets?

If processing in TCG still happens in a deferred IOThread, outside of the vCPU thread, can I change the processing to happen in the same vCPU thread? What changes do I have to make to ensure synchronous processing of network packets happens in TCG?

Thanks for all your help so far.

Best regards,
Arnabjyoti Kalita

reply via email to

[Prev in Thread] Current Thread [Next in Thread]