[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
- [Qemu-devel] [RFC PATCH v2 0/4] port network layer onto glib, Liu Ping Fan, 2013/03/28
- [Qemu-devel] [RFC PATCH v2 1/4] net: port tap onto glib, Liu Ping Fan, 2013/03/28
- [Qemu-devel] [RFC PATCH v2 2/4] net: resolve race of tap backend and its peer, Liu Ping Fan, 2013/03/28
- [Qemu-devel] [RFC PATCH v2 3/4] net: port hub onto glib, Liu Ping Fan, 2013/03/28
- Re: [Qemu-devel] [RFC PATCH v2 3/4] net: port hub onto glib,
Stefan Hajnoczi <=
- [Qemu-devel] [RFC PATCH v2 4/4] net: port virtio net onto glib, Liu Ping Fan, 2013/03/28
- Re: [Qemu-devel] [RFC PATCH v2 0/4] port network layer onto glib, Paolo Bonzini, 2013/03/28
- Re: [Qemu-devel] [RFC PATCH v2 0/4] port network layer onto glib, Stefan Hajnoczi, 2013/03/28