qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: sfeldma@gmail.com
Cc: famz@redhat.com, jiri@resnulli.us, qemu-devel@nongnu.org
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	[thread overview]
Message-ID: <20150702130414.GF21214@stefanha-thinkpad.home> (raw)
In-Reply-To: <1435717553-36187-1-git-send-email-sfeldma@gmail.com>

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

On Tue, Jun 30, 2015 at 07:25:53PM -0700, sfeldma@gmail.com wrote:
> From: Scott Feldman <sfeldma@gmail.com>
> 
> 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 <sfeldma@gmail.com>
> ---
> v2: return -1 to drop pkt, review comment from famz@redhat.com
> 
>  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 #2: Type: application/pgp-signature, Size: 473 bytes --]

      parent reply	other threads:[~2015-07-02 13:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-01  2:25 [Qemu-devel] [PATCH v2] rocker: don't queue receive pkts when port is disabled sfeldma
2015-07-01  2:52 ` Fam Zheng
2015-07-02 13:04 ` Stefan Hajnoczi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150702130414.GF21214@stefanha-thinkpad.home \
    --to=stefanha@redhat.com \
    --cc=famz@redhat.com \
    --cc=jiri@resnulli.us \
    --cc=qemu-devel@nongnu.org \
    --cc=sfeldma@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).