From: Liu Ping Fan <pingf...@linux.vnet.ibm.com> changes v1->v2 Because the NetQueue is exposed not just from qemu_send_queue_xx(), so separating locks -- use NetQueue(NetQueue->lock) to protect the queue, and use nc->send_lock for the access of nc->peer so we can protect the sender from the remover.
Question: Use AioContexts for hub or the raw GSource Liu Ping Fan (5): net: spread hub on AioContexts net: hub use lock to protect ports list net: introduce lock to protect NetQueue net: introduce lock to protect NetClientState's peer's access net: make netclient re-entrant with refcnt hw/qdev-properties-system.c | 15 +++++ include/block/aio.h | 1 + include/net/net.h | 12 ++++ include/net/queue.h | 14 +++++ main-loop.c | 5 ++ net/hub.c | 81 +++++++++++++++++++++++++++-- net/net.c | 122 ++++++++++++++++++++++++++++++++++++++++-- net/queue.c | 19 +++++-- net/slirp.c | 3 +- 9 files changed, 257 insertions(+), 15 deletions(-) -- 1.7.4.4