qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] net: add drop_packets parameter to -net nic


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] net: add drop_packets parameter to -net nic
Date: Tue, 26 Apr 2011 10:14:34 +0100

On Mon, Apr 25, 2011 at 3:06 PM, Nguyen Thai Ngoc Duy <address@hidden> wrote:
> 2011/4/25 Stefan Hajnoczi <address@hidden>:
>> 2011/4/25 Nguyễn Thái Ngọc Duy <address@hidden>:
>>> Dropping packets is sometimes perferred behavior. Add drop_packets
>>> parameter to NICConf struct and let nic simulation decide how to use
>>> it.
>>>
>>> Only e1000 supports this for now.
>>>
>>> Signed-off-by: Nguyễn Thái Ngọc Duy <address@hidden>
>>> ---
>>>  Documentation is missing, but I'm not even sure if there's any other
>>>  user who finds this useful.
>>
>> Can you explain why you are adding this?  You are trying to bypass the
>> send queue and drop packets instead?
>
> Yes.
>
> I have a driver that does connection hand shaking at ethernet level.
> If anything goes wrong, it disables rx and after a while a new session
> will be started from higher level. The other end has a timer and keeps
> sending data until it times out. If this end does not respond properly
> until the timer is timed out, the other end starts sending "connection
> request" packets periodically for a new session. When this end enables
> rx again, in real world it would receive a fresh req packet and send
> ack. Because of queuing, it receives packets from old session and
> sends out a series of nack because it expects req packet. Depends on
> how long rx is disabled until a new session is started, the driver
> will have to process all queued (invalid) packets and delay session
> establishment some more.
>
> I think dropping packets will improve this situation. But again, this
> driver is peculiar. I don't think there are many drivers that do
> dialog-style like this.

The behavior you are describing sounds like a bug in QEMU's network
layer.  If RX is disabled we should not queue incoming packets.

Have you looked into fixing QEMU so that the queue is disabled when RX
is disabled?

Stefan



reply via email to

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