* [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
* Re: [Qemu-devel] directly inject packet in vrings and not use NetClient APIs
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
0 siblings, 1 reply; 3+ messages in thread
From: Luke Gorrie @ 2014-11-19 17:39 UTC (permalink / raw)
To: Anshul Makkar; +Cc: qemu-devel, Nikolay Nikolaev
[-- Attachment #1: Type: text/plain, Size: 695 bytes --]
Hi Anshul,
On Wednesday, November 19, 2014, Anshul Makkar <
anshul.makkar@profitbricks.com> wrote:
>
>
> 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.) .
>
Sounds to me like something that should work.
I'd suggest debug-compiling the virtio-net driver in the guest to see why
it doesn't take the packet. Gets the kick? Processes the used ring? MAC
address is accepted? Etc. That has been the most productive approach for me.
[-- Attachment #2: Type: text/html, Size: 1028 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] directly inject packet in vrings and not use NetClient APIs
2014-11-19 17:39 ` Luke Gorrie
@ 2014-11-19 21:42 ` Anshul Makkar
0 siblings, 0 replies; 3+ messages in thread
From: Anshul Makkar @ 2014-11-19 21:42 UTC (permalink / raw)
To: Luke Gorrie; +Cc: qemu-devel, Nikolay Nikolaev
[-- Attachment #1: Type: text/plain, Size: 951 bytes --]
Thanks Luke..
Ok, so theoretically it should work.
That's useful suggestions. Let me debug virtio-net driver for possible
cause.
Thanks
Anshul Makkar
On Wed, Nov 19, 2014 at 6:39 PM, Luke Gorrie <luke@snabb.co> wrote:
> Hi Anshul,
>
> On Wednesday, November 19, 2014, Anshul Makkar <
> anshul.makkar@profitbricks.com> wrote:
>>
>>
>> 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.) .
>>
>
> Sounds to me like something that should work.
>
> I'd suggest debug-compiling the virtio-net driver in the guest to see why
> it doesn't take the packet. Gets the kick? Processes the used ring? MAC
> address is accepted? Etc. That has been the most productive approach for me.
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 1619 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).