rocker: add mac addr pretty print func, needed in subsequent patches

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
rocker: add rocker qmp/hmp interface

Add rocker qmp (qemu machine protocol) support, exporting rocker information in
JSON format.  Also add rocker hmp (human monitor protocol) support to make same
information available from qemu monitor.  See docs/writing-qmp-commands.txt for
more information on qmp/hmp.

This first patch dumps basic rocker info for the named rocker instance.  The
JSON output is pretty verbose, so skipping it here.  The monitor output is:

(qemu) rocker sw1
name: sw1
id: 0x0000013512005452
ports: 2

There are several makefile hacks in this patch to allow the qmp function in
rocker.c be linked with the main qemu.  The qmp support doesn't seem ideally
setup for exposing information at the device level, so we'll have to live with
these hacks until we have time to work upstream for a better solution.

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
rocker: add qmp/hmp support for rocker-ports

From qemu monitor:

(qemu) rocker-ports sw1
            ena/    speed/ auto
      port  link    duplex neg?
     sw1.1  !ena   10G  FD  No
     sw1.2  !ena   10G  FD  No

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
rocker: add qmp/hmp support for rocker-flows

Add an adidtional qmp/hmp command to dump rocker flow tables:

(qemu) rocker-flows sw1
prio tbl hits key(mask) --> actions
0    1        lport 2 vlan 0(0xfff) --> apply new vlan 100 goto tbl 2
0    5   4    vlan 100 eth dst 00:00:00:00:00:00(ff:ff:ff:ff:ff:ff) --> write group 1 goto tbl 6
0    0   4    lport 0(0x3f) --> goto tbl 1
0    1   4    lport 1 vlan 0(0xfff) --> apply new vlan 100 goto tbl 2

(qemu) help rocker-flows
rocker-flows rocker_flows name [world] [tbl_id] -- Show Rocker flow tables

(qemu) rocker-flows sw1 l2l3 1
prio tbl hits key(mask) --> actions
0    1        lport 2 vlan 0(0xfff) --> apply new vlan 100 goto tbl 2
0    1   4    lport 1 vlan 0(0xfff) --> apply new vlan 100 goto tbl 2

The "hits" count is how many times the flow entry was a match for an incoming packet.

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>