qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] rocker: don't queue receive pkts when port i


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v2] rocker: don't queue receive pkts when port is disabled
Date: Thu, 2 Jul 2015 14:04:14 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, Jun 30, 2015 at 07:25:53PM -0700, address@hidden wrote:
> From: Scott Feldman <address@hidden>
> 
> Commit 6e99c63 ("net/socket: Drop net_socket_can_send") changed the
> semantics around .can_receive for sockets to now require the device to
> flush queued pkts when transitioning to a .can_receive=true state.  Rocker
> device was not flushing the queue on .can_receive=true transition, so the
> receiver was stuck.
> 
> But, turns out we really don't want any queuing at all on the port when the
> port is disabled, otherwise when the port transitions to enabled, we'd
> receive and forward stale pkts that really should have been dropped.  So,
> let's remove .can_receive so avoid queuing and drop the pkt in .receive if
> the port is disabled.
> 
> Signed-off-by: Scott Feldman <address@hidden>
> ---
> v2: return -1 to drop pkt, review comment from address@hidden
> 
>  hw/net/rocker/rocker_fp.c |   18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)

Thanks, applied to my net tree:
https://github.com/stefanha/qemu/commits/net

Stefan

Attachment: pgp6H4hfnBpik.pgp
Description: PGP signature


reply via email to

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