Skip to content

port network layer onto glib

Liu Ping Fan qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14util: introduce gsource event abstractionutil/Makefile.objs util/event_gsource.c util/event_gsource.h+207 -00 replies
2/14net: introduce bind_ctx to NetClientInfoinclude/net/net.h+2 -00 replies
3/14net: port vde onto GSourcenet/vde.c+29 -20 replies
4/14net: port socket to GSourcenet/socket.c+161 -330 replies
5/14net: port tap onto GSourcenet/tap.c+54 -100 replies
6/14net: port tap-win32 onto GSourcenet/tap-win32.c+29 -20 replies
7/14net: hub use lock to protect ports listnet/hub.c+24 -12 replies
8/14net: introduce lock to protect NetQueuenet/queue.c+11 -01 reply
9/14net: introduce lock to protect NetClientState's peer's accessinclude/net/net.h net/net.c net/queue.c+84 -60 replies
10/14net: make netclient re-entrant with refcnthw/qdev-properties-system.c include/net/net.h net/hub.c +2 more+65 -40 replies
11/14slirp: make timeout localslirp/slirp.c slirp/slirp.h+13 -120 replies
12/14slirp: make slirp event dispatch based on slirp instance, not globalmain-loop.c net/slirp.c slirp/libslirp.h +4 more+299 -3220 replies
13/14slirp: handle race conditionslirp/if.c slirp/main.h slirp/mbuf.h +2 more+115 -340 replies
14/14slirp: use lock to protect the slirp_instancesinclude/qemu/module.h slirp/slirp.c+22 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH v1 00/14] port network layer onto glib

summary:
patch1: GSource event abstraction
patch2~6: port network backend to glib
patch7~10: make network core re-entrant
patch11~14: port the slirp backend onto glib

The slirp->lock's deadlock problem has been eliminated and works fine. And other components seems more stable, so I change from RFCv- to v-

rfcv5->v1:
1. re-arrange logic for net/socket.c

rfcv4->rfcv5:
1.use GList to reimplement EventsGSource
2.make readable()/writable() return events which the backend is interested in 3.fix the slirp->lock's potential deadlock issue

rfcv3->rfcv4:
1.separate GSource event to dedicated file
2.integrated with net core re-entrant
3.make slirp/ re-entrant

rfcv2->rfcv3:
1.drop hub and the frontend(virtio net)
2.split the patch for NetClientSource

rfcv1->rfcv2:
1.NetClientState can associate with up to 2 GSource, for virtio net, one for tx, one for rx,
so vq can run on different threads.
2.make network front-end onto glib, currently virtio net dataplane

Liu Ping Fan (14):
util: introduce gsource event abstraction
net: introduce bind_ctx to NetClientInfo
net: port vde onto GSource
net: port socket to GSource
net: port tap onto GSource
net: port tap-win32 onto GSource
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
slirp: make timeout local
slirp: make slirp event dispatch based on slirp instance, not global
slirp: handle race condition
slirp: use lock to protect the slirp_instances

 hw/qdev-properties-system.c |   14 +
 include/net/net.h           |   12 +
 include/qemu/module.h       |    2 +
 main-loop.c                 |    4 -
 net/hub.c                   |   28 ++-
 net/net.c                   |  123 ++++++++-
 net/queue.c                 |   15 +-
 net/slirp.c                 |   35 +++-
 net/socket.c                |  194 +++++++++++---
 net/tap-win32.c             |   31 ++-
 net/tap.c                   |   64 ++++-
 net/vde.c                   |   31 ++-
 slirp/if.c                  |   57 +++-
 slirp/libslirp.h            |    7 +-
 slirp/main.h                |    3 +-
 slirp/mbuf.h                |    2 +
 slirp/slirp.c               |  670 ++++++++++++++++++++++---------------------
 slirp/slirp.h               |   11 +-
 slirp/socket.c              |    2 +
 slirp/socket.h              |    1 +
 stubs/slirp.c               |    8 -
 util/Makefile.objs          |    1 +
 util/event_gsource.c        |  157 ++++++++++
 util/event_gsource.h        |   49 ++++
 24 files changed, 1105 insertions(+), 416 deletions(-)
 create mode 100644 util/event_gsource.c
 create mode 100644 util/event_gsource.h
Signature · 1 line
1.7.4.4