From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIa0d-0007Du-6d for qemu-devel@nongnu.org; Tue, 03 Feb 2015 04:43:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIa0b-0008I1-KB for qemu-devel@nongnu.org; Tue, 03 Feb 2015 04:43:03 -0500 Received: from mail-we0-x231.google.com ([2a00:1450:400c:c03::231]:36078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIa0b-0008HI-Al for qemu-devel@nongnu.org; Tue, 03 Feb 2015 04:43:01 -0500 Received: by mail-we0-f177.google.com with SMTP id l61so43795879wev.8 for ; Tue, 03 Feb 2015 01:43:00 -0800 (PST) Date: Mon, 2 Feb 2015 18:13:24 +0100 From: Stefan Hajnoczi Message-ID: <20150202171324.GE10862@stefanha-thinkpad> References: <1421913839-22448-1-git-send-email-sfeldma@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="19uQFt6ulqmgNgg1" Content-Disposition: inline In-Reply-To: <1421913839-22448-1-git-send-email-sfeldma@gmail.com> Subject: Re: [Qemu-devel] [PATCH v5 00/10] rocker: add new rocker ethernet switch device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: sfeldma@gmail.com Cc: jiri@resnulli.us, roopa@cumulusnetworks.com, john.fastabend@gmail.com, qemu-devel@nongnu.org, dsahern@gmail.com, pbonzini@redhat.com, jasowang@redhat.com --19uQFt6ulqmgNgg1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 22, 2015 at 12:03:49AM -0800, sfeldma@gmail.com wrote: > From: Scott Feldman >=20 > v5: >=20 > - Per Jason Wang review: > - Fix some missing/wrong references in the rocker.txt spec > - mark rocker as unmigratable. >=20 > v4: >=20 > - Per Paolo Bonzini review: > - move reg_guide.txt to docs/specs/rocker.txt > - fix some spelling/grammer mistakes in the rocker.txt doc > - fix some misleading/wrong statements in rocker.txt > - add double 4-byte access for 64-bit registers > - define new ROCKER_Exxx to replace usage of errno.h return codes > - Add patch from David Ahern to timestamp debug output >=20 > v3: >=20 > - Per Stefan Hajnoczi review: > - move HMP rocker cmds to "info rocker" > - prefix QMP rocker cmds with query- > - tag QMP cmds as "Since 2.3" > - convert structs to typedef with CamelCase naming > - Remove SDHCI device ID move patch...Paolo Bonzini is addressing > SDHCI move is separate patch. >=20 > v2: >=20 > - Address reg_guide.txt review comments from Eric Blake > - Address QMP review comments from Eric Blake >=20 > v1: >=20 > [This is a collaboration between myself and Jiri Pirko]. >=20 > This patch set adds a new ethernet switch device, called rocker. Rocker = is > intended to emulate HW features of switch ASICs found in today's > data-center-class switch/routers. The original motivation in creating a = new > device is to accelerate device driver development for ethernet switches i= n the > Linux kernel. A device driver for rocker already exists in the Linux 3.18 > kernel and loads against this device. Basic L2 switching (bridging) > functionality is offloaded to the device. Work continues to enable offlo= ading > of L3 routing functions and ACLs, as well as support for a flow-based mod= es, > such as OpenVSwitch with OpenFlow. Future support for terminating L2-ove= r-L3 > tunnels is also planned. >=20 > The core network processing functions are based on the spec of a real dev= ice: > Broadcom's OF-DPA. Specifically, rocker borrows OF-DPA's network process= ing > pipeline comprised of flow match and action tables. Only the OF-DPA spec= was > used in constructing rocker. The rocker developers do not have access to= the > real OF-DPA's software source code, so this is a clean-room, ground-up > development. >=20 > Each rocker device is a PCI device with a memory-mapped register space and > MSI-X interrupts for command and event processing, as well as CPU-bound I= /O. > Each device can support up to 62 "front-panel" ports, which present thems= elves > as -netdev attachment points. The device is programmed using OF-DPA flow= and > group tables to setup the flow pipeline. The programming defines the > forwarding path for packets ingressing on 'front-panel' ports. The forwa= rding > path can look at L2/L3/L4 packet header to forward the packet to its > destination. For the performance path, packets would ingress and egress = only > on the device, and not be passed up to the device driver (or host OS). T= he > slow path for control packets will forward packets to the CPU via the dev= ice > driver for host OS processing. >=20 > A QMP/HMP interface is added to give inside into the device's internal po= rt > configuration and flow/group tables. >=20 > A test directory is included with some basic sanity tests to verify the d= evice > and driver. >=20 > David Ahern (1): > rocker: timestamp on the debug logs helps correlate with events in > the VM >=20 > Scott Feldman (9): > net: add MAC address string printer > virtio-net: use qemu_mac_strdup_printf > rocker: add register programming guide > pci: add rocker device ID > pci: add network device class 'other' for network switches > rocker: add new rocker switch device > qmp: add rocker device support > rocker: add tests > MAINTAINERS: add rocker >=20 > MAINTAINERS | 6 + > default-configs/pci.mak | 1 + > docs/specs/pci-ids.txt | 1 + > docs/specs/rocker.txt | 1006 ++++++++++++++ > hmp-commands.hx | 24 + > hmp.c | 303 +++++ > hmp.h | 4 + > hw/net/Makefile.objs | 3 + > hw/net/rocker/rocker.c | 1517 +++++++++++++++++++++ > hw/net/rocker/rocker.h | 85 ++ > hw/net/rocker/rocker_desc.c | 379 ++++++ > hw/net/rocker/rocker_desc.h | 57 + > hw/net/rocker/rocker_fp.c | 242 ++++ > hw/net/rocker/rocker_fp.h | 54 + > hw/net/rocker/rocker_hw.h | 491 +++++++ > hw/net/rocker/rocker_of_dpa.c | 2622 ++++++++++++++++++++++++++++++= ++++++ > hw/net/rocker/rocker_of_dpa.h | 25 + > hw/net/rocker/rocker_tlv.h | 244 ++++ > hw/net/rocker/rocker_world.c | 108 ++ > hw/net/rocker/rocker_world.h | 63 + > hw/net/rocker/test/README | 5 + > hw/net/rocker/test/all | 19 + > hw/net/rocker/test/bridge | 43 + > hw/net/rocker/test/bridge-stp | 52 + > hw/net/rocker/test/bridge-vlan | 52 + > hw/net/rocker/test/bridge-vlan-stp | 64 + > hw/net/rocker/test/port | 22 + > hw/net/rocker/test/tut.dot | 8 + > hw/net/virtio-net.c | 12 +- > include/hw/pci/pci.h | 1 + > include/hw/pci/pci_ids.h | 1 + > include/net/net.h | 1 + > monitor.c | 28 + > net/net.c | 7 + > qapi-schema.json | 3 + > qapi/rocker.json | 259 ++++ > qmp-commands.hx | 97 ++ > 37 files changed, 7900 insertions(+), 9 deletions(-) > create mode 100644 docs/specs/rocker.txt > create mode 100644 hw/net/rocker/rocker.c > create mode 100644 hw/net/rocker/rocker.h > create mode 100644 hw/net/rocker/rocker_desc.c > create mode 100644 hw/net/rocker/rocker_desc.h > create mode 100644 hw/net/rocker/rocker_fp.c > create mode 100644 hw/net/rocker/rocker_fp.h > create mode 100644 hw/net/rocker/rocker_hw.h > create mode 100644 hw/net/rocker/rocker_of_dpa.c > create mode 100644 hw/net/rocker/rocker_of_dpa.h > create mode 100644 hw/net/rocker/rocker_tlv.h > create mode 100644 hw/net/rocker/rocker_world.c > create mode 100644 hw/net/rocker/rocker_world.h > create mode 100644 hw/net/rocker/test/README > create mode 100755 hw/net/rocker/test/all > create mode 100755 hw/net/rocker/test/bridge > create mode 100755 hw/net/rocker/test/bridge-stp > create mode 100755 hw/net/rocker/test/bridge-vlan > create mode 100755 hw/net/rocker/test/bridge-vlan-stp > create mode 100755 hw/net/rocker/test/port > create mode 100644 hw/net/rocker/test/tut.dot > create mode 100644 qapi/rocker.json Thanks, this series is in good shape. I have left some final comments including memory leaks and moving the test code (these are worth fixing). Looking forward to merging the next revision! --19uQFt6ulqmgNgg1 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUz7A0AAoJEJykq7OBq3PIJcYH/R59BQfLYGs3tZjtY9rY9DQA 30ZVBV2AtTsF3cnrGlTDMT8r4Hu5ae4BfOT5oXz40JBKFVz3jntlyI2fCeW5bWhW JJ/TAczB/Q7AqzegXbc881ayHF7CAf1EcykRg6lg9TOgE4k+uPCKkvJXgd68Y9Ge Dd2knRcVuDQIkT707qkV3G+Svq/bHu8DdkvNHXseb69IRa5qexNiHtiCxQY3ToLZ k0XppL6GZU2n1LtrNFRoccflgtK03fXF/iCl8y7KtlzvLMORmexp4BcQCtA6krAo wG8VqUEn370ioYd8OufcVXrgMUQF5/VmOBSzu7p384POca8kjIv7cBxIgY+9eJ8= =eMqs -----END PGP SIGNATURE----- --19uQFt6ulqmgNgg1--