qmp: add rocker device support
PATCH 8/10 qmp: add rocker device support
From: Scott Feldman <[email protected]>
Add QMP/HMP support for rocker devices. This is mostly for debugging purposes to see inside the device's tables and port configurations. Some examples:
(qemu) rocker sw1
name: sw1
id: 0x0000013512005452
ports: 4
(qemu) rocker-ports sw1
ena/ speed/ auto
port link duplex neg?
sw1.1 up 10G FD No
sw1.2 up 10G FD No
sw1.3 !ena 10G FD No
sw1.4 !ena 10G FD No
(qemu) rocker-of-dpa-flows sw1
prio tbl hits key(mask) --> actions
2 60 lport 1 vlan 1 LLDP src 00:02:00:00:02:00 dst 01:80:c2:00:00:0e 2 60 lport 1 vlan 1 ARP src 00:02:00:00:02:00 dst 00:02:00:00:03:00 2 60 lport 2 vlan 2 IPv6 src 00:02:00:00:03:00 dst 33:33:ff:00:00:02 proto 58 3 50 vlan 2 dst 33:33:ff:00:00:02 --> write group 0x32000001 goto tbl 60 2 60 lport 2 vlan 2 IPv6 src 00:02:00:00:03:00 dst 33:33:ff:00:03:00 proto 58 3 50 1 vlan 2 dst 33:33:ff:00:03:00 --> write group 0x32000001 goto tbl 60 2 60 lport 2 vlan 2 ARP src 00:02:00:00:03:00 dst 00:02:00:00:02:00 3 50 2 vlan 2 dst 00:02:00:00:02:00 --> write group 0x02000001 goto tbl 60 2 60 1 lport 2 vlan 2 IP src 00:02:00:00:03:00 dst 00:02:00:00:02:00 proto 1 3 50 2 vlan 1 dst 00:02:00:00:03:00 --> write group 0x01000002 goto tbl 60 2 60 1 lport 1 vlan 1 IP src 00:02:00:00:02:00 dst 00:02:00:00:03:00 proto 1 2 60 lport 1 vlan 1 IPv6 src 00:02:00:00:02:00 dst 33:33:ff:00:00:01 proto 58 3 50 vlan 1 dst 33:33:ff:00:00:01 --> write group 0x31000000 goto tbl 60 2 60 lport 1 vlan 1 IPv6 src 00:02:00:00:02:00 dst 33:33:ff:00:02:00 proto 58 3 50 1 vlan 1 dst 33:33:ff:00:02:00 --> write group 0x31000000 goto tbl 60 1 60 173 lport 2 vlan 2 LLDP src <any> dst 01:80:c2:00:00:0e --> write group 0x02000000 1 60 6 lport 2 vlan 2 IPv6 src <any> dst <any> --> write group 0x02000000 1 60 174 lport 1 vlan 1 LLDP src <any> dst 01:80:c2:00:00:0e --> write group 0x01000000 1 60 174 lport 2 vlan 2 IP src <any> dst <any> --> write group 0x02000000 1 60 6 lport 1 vlan 1 IPv6 src <any> dst <any> --> write group 0x01000000 1 60 181 lport 2 vlan 2 ARP src <any> dst <any> --> write group 0x02000000 1 10 715 lport 2 --> apply new vlan 2 goto tbl 20 1 60 177 lport 1 vlan 1 ARP src <any> dst <any> --> write group 0x01000000 1 60 174 lport 1 vlan 1 IP src <any> dst <any> --> write group 0x01000000 1 10 717 lport 1 --> apply new vlan 1 goto tbl 20 1 0 1432 lport 0(0xffff) --> goto tbl 10
(qemu) rocker-of-dpa-groups sw1
id (decode) --> buckets0x32000001 (type L2 multicast vlan 2 index 1) --> groups [0x02000001,0x02000000] 0x02000001 (type L2 interface vlan 2 lport 1) --> pop vlan out lport 1 0x01000002 (type L2 interface vlan 1 lport 2) --> pop vlan out lport 2 0x02000000 (type L2 interface vlan 2 lport 0) --> pop vlan out lport 0 0x01000000 (type L2 interface vlan 1 lport 0) --> pop vlan out lport 0 0x31000000 (type L2 multicast vlan 1 index 0) --> groups [0x01000002,0x01000000]
--- hmp-commands.hx | 56 ++++++++ hmp.c | 303 ++++++++++++++++++++++++++++++++++++++++ hmp.h | 4 + hw/net/rocker/rocker.c | 46 ++++++ hw/net/rocker/rocker_fp.c | 1 + hw/net/rocker/rocker_of_dpa.c | 309 +++++++++++++++++++++++++++++++++++++++++ qapi-schema.json | 51 +++++++ qmp-commands.hx | 24 ++++ 8 files changed, 794 insertions(+)
hmp-commands.hx +56 -0
@@ -1786,6 +1786,62 @@ STEXI show available trace events and their state ETEXI + { + .name = "rocker", + .args_type = "name:s", + .params = "rocker name", + .help = "Show Rocker(s)", + .mhandler.cmd = hmp_rocker, + }, + +STEXI +@item rocker @var{name} +@findex rocker +Show Rocker(s) +ETEXI + + { + .name = "rocker-ports", + .args_type = "name:s", + .params = "rocker_ports name", + .help = "Show Rocker ports", + .mhandler.cmd = hmp_rocker_ports, + }, + +STEXI +@item rocker_ports @var{name} +@findex rocker_ports +Show Rocker ports +ETEXI + + { + .name = "rocker-of-dpa-flows", + .args_type = "name:s,tbl_id:i?", + .params = "rocker_of_dpa_flows name [tbl_id]", + .help = "Show Rocker OF-DPA flow tables", + .mhandler.cmd = hmp_rocker_of_dpa_flows, + }, + +STEXI +@item rocker_of_dpa_flows @var{name} [@var{tbl_id}] +@findex rocker_of_dpa_flows +Show Rocker OF-DPA flow tables +ETEXI + + { + .name = "rocker-of-dpa-groups", + .args_type = "name:s,type:i?", + .params = "rocker_of_dpa_groups name [type]", + .help = "Show Rocker OF-DPA groups", + .mhandler.cmd = hmp_rocker_of_dpa_groups, + }, + +STEXI +@item rocker_of_dpa_groups @var{name} [@var{type}] +@findex rocker_of_dpa_groups +Show Rocker OF-DPA groups +ETEXI + STEXI @end table ETEXI
hmp.c +303 -0
312 lines not on this page · raw message
hmp.h +4 -0
@@ -116,5 +116,9 @@ void host_net_remove_completion(ReadLineState *rs, int nb_args, const char *str);void delvm_completion (ReadLineState *rs,int nb_args,const char *str);void loadvm_completion (ReadLineState *rs,int nb_args,const char *str); +void hmp_rocker (Monitor *mon,const QDict *qdict); +void hmp_rocker_ports (Monitor *mon,const QDict *qdict); +void hmp_rocker_of_dpa_flows (Monitor *mon,const QDict *qdict); +void hmp_rocker_of_dpa_groups (Monitor *mon,const QDict *qdict);#endif
hw/net/rocker/rocker.c +46 -0
58 lines not on this page · raw message
hw/net/rocker/rocker_fp.c +1 -0
@@ -15,6 +15,7 @@*/ #include "net/clients.h" +#include "qmp-commands.h" #include "rocker.h" #include "rocker_hw.h"
hw/net/rocker/rocker_of_dpa.c +309 -0
321 lines not on this page · raw message
qapi-schema.json +51 -0
54 lines not on this page · raw message
qmp-commands.hx +24 -0
@@ -3860,3 +3860,27 @@ Move mouse pointer to absolute coordinates (20000, 400). <- { "return": {} } EQMP + + { + .name = "rocker", + .args_type = "name:s", + .mhandler.cmd_new = qmp_marshal_input_rocker, + }, + + { + .name = "rocker-ports", + .args_type = "name:s", + .mhandler.cmd_new = qmp_marshal_input_rocker_ports, + }, + + { + .name = "rocker-of-dpa-flows", + .args_type = "name:s,tbl_id:i?", + .mhandler.cmd_new = qmp_marshal_input_rocker_of_dpa_flows, + }, + + { + .name = "rocker-of-dpa-groups", + .args_type = "name:s,type:i?", + .mhandler.cmd_new = qmp_marshal_input_rocker_of_dpa_groups, + },
Signature · 1 line
1.7.10.4
Quoted 1 line · On 12/29/2014 10:14 PM, [email protected] wrote:
From: Scott Feldman <[email protected]>
[your message came through as a top-level thread instead of in-reply-to the 0/10 cover letter; please see if you can fix that before the next submission]
Quoted 4 lines
Add QMP/HMP support for rocker devices. This is mostly for debugging purposes to see inside the device's tables and port configurations. Some examples:
In this mail, I'll review just the QMP interface portion:
qapi-schema.json line 3520
Quoted 8 lines
+++
b/qapi-schema.jsonqapi-schema.json +3
-0@@ -3515,3 +3515,54 @@ # Since: 2.1 ## { 'command': 'rtc-reset-reinjection' } + +{ 'type': 'Rocker', + 'data': { 'name': 'str', 'id': 'uint64', 'ports': 'uint32' } }
Please add documentation for each new type and each member of that type, including mention of which qemu release will first contain it.
qapi-schema.json line 3528
Quoted 8 lines
qapi-schema.json +8
-0+ +{ 'command': 'rocker', + 'data': { 'name': 'str' }, + 'returns': 'Rocker' } + +{ 'type': 'RockerPort', + 'data': { 'name': 'str', 'enabled': 'bool', 'link_up': 'bool', + 'speed': 'uint32', 'duplex': 'uint8', 'autoneg': 'uint8' } }
Why is 'duplex' a 'uint8'? Shouldn't it instead be an enum type? Similar for 'autoneg'.
qapi-schema.json line 3535
Quoted 7 lines
qapi-schema.json +7
-0+ +{ 'command': 'rocker-ports', + 'data': { 'name': 'str' }, + 'returns': ['RockerPort'] } + +{ 'type': 'RockerOfDpaFlowKey', + 'data' : { 'priority': 'uint32', 'tbl_id': 'uint32', '*in_pport': 'uint32',
Please use '-' rather than '_' in the spelling of new commands.
qapi-schema.json line 3538
Quoted 3 lines
qapi-schema.json +3
-0+ '*tunnel_id': 'uint32', '*vlan_id': 'uint16', + '*eth_type': 'uint16', '*eth_src': 'str', '*eth_dst': 'str', + '*ip_proto': 'uint8', '*ip_tos': 'uint8', '*ip_dst': 'str' } }
Is 'str' the right type for IP addresses, or should it be a more specific type?
Quoted 8 lines
qapi-schema.json +8
-0+ +{ 'type': 'RockerOfDpaFlowMask', + 'data' : { '*in_pport': 'uint32', '*tunnel_id': 'uint32', + '*vlan_id': 'uint16', '*eth_src': 'str', '*eth_dst': 'str', + '*ip_proto': 'uint8', '*ip_tos': 'uint8' } } + +{ 'type': 'RockerOfDpaFlowAction', + 'data' : { '*goto_tbl': 'uint32', '*group_id': 'uint32',
qapi-schema.json line 3556
Quoted 10 lines
qapi-schema.json +10
-0+ '*tun_log_pport': 'uint32', '*vlan_id': 'uint16', + '*new_vlan_id': 'uint16', '*out_pport': 'uint32' } } + +{ 'type': 'RockerOfDpaFlow', + 'data': { 'cookie': 'uint64', 'hits': 'uint64', 'key': 'RockerOfDpaFlowKey', + 'mask': 'RockerOfDpaFlowMask', 'action': 'RockerOfDpaFlowAction' } } + +{ 'command': 'rocker-of-dpa-flows', + 'data': { 'name': 'str', '*tbl_id': 'uint32' }, + 'returns': ['RockerOfDpaFlow'] }
Is the idea here that omitting 'tbl_id' (should be spelled 'tbl-id') will give you an array of all table entries, while specifying an id will give you an array of just the one requested entry?
qapi-schema.json line 3568
Quoted 12 lines
qapi-schema.json +12
-0+ +{ 'type': 'RockerOfDpaGroup', + 'data': { 'id': 'uint32', 'type': 'uint8', '*vlan_id': 'uint16', + '*pport': 'uint32', '*index': 'uint32', '*out_pport': 'uint32', + '*group_id': 'uint32', '*set_vlan_id': 'uint16', + '*pop_vlan': 'uint8', '*group_ids': ['uint32'], + '*set_eth_src': 'str', '*set_eth_dst': 'str', + '*ttl_check': 'uint8' } } + +{ 'command': 'rocker-of-dpa-groups', + 'data': { 'name': 'str', '*type': 'uint8' }, + 'returns': ['RockerOfDpaGroup'] }
Needs documentation before I can tell for sure, but based on just the qapi specification, I think it will be reasonable once you fix naming conventions.
qmp-commands.hx Move mouse pointer to absolute coordinates (20000, 400). · line 3869
Quoted 12 lines
+++ b/qmp-commands.hx
qmp-commands.hx +7
-0@@ -3860,3 +3860,27 @@ Move mouse pointer to absolute coordinates (20000, 400). <- { "return": {} } EQMP + + { + .name = "rocker", + .args_type = "name:s", + .mhandler.cmd_new = qmp_marshal_input_rocker, + }, +
Could you also provide example exchanges for each command added (what the user passes in, and what qemu responds)?
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Quoted 6 lines · Eric Blake
Quoted 1 line · On 12/29/2014 10:14 PM, [email protected] wrote:
From: Scott Feldman <[email protected]>
[your message came through as a top-level thread instead of in-reply-to the 0/10 cover letter; please see if you can fix that before the next submission]
Looks like I want git send-email options --no-chain-reply-to and --thread, correct?
Quoted 7 lines
Quoted 4 lines
Add QMP/HMP support for rocker devices. This is mostly for debugging purposes to see inside the device's tables and port configurations. Some examples:
In this mail, I'll review just the QMP interface portion:
Quoted 11 lines
qapi-schema.json line 3520
Quoted 8 lines
+++
b/qapi-schema.jsonqapi-schema.json +3
-0@@ -3515,3 +3515,54 @@ # Since: 2.1 ## { 'command': 'rtc-reset-reinjection' } + +{ 'type': 'Rocker', + 'data': { 'name': 'str', 'id': 'uint64', 'ports': 'uint32' } }Please add documentation for each new type and each member of that type, including mention of which qemu release will first contain it.
Ok, v2.
Quoted 11 lines
qapi-schema.json line 3528
Quoted 8 lines
qapi-schema.json +8
-0+ +{ 'command': 'rocker', + 'data': { 'name': 'str' }, + 'returns': 'Rocker' } + +{ 'type': 'RockerPort', + 'data': { 'name': 'str', 'enabled': 'bool', 'link_up': 'bool', + 'speed': 'uint32', 'duplex': 'uint8', 'autoneg': 'uint8' } }Why is 'duplex' a 'uint8'? Shouldn't it instead be an enum type? Similar for 'autoneg'.
Ok, v2.
Quoted 10 lines
qapi-schema.json line 3535
Quoted 8 lines
qapi-schema.json +7
-0+ +{ 'command': 'rocker-ports', + 'data': { 'name': 'str' }, + 'returns': ['RockerPort'] } + +{ 'type': 'RockerOfDpaFlowKey', + 'data' : { 'priority': 'uint32', 'tbl_id': 'uint32', '*in_pport': 'uint32',Please use '-' rather than '_' in the spelling of new commands.
Ok, v2.
Quoted 6 lines
qapi-schema.json line 3538
Quoted 3 lines
qapi-schema.json +3
-0+ '*tunnel_id': 'uint32', '*vlan_id': 'uint16', + '*eth_type': 'uint16', '*eth_src': 'str', '*eth_dst': 'str', + '*ip_proto': 'uint8', '*ip_tos': 'uint8', '*ip_dst': 'str' } }Is 'str' the right type for IP addresses, or should it be a more specific type?
String, using dotted-decimal notation seems best for user and script parsing. If it's encoded as native u32 then we need to say if it's host-byte-order or network-byte-order.
Quoted 15 lines
Quoted 15 lines
qapi-schema.json +14
-0+ +{ 'type': 'RockerOfDpaFlowMask', + 'data' : { '*in_pport': 'uint32', '*tunnel_id': 'uint32', + '*vlan_id': 'uint16', '*eth_src': 'str', '*eth_dst': 'str', + '*ip_proto': 'uint8', '*ip_tos': 'uint8' } } + +{ 'type': 'RockerOfDpaFlowAction', + 'data' : { '*goto_tbl': 'uint32', '*group_id': 'uint32', + '*tun_log_pport': 'uint32', '*vlan_id': 'uint16', + '*new_vlan_id': 'uint16', '*out_pport': 'uint32' } } + +{ 'type': 'RockerOfDpaFlow', + 'data': { 'cookie': 'uint64', 'hits': 'uint64', 'key': 'RockerOfDpaFlowKey', + 'mask': 'RockerOfDpaFlowMask', 'action': 'RockerOfDpaFlowAction' } }
Quoted 8 lines
qapi-schema.json line 3556
Quoted 4 lines
qapi-schema.json +4
-0+ +{ 'command': 'rocker-of-dpa-flows', + 'data': { 'name': 'str', '*tbl_id': 'uint32' }, + 'returns': ['RockerOfDpaFlow'] }Is the idea here that omitting '
tbl_id' (should be spelled 'tbl-id') will give you an array of all table entries, while specifying an id will give you an array of just the one requested entry?
Correct
Quoted 17 lines
qapi-schema.json line 3568
Quoted 13 lines
qapi-schema.json +12
-0+ +{ 'type': 'RockerOfDpaGroup', + 'data': { 'id': 'uint32', 'type': 'uint8', '*vlan_id': 'uint16', + '*pport': 'uint32', '*index': 'uint32', '*out_pport': 'uint32', + '*group_id': 'uint32', '*set_vlan_id': 'uint16', + '*pop_vlan': 'uint8', '*group_ids': ['uint32'], + '*set_eth_src': 'str', '*set_eth_dst': 'str', + '*ttl_check': 'uint8' } } + +{ 'command': 'rocker-of-dpa-groups', + 'data': { 'name': 'str', '*type': 'uint8' }, + 'returns': ['RockerOfDpaGroup'] }Needs documentation before I can tell for sure, but based on just the qapi specification, I think it will be reasonable once you fix naming conventions.
Ok.
Quoted 5 lines
Quoted 5 lines
+++ b/qmp-commands.hx
qmp-commands.hx +0
-0@@ -3860,3 +3860,27 @@ Move mouse pointer to absolute coordinates (20000, 400). <- { "return": {} }
Quoted 11 lines
qmp-commands.hx Move mouse pointer to absolute coordinates (20000, 400). · line 3869
Quoted 8 lines
qmp-commands.hx +7
-0EQMP + + { + .name = "rocker", + .args_type = "name:s", + .mhandler.cmd_new = qmp_marshal_input_rocker, + }, +Could you also provide example exchanges for each command added (what the user passes in, and what qemu responds)?
Provide here or in the commit msg? Or in the code? Here's an example session:
(qemu) rocker sw1
name: sw1
id: 0x0000013512005452
ports: 4
(qemu) rocker-ports sw1
ena/ speed/ auto
port link duplex neg?
sw1.1 up 10G FD No
sw1.2 up 10G FD No
sw1.3 !ena 10G FD No
sw1.4 !ena 10G FD No
(qemu) rocker-of-dpa-flows sw1
prio tbl hits key(mask) --> actions
3 50 11 vlan 3840 dst 00:02:00:00:03:00 --> write group0x0f000002 goto tbl 60
3 50 13 vlan 3840 dst 00:02:00:00:02:00 --> write group0x0f000001 goto tbl 60
1 30 IP dst 11.0.0.0/32 --> write group 0x0f000000 goto tbl 60 1 30 IP dst 11.0.0.0/24 --> write group 0x0f000000 goto tbl 60 1 30 IP dst 11.0.0.255/32 --> write group 0x0f000000 goto tbl 60 1 30 10 IP dst 11.0.0.3/32 --> write group 0x0f000000 goto tbl 60 0 20 pport 2 vlan 3840 IPv6 dst 52:54:00:12:35:02 --> goto tbl 30 0 20 pport 2 vlan 3840 IP dst 52:54:00:12:35:02 --> goto tbl 30 1 20 8 pport 2 vlan 3840 IPv6 dst
33:33:00:00:00:00(ff:ff:00:00:00:00) --> goto tbl 40
1 20 pport 2 vlan 3840 IP dst
01:00:5e:00:00:00(ff:ff:ff:80:00:00) --> goto tbl 40
3 60 7366 pport 2 vlan 3840 dst
01:80:c2:00:00:00(ff:ff:ff:ff:ff:f0) --> write group 0x0f000000
0 20 pport 1 vlan 3840 IPv6 dst 52:54:00:12:35:01 --> goto tbl 30 0 20 10 pport 1 vlan 3840 IP dst 52:54:00:12:35:01 --> goto tbl 30 1 50 14735 vlan 3840 --> write group 0x4f000000 goto tbl 60 1 20 8 pport 1 vlan 3840 IPv6 dst
33:33:00:00:00:00(ff:ff:00:00:00:00) --> goto tbl 40
1 20 pport 1 vlan 3840 IP dst
01:00:5e:00:00:00(ff:ff:ff:80:00:00) --> goto tbl 40
3 60 7366 pport 1 vlan 3840 dst
01:80:c2:00:00:00(ff:ff:ff:ff:ff:f0) --> write group 0x0f000000
1 10 7387 pport 2 vlan 0 --> apply new vlan 3840 goto tbl 20 1 10 7398 pport 1 vlan 0 --> apply new vlan 3840 goto tbl 20 1 0 14785 pport 0(0xffff0000) --> goto tbl 10
(qemu) rocker-of-dpa-flows sw1 10
prio tbl hits key(mask) --> actions
1 10 7387 pport 2 vlan 0 --> apply new vlan 3840 goto tbl 20 1 10 7398 pport 1 vlan 0 --> apply new vlan 3840 goto tbl 20
(qemu) rocker-of-dpa-flows sw1 20
prio tbl hits key(mask) --> actions
0 20 pport 2 vlan 3840 IPv6 dst 52:54:00:12:35:02 --> goto tbl 30 0 20 pport 2 vlan 3840 IP dst 52:54:00:12:35:02 --> goto tbl 30 1 20 8 pport 2 vlan 3840 IPv6 dst 33:33:00:00:00:00(ff:ff:00:00:00:00) --> goto tbl 40 1 20 pport 2 vlan 3840 IP dst 01:00:5e:00:00:00(ff:ff:ff:80:00:00) --> goto tbl 40 0 20 pport 1 vlan 3840 IPv6 dst 52:54:00:12:35:01 --> goto tbl 30 0 20 10 pport 1 vlan 3840 IP dst 52:54:00:12:35:01 --> goto tbl 30 1 20 8 pport 1 vlan 3840 IPv6 dst
33:33:00:00:00:00(ff:ff:00:00:00:00) --> goto tbl 40
1 20 pport 1 vlan 3840 IP dst
01:00:5e:00:00:00(ff:ff:ff:80:00:00) --> goto tbl 40
(qemu) rocker-of-dpa-groups sw1
id (decode) --> buckets0x0f000002 (type L2 interface vlan 3840 pport 2) --> pop vlan out pport 2 0x0f000001 (type L2 interface vlan 3840 pport 1) --> pop vlan out pport 1 0x4f000000 (type L2 flood vlan 3840 index 0) --> groups [0x0f000002,0x0f000001] 0x0f000000 (type L2 interface vlan 3840 pport 0) --> pop vlan out pport 0
(qemu) rocker-of-dpa-groups sw1 0
id (decode) --> buckets0x0f000002 (type L2 interface vlan 3840 pport 2) --> pop vlan out pport 2 0x0f000001 (type L2 interface vlan 3840 pport 1) --> pop vlan out pport 1 0x0f000000 (type L2 interface vlan 3840 pport 0) --> pop vlan out pport 0
(qemu) rocker-of-dpa-groups sw1 4
id (decode) --> buckets0x4f000000 (type L2 flood vlan 3840 index 0) --> groups [0x0f000002,0x0f000001]
Quoted 5 lines · Scott Feldman
Quoted 4 lines · Eric Blake
Quoted 1 line · On 12/29/2014 10:14 PM, [email protected] wrote:
From: Scott Feldman <[email protected]>
In this mail, I'll review just the QMP interface portion:
Thanks for review, BTW.
Question: should these rocker defs be moved to qapi/rocker.json, and included in top-level qapi-schema.json?
-scott
Quoted 10 lines · Scott Feldman
Quoted 6 lines · Eric Blake
Quoted 1 line · On 12/29/2014 10:14 PM, [email protected] wrote:
From: Scott Feldman <[email protected]>
[your message came through as a top-level thread instead of in-reply-to the 0/10 cover letter; please see if you can fix that before the next submission]
Looks like I want git send-email options --no-chain-reply-to and --thread, correct?
When I use git send-email, the defaults just work. But I don't know if there is something in your ~/.gitconfig that changes the defaults, so I also don't know if those options would restore it back to the default. All I can suggest is experimenting with sending a test series to yourself to see if you got settings right, before sending to the list.
You can also update the wiki if you find out what was different for your case, and where adding options got it fixed:
http://wiki.qemu.org/Contribute/SubmitAPatch
Quoted 10 lines
Quoted 6 lines
qapi-schema.json line 3538
Quoted 3 lines
qapi-schema.json +3
-0+ '*tunnel_id': 'uint32', '*vlan_id': 'uint16', + '*eth_type': 'uint16', '*eth_src': 'str', '*eth_dst': 'str', + '*ip_proto': 'uint8', '*ip_tos': 'uint8', '*ip_dst': 'str' } }Is 'str' the right type for IP addresses, or should it be a more specific type?
String, using dotted-decimal notation seems best for user and script parsing. If it's encoded as native u32 then we need to say if it's host-byte-order or network-byte-order.
I can live with string if nothing is better; there's always the possibility of an array of uint8, rather than trying to encode as a native u32, but the further we get from normal notation, the harder it gets to visualize what is going on. Just throwing it out to make sure we think about it.
Quoted 16 lines
Quoted 4 lines
Quoted 4 lines
+++ b/qmp-commands.hx
qmp-commands.hx +0
-0@@ -3860,3 +3860,27 @@ Move mouse pointer to absolute coordinates (20000, 400). <- { "return": {} }Quoted 11 lines
qmp-commands.hx Move mouse pointer to absolute coordinates (20000, 400). · line 3869
Quoted 8 lines
qmp-commands.hx +7
-0EQMP + + { + .name = "rocker", + .args_type = "name:s", + .mhandler.cmd_new = qmp_marshal_input_rocker, + }, +Could you also provide example exchanges for each command added (what the user passes in, and what qemu responds)?
Quoted 1 line
Provide here or in the commit msg? Or in the code? Here's an example session:
In the .hx file. Plenty of other examples in that file to see what format they use.
Quoted 6 lines
(qemu) rocker sw1
name: sw1
id:0x0000013512005452
ports: 4
Quoted 7 lines
(qemu) rocker-ports sw1
ena/ speed/ auto
port link duplex neg?
sw1.1 up 10G FD No
sw1.2 up 10G FD No
sw1.3 !ena 10G FD No
sw1.4 !ena 10G FD No
That's the HMP representation; I'm asking about the QMP representation (the JSON exchange).
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Quoted 11 lines · Scott Feldman
Quoted 5 lines · Scott Feldman
Quoted 4 lines · Eric Blake
Quoted 1 line · On 12/29/2014 10:14 PM, [email protected] wrote:
From: Scott Feldman <[email protected]>
In this mail, I'll review just the QMP interface portion:
Thanks for review, BTW.
Question: should these rocker defs be moved to
qapi/rocker.json, and included in top-level qapi-schema.json?
Up to you, if you think they are big enough and useful enough to be broken into a separate file.
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org