On Thu, Aug 09, 2012 at 05:49:34PM +0900, Simon Horman wrote:
> Signed-off-by: Simon Horman <[email protected]>
I try to make sure that hexadecimal in OVS output is always indicated
explicitly with 0x, so I folded in the following and applied the
patch:
diff --git a/lib/ofp-print.c b/lib/ofp-print.c
index 0cbb74e..013561f 100644
--- a/lib/ofp-print.c
+++ b/lib/ofp-print.c
@@ -1161,14 +1161,14 @@ ofp_print_one_ofpst_table_reply(struct ds *string, enum
ofp_version ofp_version,
}
ds_put_cstr(string, " ");
- ds_put_format(string, "match=%08"PRIx64", ", ntohll(ts->match));
- ds_put_format(string, "instructions=%08"PRIx32", ",
+ ds_put_format(string, "match=0x%08"PRIx64", ", ntohll(ts->match));
+ ds_put_format(string, "instructions=0x%08"PRIx32", ",
ntohl(ts->instructions));
- ds_put_format(string, "config=%08"PRIx32"\n", ntohl(ts->config));
+ ds_put_format(string, "config=0x%08"PRIx32"\n", ntohl(ts->config));
ds_put_cstr(string, " ");
- ds_put_format(string, "write_actions=%08"PRIx32", ",
+ ds_put_format(string, "write_actions=0x%08"PRIx32", ",
ntohl(ts->write_actions));
- ds_put_format(string, "apply_actions=%08"PRIx32"\n",
+ ds_put_format(string, "apply_actions=0x%08"PRIx32"\n",
ntohl(ts->apply_actions));
if (ofp_version < OFP12_VERSION) {
@@ -1176,16 +1176,16 @@ ofp_print_one_ofpst_table_reply(struct ds *string, enum
ofp_version ofp_version,
}
ds_put_cstr(string, " ");
- ds_put_format(string, "write_setfields=%016"PRIx64"\n",
+ ds_put_format(string, "write_setfields=0x%016"PRIx64"\n",
ntohll(ts->write_setfields));
ds_put_cstr(string, " ");
- ds_put_format(string, "apply_setfields=%016"PRIx64"\n",
+ ds_put_format(string, "apply_setfields=0x%016"PRIx64"\n",
ntohll(ts->apply_setfields));
ds_put_cstr(string, " ");
- ds_put_format(string, "metadata_match=%016"PRIx64"\n",
+ ds_put_format(string, "metadata_match=0x%016"PRIx64"\n",
ntohll(ts->metadata_match));
ds_put_cstr(string, " ");
- ds_put_format(string, "metadata_write=%016"PRIx64"\n",
+ ds_put_format(string, "metadata_write=0x%016"PRIx64"\n",
ntohll(ts->metadata_write));
}
diff --git a/tests/ofp-print.at b/tests/ofp-print.at
index f8e0d80..2344980 100644
--- a/tests/ofp-print.at
+++ b/tests/ofp-print.at
@@ -785,12 +785,12 @@ AT_SETUP([OFPST_TABLE reply - OF1.2])
AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
(mid="wild=0xfffffffff, max=1000000,"
tail="
- match=fffffffff, instructions=00000007, config=00000000
- write_actions=00000000, apply_actions=00000000
- write_setfields=0000000fffffffff
- apply_setfields=0000000fffffffff
- metadata_match=0000000000000000
- metadata_write=0000000000000000"
+ match=0xfffffffff, instructions=0x00000007, config=0x00000000
+ write_actions=0x00000000, apply_actions=0x00000000
+ write_setfields=0x0000000fffffffff
+ apply_setfields=0x0000000fffffffff
+ metadata_match=0x0000000000000000
+ metadata_write=0x0000000000000000"
echo "OFPST_TABLE reply (OF1.2) (xid=0x2): 255 tables
0: classifier: $mid active=1
lookup=74614, matched=106024$tail"
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev