qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Stefano Garzarella <s.garzarella@evidence.eu.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] net: flush NetQueue before to send new packets
Date: Tue, 26 Jul 2016 10:25:21 +0800	[thread overview]
Message-ID: <5796CA11.6060204@redhat.com> (raw)
In-Reply-To: <20160719143316.9811-1-s.garzarella@evidence.eu.com>



On 2016年07月19日 22:33, Stefano Garzarella wrote:
> qemu_net_queue_send() and qemu_net_queue_send_iov() can flush
> enqueued packets before delivering a new packet, in this way the original
> packet ordering is preserved.
>
> Signed-off-by: Stefano Garzarella <s.garzarella@evidence.eu.com>
> ---
>   net/queue.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/net/queue.c b/net/queue.c
> index 9c32abd..aa18e5e 100644
> --- a/net/queue.c
> +++ b/net/queue.c
> @@ -196,14 +196,14 @@ ssize_t qemu_net_queue_send(NetQueue *queue,
>           return 0;
>       }
>   
> +    qemu_net_queue_flush(queue);
> +
>       ret = qemu_net_queue_deliver(queue, sender, flags, data, size);
>       if (ret == 0) {
>           qemu_net_queue_append(queue, sender, flags, data, size, sent_cb);
>           return 0;
>       }
>   
> -    qemu_net_queue_flush(queue);
> -
>       return ret;
>   }
>   
> @@ -221,14 +221,14 @@ ssize_t qemu_net_queue_send_iov(NetQueue *queue,
>           return 0;
>       }
>   
> +    qemu_net_queue_flush(queue);
> +
>       ret = qemu_net_queue_deliver_iov(queue, sender, flags, iov, iovcnt);
>       if (ret == 0) {
>           qemu_net_queue_append_iov(queue, sender, flags, iov, iovcnt, sent_cb);
>           return 0;
>       }
>   
> -    qemu_net_queue_flush(queue);
> -
>       return ret;
>   }
>   

Queued for 2.8.

Thanks

  reply	other threads:[~2016-07-26  2:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19 14:33 [Qemu-devel] [PATCH] net: flush NetQueue before to send new packets Stefano Garzarella
2016-07-26  2:25 ` Jason Wang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-07-19 14:05 Stefano Garzarella

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=5796CA11.6060204@redhat.com \
    --to=jasowang@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=s.garzarella@evidence.eu.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).