diff options
author | Ben Pfaff <blp@ovn.org> | 2018-08-30 11:03:12 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-10-26 15:19:44 -0700 |
commit | b47e7e2bac7f21f8c81aaeb1068598a6064c348b (patch) | |
tree | be9c83b40c7e0875c2671663d74ec76f35922be9 /lib | |
parent | dccab9b15e656c6c1db1b8e94da1e1f234811506 (diff) | |
download | openvswitch-b47e7e2bac7f21f8c81aaeb1068598a6064c348b.tar.gz |
ofp-table: Always format the table number in table features.
Table features should indicate the table number as well as the table
name. Before this, the first line for each table looked like this:
table myname ("myname"):
but it's more useful if it's:
table 123 ("myname"):
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ofp-print.c | 14 | ||||
-rw-r--r-- | lib/ofp-table.c | 4 |
2 files changed, 7 insertions, 11 deletions
diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 10d6f5962..789b40a3c 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -226,8 +226,7 @@ ofp_print_get_config_reply(struct ds *string, const struct ofp_header *oh) } static enum ofperr -ofp_print_table_features_reply(struct ds *s, const struct ofp_header *oh, - const struct ofputil_table_map *table_map) +ofp_print_table_features_reply(struct ds *s, const struct ofp_header *oh) { struct ofpbuf b = ofpbuf_const_initializer(oh, ntohs(oh->length)); @@ -244,7 +243,7 @@ ofp_print_table_features_reply(struct ds *s, const struct ofp_header *oh, } ofputil_table_features_format(s, &tf, i ? &prev : NULL, NULL, NULL, - table_map, &first_ditto, &last_ditto); + &first_ditto, &last_ditto); prev = tf; } } @@ -567,8 +566,7 @@ ofp_print_ofpst_port_reply(struct ds *string, const struct ofp_header *oh, } static enum ofperr -ofp_print_table_stats_reply(struct ds *string, const struct ofp_header *oh, - const struct ofputil_table_map *table_map) +ofp_print_table_stats_reply(struct ds *string, const struct ofp_header *oh) { struct ofpbuf b = ofpbuf_const_initializer(oh, ntohs(oh->length)); ofpraw_pull_assert(&b); @@ -591,7 +589,7 @@ ofp_print_table_stats_reply(struct ds *string, const struct ofp_header *oh, ofputil_table_features_format(string, &features, i ? &prev_features : NULL, &stats, i ? &prev_stats : NULL, - table_map, &first_ditto, &last_ditto); + &first_ditto, &last_ditto); prev_features = features; prev_stats = stats; } @@ -991,7 +989,7 @@ ofp_to_string__(const struct ofp_header *oh, case OFPTYPE_TABLE_FEATURES_STATS_REQUEST: case OFPTYPE_TABLE_FEATURES_STATS_REPLY: - return ofp_print_table_features_reply(string, oh, table_map); + return ofp_print_table_features_reply(string, oh); case OFPTYPE_TABLE_DESC_REQUEST: case OFPTYPE_TABLE_DESC_REPLY: @@ -1114,7 +1112,7 @@ ofp_to_string__(const struct ofp_header *oh, return ofp_print_ofpst_port_reply(string, oh, port_map, verbosity); case OFPTYPE_TABLE_STATS_REPLY: - return ofp_print_table_stats_reply(string, oh, table_map); + return ofp_print_table_stats_reply(string, oh); case OFPTYPE_AGGREGATE_STATS_REPLY: return ofp_print_aggregate_stats_reply(string, oh); diff --git a/lib/ofp-table.c b/lib/ofp-table.c index e5c824771..88fc32240 100644 --- a/lib/ofp-table.c +++ b/lib/ofp-table.c @@ -1432,7 +1432,6 @@ ofputil_table_features_format( const struct ofputil_table_features *prev_features, const struct ofputil_table_stats *stats, const struct ofputil_table_stats *prev_stats, - const struct ofputil_table_map *table_map, int *first_ditto, int *last_ditto) { int table = features->table_id; @@ -1452,8 +1451,7 @@ ofputil_table_features_format( ofputil_table_features_format_finish(s, *first_ditto, *last_ditto); *first_ditto = -1; - ds_put_format(s, "\n table "); - ofputil_format_table(table, table_map, s); + ds_put_format(s, "\n table %"PRIu8, table); if (features->name[0]) { ds_put_format(s, " (\"%s\")", features->name); } |