git://git.onelab.eu
/
sliver-openvswitch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
611e9a3
)
Add pretty-printers for QoS related OpenFlow and ODP actions.
author
Ben Pfaff
<blp@nicira.com>
Fri, 16 Jul 2010 22:30:09 +0000
(15:30 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Tue, 20 Jul 2010 18:22:36 +0000
(11:22 -0700)
lib/odp-util.c
patch
|
blob
|
history
lib/ofp-print.c
patch
|
blob
|
history
diff --git
a/lib/odp-util.c
b/lib/odp-util.c
index
67d1b3e
..
ccf05c6
100644
(file)
--- a/
lib/odp-util.c
+++ b/
lib/odp-util.c
@@
-92,6
+92,12
@@
format_odp_action(struct ds *ds, const union odp_action *a)
case ODPAT_SET_TP_DST:
ds_put_format(ds, "set_tp_dst(%"PRIu16")", ntohs(a->tp_port.tp_port));
break;
case ODPAT_SET_TP_DST:
ds_put_format(ds, "set_tp_dst(%"PRIu16")", ntohs(a->tp_port.tp_port));
break;
+ case ODPAT_SET_PRIORITY:
+ ds_put_format(ds, "set_priority(0x%"PRIx32")", a->priority.priority);
+ break;
+ case ODPAT_POP_PRIORITY:
+ ds_put_cstr(ds, "pop_priority");
+ break;
default:
ds_put_format(ds, "***bad action 0x%"PRIx16"***", a->type);
break;
default:
ds_put_format(ds, "***bad action 0x%"PRIx16"***", a->type);
break;
diff --git
a/lib/ofp-print.c
b/lib/ofp-print.c
index
7c1ebd0
..
c713060
100644
(file)
--- a/
lib/ofp-print.c
+++ b/
lib/ofp-print.c
@@
-313,6
+313,20
@@
ofp_print_action(struct ds *string, const struct ofp_action_header *ah,
break;
}
break;
}
+ case OFPAT_ENQUEUE: {
+ struct ofp_action_enqueue *ea = (struct ofp_action_enqueue *)ah;
+ unsigned int port = ntohs(ea->port);
+ unsigned int queue_id = ntohl(ea->queue_id);
+ ds_put_format(string, "enqueue:");
+ if (port != OFPP_IN_PORT) {
+ ds_put_format(string, "%u", port);
+ } else {
+ ds_put_cstr(string, "IN_PORT");
+ }
+ ds_put_format(string, "q%u", queue_id);
+ break;
+ }
+
case OFPAT_SET_VLAN_VID: {
struct ofp_action_vlan_vid *va = (struct ofp_action_vlan_vid *)ah;
ds_put_format(string, "mod_vlan_vid:%"PRIu16, ntohs(va->vlan_vid));
case OFPAT_SET_VLAN_VID: {
struct ofp_action_vlan_vid *va = (struct ofp_action_vlan_vid *)ah;
ds_put_format(string, "mod_vlan_vid:%"PRIu16, ntohs(va->vlan_vid));