On Mon, Jan 05, 2015 at 06:24:58PM -0800, sfel...@gmail.com wrote: > From: Scott Feldman <sfel...@gmail.com> > > Rocker is a simulated ethernet switch device. The device supports up to 62 > front-panel ports and supports L2 switching and L3 routing functions, as well > as L2/L3/L4 ACLs. The device presents a single PCI device for each switch, > with a memory-mapped register space for device driver access. > > Rocker device is invoked with -device, for example a 4-port switch: > > -device rocker,name=sw1,len-ports=4,ports[0]=dev0,ports[1]=dev1, \ > ports[2]=dev2,ports[3]=dev3 > > Each port is a netdev and can be paired with using -netdev id=<port name>.
This design looks good, it fits the QEMU network subsystem. Please follow QEMU coding style, for example, using typedefs for structs instead of "struct tag". Details are in ./HACKING, ./CODING_STYLE, and you can scan patches with QEMU's scripts/checkpatch.pl.
pgp4XKJbQd8YV.pgp
Description: PGP signature