qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] directly inject packet in vrings and not use NetClient APIs
@ 2014-11-19 15:53 Anshul Makkar
  2014-11-19 17:39 ` Luke Gorrie
  0 siblings, 1 reply; 3+ messages in thread
From: Anshul Makkar @ 2014-11-19 15:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: Nikolay Nikolaev

[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]

Hi,

Vhost-net backend tap, implements read and write polls to listen for
packets in guest vrings (implemented through ioeventfds)  and gives direct
access to the guest vrings.
While transmitting the packet up to VM, tap backend uses
"qemu_send_packet_async"/ NetClient APIs to transmit the packets to the
virtio-net driver in guest which then delivers the packet to the app
running in VM.

Vhost-user backend behaves differently. It gives 3rd party user mode app
direct access to guest vrings. The app can directly receive packets after
the guest has posted in the vrings (throught kicks). Vhost-user has no read
and write poll and no ways of transferring the packet up to the VM.

I have implemented a usermode app that is using vhost-user backend and gets
direct access to the guest vrings. I am able to receive packets but when I
post directly to vring and issue kick, packets fails to reach the guest.
(ifconfig eth0 RX counter is unchanged. tcpdump also doesn't detect any
packets.) . I don't want to use any NetClient APIs and want to directly
inject packets into the guest vring.

Please can you share if my approach and understanding is correct.

Thanks
Anshul Makkar

[-- Attachment #2: Type: text/html, Size: 1328 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-19 21:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-19 15:53 [Qemu-devel] directly inject packet in vrings and not use NetClient APIs Anshul Makkar
2014-11-19 17:39 ` Luke Gorrie
2014-11-19 21:42   ` Anshul Makkar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).