qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: Zhi Yong Wu <zwu.kernel@gmail.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	Zhi Yong Wu <wuzhy@cn.ibm.com>, Laszlo Ersek <lersek@redhat.com>,
	qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 00/16] net: Move legacy QEMU VLAN code into net/hub.c
Date: Tue, 31 Jul 2012 09:51:33 +0100	[thread overview]
Message-ID: <20120731085133.GA4999@stefanha-thinkpad.localdomain> (raw)
In-Reply-To: <CAEH94LhQx93mKPk1SMDPnUnZxh=o5vpjK4bK1JS6v88JTVuFKQ@mail.gmail.com>

On Tue, Jul 31, 2012 at 10:22:37AM +0800, Zhi Yong Wu wrote:
> On Mon, Jul 30, 2012 at 11:49 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> > On Tue, Jul 24, 2012 at 4:35 PM, Stefan Hajnoczi
> > <stefanha@linux.vnet.ibm.com> wrote:
> >> [These patches are based on the net tree at git://github.com/stefanha/net]
> >>
> >> The QEMU net subsystem has the concept of separate network segments, called
> >> "VLANs".  Each VLAN is a broadcast domain so all net clients connected to the
> >> same VLAN can communicate with each other.
> >>
> >> Today this feature is mostly used with the "dump" backend, which saves packet
> >> captures to .pcap files.  It can still come in useful in other rare cases.
> >>
> >> This patch series moves the VLAN code out of net.c and into net/hub.c.  The
> >> idea is to introduce a software network hub along with hub port net clients.
> >> This way we can implement the same semantics of QEMU VLANs using just -netdev
> >> peer.  Then -netdev peer becomes the single method of connecting net clients.
> >>
> >> The end result of this series is that the net subsystem core is simplified.
> >> Now is a good time to do this because it saves us from modeling QEMU VLANs when
> >> we convert the net subsystem to QOM.
> >>
> >> Please note that this series preserves command-line compatibility with the QEMU
> >> VLAN feature.  No existing QEMU command-lines should break.
> >>
> >> I have tested the following configurations:
> >>  * -net user -net nic,model=virtio
> >>  * -net user,vlan=1 -net nic,model=virtio,vlan=1
> >>  * -net user,vlan=1 -net nic,model=virtio,vlan=1 -net user,vlan=2 -net nic,model=virtio,vlan=2
> >>  * -netdev user,id=netdev0 -device virtio-net-pci,netdev=netdev0
> >>  * -netdev user,id=netdev0 -device virtio-net-pci,netdev=netdev0 -net user,vlan=2 -net nic,model=virtio,vlan=2
> >>
> >> v2:
> >>  * Change int64_t and unsigned int mess to int which is what VLAN IDs are today [Laszlo]
> >>  * Remove bogus error_set() -> qerror_report() merge artifact [Laszlo]
> >>  * Use net_hub_id_for_client(nc, NULL) == 0 instead of adding net_hub_port_peer_nc() [Laszlo]
> >>  * Fix stray print_net_client(..., NetClientState *vc) argument name [Laszlo]
> >>  * Consistently update vlan -> peer argument name [Laszlo]
> >>  * Drop spurious closesocket(fd), probably merge conflict [Stefan]
> >>
> >> Stefan Hajnoczi (11):
> >>   net: Add a hub net client
> >>   net: Use hubs for the vlan feature
> >>   net: Look up 'vlan' net clients using hubs
> >>   hub: Check that hubs are configured correctly
> >>   net: Drop vlan argument to qemu_new_net_client()
> >>   net: Remove vlan code from net.c
> >>   net: Remove VLANState
> >>   net: Rename non_vlan_clients to net_clients
> >>   net: Rename VLANClientState to NetClientState
> >>   net: Rename vc local variables to nc
> >>   net: Rename qemu_del_vlan_client() to qemu_del_net_client()
> >>
> >> Zhi Yong Wu (5):
> >>   net: Convert qdev_prop_vlan to peer with hub
> >>   net: Make "info network" output more readable info
> >>   net: cleanup deliver/deliver_iov func pointers
> >>   net: determine if packets can be sent before net queue deliver
> >>     packets
> >>   hub: add the support for hub own flow control
> >>
> >>  hw/cadence_gem.c        |    8 +-
> >>  hw/dp8393x.c            |    7 +-
> >>  hw/e1000.c              |   10 +-
> >>  hw/eepro100.c           |    8 +-
> >>  hw/etraxfs_eth.c        |    8 +-
> >>  hw/exynos4_boards.c     |    2 +-
> >>  hw/highbank.c           |    2 +-
> >>  hw/integratorcp.c       |    2 +-
> >>  hw/kzm.c                |    2 +-
> >>  hw/lan9118.c            |    8 +-
> >>  hw/lance.c              |    2 +-
> >>  hw/mcf5208.c            |    2 +-
> >>  hw/mcf_fec.c            |    7 +-
> >>  hw/milkymist-minimac2.c |    6 +-
> >>  hw/mips_mipssim.c       |    2 +-
> >>  hw/mips_r4k.c           |    2 +-
> >>  hw/mipsnet.c            |    6 +-
> >>  hw/musicpal.c           |    6 +-
> >>  hw/ne2000-isa.c         |    2 +-
> >>  hw/ne2000.c             |    8 +-
> >>  hw/ne2000.h             |    4 +-
> >>  hw/opencores_eth.c      |    8 +-
> >>  hw/pcnet-pci.c          |    4 +-
> >>  hw/pcnet.c              |    6 +-
> >>  hw/pcnet.h              |    6 +-
> >>  hw/qdev-properties.c    |   54 +++--
> >>  hw/qdev.c               |    2 -
> >>  hw/qdev.h               |    7 +-
> >>  hw/rtl8139.c            |   10 +-
> >>  hw/smc91c111.c          |    6 +-
> >>  hw/spapr_llan.c         |    4 +-
> >>  hw/stellaris_enet.c     |    6 +-
> >>  hw/usb/dev-network.c    |    8 +-
> >>  hw/vexpress.c           |    2 +-
> >>  hw/vhost_net.c          |   24 +-
> >>  hw/vhost_net.h          |    2 +-
> >>  hw/virtio-net.c         |   12 +-
> >>  hw/xen_nic.c            |    7 +-
> >>  hw/xgmac.c              |    6 +-
> >>  hw/xilinx_axienet.c     |    6 +-
> >>  hw/xilinx_ethlite.c     |    6 +-
> >>  hw/xtensa_lx60.c        |    2 +-
> >>  net.c                   |  616 ++++++++++++++---------------------------------
> >>  net.h                   |   86 +++----
> >>  net/Makefile.objs       |    2 +-
> >>  net/dump.c              |   27 ++-
> >>  net/dump.h              |    2 +-
> >>  net/hub.c               |  339 ++++++++++++++++++++++++++
> >>  net/hub.h               |   29 +++
> >>  net/queue.c             |   38 ++-
> >>  net/queue.h             |   25 +-
> >>  net/slirp.c             |   34 ++-
> >>  net/slirp.h             |    2 +-
> >>  net/socket.c            |   60 ++---
> >>  net/socket.h            |    2 +-
> >>  net/tap-win32.c         |   26 +-
> >>  net/tap.c               |   44 ++--
> >>  net/tap.h               |   20 +-
> >>  net/vde.c               |   16 +-
> >>  net/vde.h               |    2 +-
> >>  qapi-schema.json        |   30 ++-
> >>  qemu-common.h           |    3 +-
> >>  slirp/if.c              |    5 -
> >>  slirp/libslirp.h        |    1 -
> >>  64 files changed, 905 insertions(+), 796 deletions(-)
> >>  create mode 100644 net/hub.c
> >>  create mode 100644 net/hub.h
> >>
> >> --
> >> 1.7.10.4
> >
> > Merged into the net tree:
> > https://github.com/stefanha/qemu/tree/net
> Just checked, and didn't see related commits in your net tree.

Pushed.

Stefan

      reply	other threads:[~2012-07-31  8:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-24 15:35 [Qemu-devel] [PATCH v2 00/16] net: Move legacy QEMU VLAN code into net/hub.c Stefan Hajnoczi
2012-07-24 15:35 ` [Qemu-devel] [PATCH v2 01/16] net: Add a hub net client Stefan Hajnoczi
2012-07-24 15:35 ` [Qemu-devel] [PATCH v2 02/16] net: Use hubs for the vlan feature Stefan Hajnoczi
2012-07-24 15:35 ` [Qemu-devel] [PATCH v2 03/16] net: Look up 'vlan' net clients using hubs Stefan Hajnoczi
2012-07-24 15:35 ` [Qemu-devel] [PATCH v2 04/16] hub: Check that hubs are configured correctly Stefan Hajnoczi
2012-07-24 15:35 ` [Qemu-devel] [PATCH v2 05/16] net: Drop vlan argument to qemu_new_net_client() Stefan Hajnoczi
2012-07-24 15:35 ` [Qemu-devel] [PATCH v2 06/16] net: Convert qdev_prop_vlan to peer with hub Stefan Hajnoczi
2012-07-24 15:35 ` [Qemu-devel] [PATCH v2 07/16] net: Remove vlan code from net.c Stefan Hajnoczi
2012-07-24 15:35 ` [Qemu-devel] [PATCH v2 08/16] net: Remove VLANState Stefan Hajnoczi
2012-07-24 15:35 ` [Qemu-devel] [PATCH v2 09/16] net: Rename non_vlan_clients to net_clients Stefan Hajnoczi
2012-07-24 15:35 ` [Qemu-devel] [PATCH v2 10/16] net: Rename VLANClientState to NetClientState Stefan Hajnoczi
2012-07-24 15:35 ` [Qemu-devel] [PATCH v2 11/16] net: Rename vc local variables to nc Stefan Hajnoczi
2012-07-24 15:35 ` [Qemu-devel] [PATCH v2 12/16] net: Rename qemu_del_vlan_client() to qemu_del_net_client() Stefan Hajnoczi
2012-07-24 15:35 ` [Qemu-devel] [PATCH v2 13/16] net: Make "info network" output more readable info Stefan Hajnoczi
2012-07-24 15:35 ` [Qemu-devel] [PATCH v2 14/16] net: cleanup deliver/deliver_iov func pointers Stefan Hajnoczi
2012-07-24 15:35 ` [Qemu-devel] [PATCH v2 15/16] net: determine if packets can be sent before net queue deliver packets Stefan Hajnoczi
2012-07-24 15:35 ` [Qemu-devel] [PATCH v2 16/16] hub: add the support for hub own flow control Stefan Hajnoczi
2012-07-25  1:06 ` [Qemu-devel] [PATCH v2 00/16] net: Move legacy QEMU VLAN code into net/hub.c Laszlo Ersek
2012-07-25 13:19 ` Laszlo Ersek
2012-07-30 15:49 ` Stefan Hajnoczi
2012-07-31  2:22   ` Zhi Yong Wu
2012-07-31  8:51     ` Stefan Hajnoczi [this message]

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=20120731085133.GA4999@stefanha-thinkpad.localdomain \
    --to=stefanha@linux.vnet.ibm.com \
    --cc=lersek@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=wuzhy@cn.ibm.com \
    --cc=zwu.kernel@gmail.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).