qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH v2 3/4] net: port hub onto glib


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [RFC PATCH v2 3/4] net: port hub onto glib
Date: Thu, 28 Mar 2013 15:47:48 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Mar 28, 2013 at 03:55:54PM +0800, Liu Ping Fan wrote:
> From: Liu Ping Fan <address@hidden>
> 
> Attach each hubport with a GSource. Currently the GSource is attached
> to default main context, and the hub still run on iothread, but in
> future, after making the whole layer thread-safe, we will admit ports
> to run on different thread.
> 
> Signed-off-by: Liu Ping Fan <address@hidden>
> ---
>  hw/qdev-properties-system.c |    1 +
>  include/net/queue.h         |   14 ++++++++++++++
>  net/hub.c                   |   34 ++++++++++++++++++++++++++++++++--
>  net/net.c                   |    1 +
>  net/queue.c                 |    4 ++--
>  5 files changed, 50 insertions(+), 4 deletions(-)

There are two possibilities when a hub is used:

1. All net clients on the hub run in the same event loop.

We don't need any code changes to make this work.

2. Net clients run in different event loops.

I don't think this case matters, let's forbid it.  It's not worth adding
more complexity to the net subsystem in order to support it.

Can you think of a use case that is well-served by net clients in
multiple event loops?

Stefan



reply via email to

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