diff options
author | Jarno Rajahalme <jarno.rajahalme@nsn.com> | 2012-11-26 18:17:08 +0200 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2012-11-27 08:28:39 -0800 |
commit | 7f05e7abc8fc190c5ff60dd3c3fcd4b9eb5c8dfa (patch) | |
tree | 719437a68ccf91982bdfcbeee380428927e5c68e /utilities | |
parent | 558e2cc58e16f6e3cee44926d69d385d84d42521 (diff) |
Fix handling of OFPP_ANY in OpenFlow 1.1 and later.
Add OFPP_ANY to include/openflow/openflow-1.1.h, and allow it as a port in
queue stats request. Make ovs_ofctl use OFPP_ANY instead of OFPP_ALL for queue
stats requests on OF 1.1+.
This patch changes "none" ports print out. "none" is still accepted on input
for backwards compatibility, but it prints out as "ANY". To make this less
confusing, I changed the test cases to use "controller" or "any" instead of
"none". The test case that tests for both "none" and "controller" still tests
for them.
Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'utilities')
-rw-r--r-- | utilities/ovs-ofctl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index 363c0a3a..50373986 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -968,7 +968,7 @@ ofctl_queue_stats(int argc, char *argv[]) if (argc > 2 && argv[2][0] && strcasecmp(argv[2], "all")) { oqs.port_no = str_to_port_no(argv[1], argv[2]); } else { - oqs.port_no = OFPP_ALL; + oqs.port_no = OFPP_ANY; } if (argc > 3 && argv[3][0] && strcasecmp(argv[3], "all")) { oqs.queue_id = atoi(argv[3]); @@ -1430,7 +1430,7 @@ ofctl_dump_ports(int argc, char *argv[]) uint16_t port; open_vconn(argv[1], &vconn); - port = argc > 2 ? str_to_port_no(argv[1], argv[2]) : OFPP_NONE; + port = argc > 2 ? str_to_port_no(argv[1], argv[2]) : OFPP_ANY; request = ofputil_encode_dump_ports_request(vconn_get_version(vconn), port); dump_stats_transaction(vconn, request); vconn_close(vconn); @@ -1940,7 +1940,7 @@ read_flows_from_switch(struct vconn *vconn, fsr.aggregate = false; match_init_catchall(&fsr.match); - fsr.out_port = OFPP_NONE; + fsr.out_port = OFPP_ANY; fsr.table_id = 0xff; fsr.cookie = fsr.cookie_mask = htonll(0); request = ofputil_encode_flow_stats_request(&fsr, protocol); @@ -1983,7 +1983,7 @@ fte_make_flow_mod(const struct fte *fte, int index, uint16_t command, fm.idle_timeout = version->idle_timeout; fm.hard_timeout = version->hard_timeout; fm.buffer_id = UINT32_MAX; - fm.out_port = OFPP_NONE; + fm.out_port = OFPP_ANY; fm.flags = version->flags; if (command == OFPFC_ADD || command == OFPFC_MODIFY || command == OFPFC_MODIFY_STRICT) { |