From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ycd25-0000Xx-9N for qemu-devel@nongnu.org; Mon, 30 Mar 2015 12:59:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ycd22-0001ry-NP for qemu-devel@nongnu.org; Mon, 30 Mar 2015 12:59:25 -0400 Received: from mail-qc0-x229.google.com ([2607:f8b0:400d:c01::229]:34430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ycd22-0001rb-Gr for qemu-devel@nongnu.org; Mon, 30 Mar 2015 12:59:22 -0400 Received: by qcay5 with SMTP id y5so76612085qca.1 for ; Mon, 30 Mar 2015 09:59:21 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20150330145213.GL25181@stefanha-thinkpad.redhat.com> References: <1426306173-24884-1-git-send-email-sfeldma@gmail.com> <20150330145213.GL25181@stefanha-thinkpad.redhat.com> Date: Mon, 30 Mar 2015 09:59:21 -0700 Message-ID: From: Scott Feldman Content-Type: multipart/alternative; boundary=001a114903c84cf1160512846723 Subject: Re: [Qemu-devel] [PATCH v8 0/9] rocker: add new rocker ethernet switch device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: jiri@resnulli.us, jasowang@redhat.com, john fastabend , QEMU Developers , dsahern@gmail.com, pbonzini@redhat.com, roopa@cumulusnetworks.com --001a114903c84cf1160512846723 Content-Type: text/plain; charset=UTF-8 2.4 is fine, thanks On Mar 30, 2015 7:52 AM, "Stefan Hajnoczi" wrote: > On Fri, Mar 13, 2015 at 09:09:24PM -0700, sfeldma@gmail.com wrote: > > From: Scott Feldman > > > > v8: > > > > - From Stefan Hajnoczi's net-pull-request v3, merge in these changes: > > - Squash David Ahern's clang struct definition warnings fix > > - Squash in Jiri's fix for rocker format string specifiers [Peter] > > - Squash in Windows build fix [Peter] > > > > - In addition, fix 2 compile warnings from net-pull-request v4: > > - Fix compile issue for min glibc 2.12 > > - w32: fix 64 bit constant without ULL suffix > > > > v7: > > > > - Per Stefan Hajnoczi comments: > > - #ifdef CONFIG_ROCKER wrapper around qmp/hmp to fix compile when > PCI is > > disabled or rocker is disabled. > > > > v6: > > > > - Per Stefan Hajnoczi review: > > - Move tests to tests/rocker > > - Fix some mem leaks > > - Fix doc grammer/spelling > > - Per Eric Blake review: > > - Add #optional to optional args comments in qmp interface > > - Add "query-" prefix to qmp cmds > > - Fix doc grammer/spelling > > > > v5: > > > > - Per Jason Wang review: > > - Fix some missing/wrong references in the rocker.txt spec > > - mark rocker as unmigratable. > > > > v4: > > > > - 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 > > > > v3: > > > > - 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. > > > > v2: > > > > - Address reg_guide.txt review comments from Eric Blake > > - Address QMP review comments from Eric Blake > > > > v1: > > > > [This is a collaboration between myself and Jiri Pirko]. > > > > 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 > in 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 > offloading > > of L3 routing functions and ACLs, as well as support for a flow-based > modes, > > such as OpenVSwitch with OpenFlow. Future support for terminating > L2-over-L3 > > tunnels is also planned. > > > > The core network processing functions are based on the spec of a real > device: > > Broadcom's OF-DPA. Specifically, rocker borrows OF-DPA's network > processing > > 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. > > > > 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 > themselves > > 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 > forwarding > > 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). > The > > slow path for control packets will forward packets to the CPU via the > device > > driver for host OS processing. > > > > A QMP/HMP interface is added to give inside into the device's internal > port > > configuration and flow/group tables. > > > > A test directory is included with some basic sanity tests to verify the > device > > and driver. > > > > David Ahern (1): > > rocker: timestamp on the debug logs helps correlate with events in > > the VM > > > > Scott Feldman (8): > > 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 > > rocker: add tests > > MAINTAINERS: add rocker > > > > MAINTAINERS | 6 + > > default-configs/pci.mak | 1 + > > docs/specs/pci-ids.txt | 1 + > > docs/specs/rocker.txt | 1009 ++++++++++++++++++ > > hw/net/Makefile.objs | 4 + > > hw/net/rocker/rocker.c | 1480 ++++++++++++++++++++++++++ > > hw/net/rocker/rocker.h | 84 ++ > > hw/net/rocker/rocker_desc.c | 377 +++++++ > > hw/net/rocker/rocker_desc.h | 53 + > > hw/net/rocker/rocker_fp.c | 234 +++++ > > hw/net/rocker/rocker_fp.h | 51 + > > hw/net/rocker/rocker_hw.h | 491 +++++++++ > > hw/net/rocker/rocker_of_dpa.c | 2315 > +++++++++++++++++++++++++++++++++++++++++ > > hw/net/rocker/rocker_of_dpa.h | 22 + > > hw/net/rocker/rocker_tlv.h | 244 +++++ > > hw/net/rocker/rocker_world.c | 106 ++ > > hw/net/rocker/rocker_world.h | 60 ++ > > hw/net/virtio-net.c | 12 +- > > include/hw/pci/pci.h | 1 + > > include/hw/pci/pci_ids.h | 1 + > > include/net/net.h | 1 + > > net/net.c | 7 + > > tests/rocker/README | 5 + > > tests/rocker/all | 19 + > > tests/rocker/bridge | 48 + > > tests/rocker/bridge-stp | 57 + > > tests/rocker/bridge-vlan | 57 + > > tests/rocker/bridge-vlan-stp | 69 ++ > > tests/rocker/port | 22 + > > tests/rocker/tut.dot | 8 + > > 30 files changed, 6836 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 tests/rocker/README > > create mode 100755 tests/rocker/all > > create mode 100755 tests/rocker/bridge > > create mode 100755 tests/rocker/bridge-stp > > create mode 100755 tests/rocker/bridge-vlan > > create mode 100755 tests/rocker/bridge-vlan-stp > > create mode 100755 tests/rocker/port > > create mode 100644 tests/rocker/tut.dot > > > > -- > > 1.7.10.4 > > > > Applied to net-next for QEMU 2.4. Due to the build issues that have > been experienced, I'm less confident about pushing this into QEMU 2.3 > right before release. > > If there is a strong reason to get it into QEMU 2.3, please let me know. > > Thanks, applied to my net-next tree: > https://github.com/stefanha/qemu/commits/net-next > > Stefan > --001a114903c84cf1160512846723 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

2.4 is fine, thanks

On Mar 30, 2015 7:52 AM, "Stefan Hajnoczi&q= uot; <stefanha@gmail.com> w= rote:
On Fri, Mar 13= , 2015 at 09:09:24PM -0700, sfeldma@gm= ail.com wrote:
> From: Scott Feldman <sfeldma@g= mail.com>
>
> v8:
>
>=C2=A0 - From Stefan Hajnoczi's net-pull-request v3, merge in these= changes:
>=C2=A0 =C2=A0 =C2=A0 - Squash David Ahern's clang struct definition= warnings fix
>=C2=A0 =C2=A0 =C2=A0 - Squash in Jiri's fix for rocker format strin= g specifiers [Peter]
>=C2=A0 =C2=A0 =C2=A0 - Squash in Windows build fix [Peter]
>
>=C2=A0 - In addition, fix 2 compile warnings from net-pull-request v4:<= br> >=C2=A0 =C2=A0 =C2=A0 - Fix compile issue for min glibc 2.12
>=C2=A0 =C2=A0 =C2=A0 - w32: fix 64 bit constant without ULL suffix
>
> v7:
>
>=C2=A0 - Per Stefan Hajnoczi comments:
>=C2=A0 =C2=A0 =C2=A0 - #ifdef CONFIG_ROCKER wrapper around qmp/hmp to f= ix compile when PCI is
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 disabled or rocker is disabled.
>
> v6:
>
>=C2=A0 - Per Stefan Hajnoczi review:
>=C2=A0 =C2=A0 =C2=A0 - Move tests to tests/rocker
>=C2=A0 =C2=A0 =C2=A0 - Fix some mem leaks
>=C2=A0 =C2=A0 =C2=A0 - Fix doc grammer/spelling
>=C2=A0 - Per Eric Blake review:
>=C2=A0 =C2=A0 =C2=A0 - Add #optional to optional args comments in qmp i= nterface
>=C2=A0 =C2=A0 =C2=A0 - Add "query-" prefix to qmp cmds
>=C2=A0 =C2=A0 =C2=A0 - Fix doc grammer/spelling
>
> v5:
>
>=C2=A0 - Per Jason Wang review:
>=C2=A0 =C2=A0 =C2=A0 - Fix some missing/wrong references in the rocker.= txt spec
>=C2=A0 =C2=A0 =C2=A0 - mark rocker as unmigratable.
>
> v4:
>
>=C2=A0 - Per Paolo Bonzini review:
>=C2=A0 =C2=A0 =C2=A0 - move reg_guide.txt to docs/specs/rocker.txt
>=C2=A0 =C2=A0 =C2=A0 - fix some spelling/grammer mistakes in the rocker= .txt doc
>=C2=A0 =C2=A0 =C2=A0 - fix some misleading/wrong statements in rocker.t= xt
>=C2=A0 =C2=A0 =C2=A0 - add double 4-byte access for 64-bit registers >=C2=A0 =C2=A0 =C2=A0 - define new ROCKER_Exxx to replace usage of errno= .h return codes
>=C2=A0 - Add patch from David Ahern to timestamp debug output
>
> v3:
>
>=C2=A0 - Per Stefan Hajnoczi review:
>=C2=A0 =C2=A0 =C2=A0 - move HMP rocker cmds to "info rocker"<= br> >=C2=A0 =C2=A0 =C2=A0 - prefix QMP rocker cmds with query-
>=C2=A0 =C2=A0 =C2=A0 - tag QMP cmds as "Since 2.3"
>=C2=A0 =C2=A0 =C2=A0 - convert structs to typedef with CamelCase naming=
>=C2=A0 - Remove SDHCI device ID move patch...Paolo Bonzini is addressin= g
>=C2=A0 =C2=A0 SDHCI move is separate patch.
>
> v2:
>
>=C2=A0 - Address reg_guide.txt review comments from Eric Blake
>=C2=A0 - Address QMP review comments from Eric Blake
>
> v1:
>
> [This is a collaboration between myself and Jiri Pirko].
>
> This patch set adds a new ethernet switch device, called rocker.=C2=A0= Rocker is
> intended to emulate HW features of switch ASICs found in today's > data-center-class switch/routers.=C2=A0 The original motivation in cre= ating a new
> device is to accelerate device driver development for ethernet switche= s in the
> Linux kernel.=C2=A0 A device driver for rocker already exists in the L= inux 3.18
> kernel and loads against this device.=C2=A0 Basic L2 switching (bridgi= ng)
> functionality is offloaded to the device.=C2=A0 Work continues to enab= le offloading
> of L3 routing functions and ACLs, as well as support for a flow-based = modes,
> such as OpenVSwitch with OpenFlow.=C2=A0 Future support for terminatin= g L2-over-L3
> tunnels is also planned.
>
> The core network processing functions are based on the spec of a real = device:
> Broadcom's OF-DPA.=C2=A0 Specifically, rocker borrows OF-DPA's= network processing
> pipeline comprised of flow match and action tables.=C2=A0 Only the OF-= DPA spec was
> used in constructing rocker.=C2=A0 The rocker developers do not have a= ccess to the
> real OF-DPA's software source code, so this is a clean-room, groun= d-up
> development.
>
> 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-boun= d I/O.
> Each device can support up to 62 "front-panel" ports, which = present themselves
> as -netdev attachment points.=C2=A0 The device is programmed using OF-= DPA flow and
> group tables to setup the flow pipeline.=C2=A0 The programming defines= the
> forwarding path for packets ingressing on 'front-panel' ports.= =C2=A0 The forwarding
> path can look at L2/L3/L4 packet header to forward the packet to its > destination.=C2=A0 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).= =C2=A0 The
> slow path for control packets will forward packets to the CPU via the = device
> driver for host OS processing.
>
> A QMP/HMP interface is added to give inside into the device's inte= rnal port
> configuration and flow/group tables.
>
> A test directory is included with some basic sanity tests to verify th= e device
> and driver.
>
> David Ahern (1):
>=C2=A0 =C2=A0rocker: timestamp on the debug logs helps correlate with e= vents in
>=C2=A0 =C2=A0 =C2=A0the VM
>
> Scott Feldman (8):
>=C2=A0 =C2=A0net: add MAC address string printer
>=C2=A0 =C2=A0virtio-net: use qemu_mac_strdup_printf
>=C2=A0 =C2=A0rocker: add register programming guide
>=C2=A0 =C2=A0pci: add rocker device ID
>=C2=A0 =C2=A0pci: add network device class 'other' for network = switches
>=C2=A0 =C2=A0rocker: add new rocker switch device
>=C2=A0 =C2=A0rocker: add tests
>=C2=A0 =C2=A0MAINTAINERS: add rocker
>
>=C2=A0 MAINTAINERS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 6 +
>=C2=A0 default-configs/pci.mak=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0= 1 +
>=C2=A0 docs/specs/pci-ids.txt=C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A0= 1 +
>=C2=A0 docs/specs/rocker.txt=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| 1009 ++= ++++++++++++++++
>=C2=A0 hw/net/Makefile.objs=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 = =C2=A0 4 +
>=C2=A0 hw/net/rocker/rocker.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 | 1480 +++++++= +++++++++++++++++++
>=C2=A0 hw/net/rocker/rocker.h=C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A0= 84 ++
>=C2=A0 hw/net/rocker/rocker_desc.c=C2=A0 =C2=A0|=C2=A0 377 +++++++
>=C2=A0 hw/net/rocker/rocker_desc.h=C2=A0 =C2=A0|=C2=A0 =C2=A053 +
>=C2=A0 hw/net/rocker/rocker_fp.c=C2=A0 =C2=A0 =C2=A0|=C2=A0 234 +++++ >=C2=A0 hw/net/rocker/rocker_fp.h=C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A051 +<= br> >=C2=A0 hw/net/rocker/rocker_hw.h=C2=A0 =C2=A0 =C2=A0|=C2=A0 491 +++++++= ++
>=C2=A0 hw/net/rocker/rocker_of_dpa.c | 2315 +++++++++++++++++++++++++++= ++++++++++++++
>=C2=A0 hw/net/rocker/rocker_of_dpa.h |=C2=A0 =C2=A022 +
>=C2=A0 hw/net/rocker/rocker_tlv.h=C2=A0 =C2=A0 |=C2=A0 244 +++++
>=C2=A0 hw/net/rocker/rocker_world.c=C2=A0 |=C2=A0 106 ++
>=C2=A0 hw/net/rocker/rocker_world.h=C2=A0 |=C2=A0 =C2=A060 ++
>=C2=A0 hw/net/virtio-net.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2= =A0 =C2=A012 +-
>=C2=A0 include/hw/pci/pci.h=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 = =C2=A0 1 +
>=C2=A0 include/hw/pci/pci_ids.h=C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A0 1 +<= br> >=C2=A0 include/net/net.h=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0|=C2=A0 =C2=A0 1 +
>=C2=A0 net/net.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 7 +
>=C2=A0 tests/rocker/README=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2= =A0 =C2=A0 5 +
>=C2=A0 tests/rocker/all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= |=C2=A0 =C2=A019 +
>=C2=A0 tests/rocker/bridge=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2= =A0 =C2=A048 +
>=C2=A0 tests/rocker/bridge-stp=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0= 57 +
>=C2=A0 tests/rocker/bridge-vlan=C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A057 +<= br> >=C2=A0 tests/rocker/bridge-vlan-stp=C2=A0 |=C2=A0 =C2=A069 ++
>=C2=A0 tests/rocker/port=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0|=C2=A0 =C2=A022 +
>=C2=A0 tests/rocker/tut.dot=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 = =C2=A0 8 +
>=C2=A0 30 files changed, 6836 insertions(+), 9 deletions(-)
>=C2=A0 create mode 100644 docs/specs/rocker.txt
>=C2=A0 create mode 100644 hw/net/rocker/rocker.c
>=C2=A0 create mode 100644 hw/net/rocker/rocker.h
>=C2=A0 create mode 100644 hw/net/rocker/rocker_desc.c
>=C2=A0 create mode 100644 hw/net/rocker/rocker_desc.h
>=C2=A0 create mode 100644 hw/net/rocker/rocker_fp.c
>=C2=A0 create mode 100644 hw/net/rocker/rocker_fp.h
>=C2=A0 create mode 100644 hw/net/rocker/rocker_hw.h
>=C2=A0 create mode 100644 hw/net/rocker/rocker_of_dpa.c
>=C2=A0 create mode 100644 hw/net/rocker/rocker_of_dpa.h
>=C2=A0 create mode 100644 hw/net/rocker/rocker_tlv.h
>=C2=A0 create mode 100644 hw/net/rocker/rocker_world.c
>=C2=A0 create mode 100644 hw/net/rocker/rocker_world.h
>=C2=A0 create mode 100644 tests/rocker/README
>=C2=A0 create mode 100755 tests/rocker/all
>=C2=A0 create mode 100755 tests/rocker/bridge
>=C2=A0 create mode 100755 tests/rocker/bridge-stp
>=C2=A0 create mode 100755 tests/rocker/bridge-vlan
>=C2=A0 create mode 100755 tests/rocker/bridge-vlan-stp
>=C2=A0 create mode 100755 tests/rocker/port
>=C2=A0 create mode 100644 tests/rocker/tut.dot
>
> --
> 1.7.10.4
>

Applied to net-next for QEMU 2.4.=C2=A0 Due to the build issues that have been experienced, I'm less confident about pushing this into QEMU 2.3 right before release.

If there is a strong reason to get it into QEMU 2.3, please let me know.
Thanks, applied to my net-next tree:
https://github.com/stefanha/qemu/commits/net-next

Stefan
--001a114903c84cf1160512846723--