[ovs-dev] [PATCH v2 6/8] ofctl: Add ovs-ofctl dump-table-features.
Alexander Wu
alexander.wu at huawei.com
Thu Nov 21 09:39:47 UTC 2013
Many thanks for review!
On 13/11/2013 16:24, Simon Horman wrote:
> On Wed, Nov 06, 2013 at 10:46:10PM +0800, Alexander Wu wrote:
>>
>> V2:
>> No change
>>
>> V1:
>> Now the cli we implement is very crude. Maybe it could
>> display better.
>>
>> Signed-off-by: Alexander Wu <alexander.wu at huawei.com>
>
> Reviewed-by: Simon Horman <horms at verge.net.au>
>
>> ---
>> utilities/ovs-ofctl.c | 17 +++++++++++++++++
>> 1 files changed, 17 insertions(+), 0 deletions(-)
>>
>> diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c
>> index a0dc5c8..a47a62a 100644
>> --- a/utilities/ovs-ofctl.c
>> +++ b/utilities/ovs-ofctl.c
>> @@ -281,6 +281,7 @@ usage(void)
>> " show SWITCH show OpenFlow information\n"
>> " dump-desc SWITCH print switch description\n"
>> " dump-tables SWITCH print table stats\n"
>> + " dump-table-features SWITCH print table features\n"
>> " mod-port SWITCH IFACE ACT modify port behavior\n"
>> " mod-table SWITCH MOD modify flow table behavior\n"
>> " get-frags SWITCH print fragment handling behavior\n"
>> @@ -650,6 +651,21 @@ ofctl_dump_tables(int argc OVS_UNUSED, char *argv[])
>> dump_trivial_stats_transaction(argv[1], OFPRAW_OFPST_TABLE_REQUEST);
>> }
>>
>> +static void
>> +ofctl_dump_table_features(int argc OVS_UNUSED, char *argv[])
>> +{
>> + struct ofpbuf *request;
>> + struct vconn *vconn;
>> +
>> + open_vconn(argv[1], &vconn);
>> + request = ofputil_encode_table_features_request(vconn_get_version(vconn));
>> + if (request) {
>> + dump_stats_transaction(vconn, request);
>> + }
>> +
>> + vconn_close(vconn);
>> +}
>> +
>> static bool
>> fetch_port_by_features(const char *vconn_name,
>> const char *port_name, ofp_port_t port_no,
>> @@ -3348,6 +3364,7 @@ static const struct command all_commands[] = {
>> { "snoop", 1, 1, ofctl_snoop },
>> { "dump-desc", 1, 1, ofctl_dump_desc },
>> { "dump-tables", 1, 1, ofctl_dump_tables },
>> + { "dump-table-features", 1, 1, ofctl_dump_table_features },
>> { "dump-flows", 1, 2, ofctl_dump_flows },
>> { "dump-aggregate", 1, 2, ofctl_dump_aggregate },
>> { "queue-stats", 1, 3, ofctl_queue_stats },
>> --
>> 1.7.3.1.msysgit.0
>>
>>
>
> .
>
More information about the dev
mailing list