@@ -459,16 +459,17 @@ described in section \fBMeter Syntax\fR, below.
.IP "\fBmod\-meter \fIswitch meter\fR"
Modify an existing meter.
.
-.IP "\fBdel\-meters \fIswitch\fR"
-.IQ "\fBdel\-meter \fIswitch\fR [\fImeter\fR]"
-Delete entries from \fIswitch\fR's meter table. \fImeter\fR can specify
-a single meter with syntax \fBmeter=\fIid\fR, or all meters with syntax
-\fBmeter=all\fR.
-.
-.IP "\fBdump\-meters \fIswitch\fR"
-.IQ "\fBdump\-meter \fIswitch\fR [\fImeter\fR]"
-Print meter configuration. \fImeter\fR can specify a single meter with
-syntax \fBmeter=\fIid\fR, or all meters with syntax \fBmeter=all\fR.
+.IP "\fBdel\-meters \fIswitch\fR [\fImeter\fR]"
+Delete entries from \fIswitch\fR's meter table. To delete only a
+specific meter, specify its number as \fImeter\fR. Otherwise, if
+\fImeter\fR is omitted, or if it is specified as \fBall\fR, then all
+meters are deleted.
+.
+.IP "\fBdump\-meters \fIswitch\fR [\fImeter\fR]"
+Print entries from \fIswitch\fR's meter table. To print only a
+specific meter, specify its number as \fImeter\fR. Otherwise, if
+\fImeter\fR is omitted, or if it is specified as \fBall\fR, then all
+meters are printed.
.
.IP "\fBmeter\-stats \fIswitch\fR [\fImeter\fR]"
Print meter statistics. \fImeter\fR can specify a single meter with
@@ -477,10 +477,8 @@ usage(void)
" queue-get-config SWITCH [PORT] print queue config for PORT\n"
" add-meter SWITCH METER add meter described by METER\n"
" mod-meter SWITCH METER modify specific METER\n"
- " del-meter SWITCH METER delete METER\n"
- " del-meters SWITCH delete all meters\n"
- " dump-meter SWITCH METER print METER configuration\n"
- " dump-meters SWITCH print all meter configuration\n"
+ " del-meters SWITCH [METER] delete meters matching METER\n"
+ " dump-meters SWITCH [METER] print METER configuration\n"
" meter-stats SWITCH [METER] print meter statistics\n"
" meter-features SWITCH print meter features\n"
" add-tlv-map SWITCH MAP add TLV option MAPpings\n"
@@ -4844,13 +4842,13 @@ static const struct ovs_cmdl_command all_commands[] = {
{ "mod-meter", "switch meter",
2, 2, ofctl_mod_meter, OVS_RW },
{ "del-meter", "switch meter",
- 2, 2, ofctl_del_meters, OVS_RW },
+ 1, 2, ofctl_del_meters, OVS_RW },
{ "del-meters", "switch",
- 1, 1, ofctl_del_meters, OVS_RW },
+ 1, 2, ofctl_del_meters, OVS_RW },
{ "dump-meter", "switch meter",
- 2, 2, ofctl_dump_meters, OVS_RO },
+ 1, 2, ofctl_dump_meters, OVS_RO },
{ "dump-meters", "switch",
- 1, 1, ofctl_dump_meters, OVS_RO },
+ 1, 2, ofctl_dump_meters, OVS_RO },
{ "meter-stats", "switch [meter]",
1, 2, ofctl_meter_stats, OVS_RO },
{ "meter-features", "switch",
Previously to delete or dump the meter table, separate commands had to be used depending on whether one wanted to operate on a single or all meters. This change makes it so that the "meter" argument is always optional regardless of the command. This is a bit more consistent with other OVS commands and makes it easier when experimenting to not have to distinguish between the two cases. This also fixes an error in the ovs-ofctl man page that show the plural version of the command supported an optional "meter" argument. "del-meter" and "dump-meter" can still be used, but their use is no longer documented. Signed-off-by: Justin Pettit <jpettit@ovn.org> --- utilities/ovs-ofctl.8.in | 21 +++++++++++---------- utilities/ovs-ofctl.c | 14 ++++++-------- 2 files changed, 17 insertions(+), 18 deletions(-)