[ovs-dev] [PATCH][v2] dpctl: fix dpctl process command parameter error

Mark Gray mark.d.gray at redhat.com
Tue Jan 12 14:37:51 UTC 2021


On 12/01/2021 05:22, Mao YingMing wrote:
> fix the following error:
> """
> $ ovs-appctl dpctl/dump-conntrack -m -s system at ovs-system zone=0
> "dpctl/dump-conntrack" command takes at most 2 arguments
> ovs-appctl: ovs-vswitchd: server returned an error
> 
> $ ovs-appctl dpctl/dump-flows -m --names system at ovs-system filter=in_port\(2\) type=ovs
> "dpctl/dump-flows" command takes at most 4 arguments
> ovs-appctl: ovs-vswitchd: server returned an error
> 
> """
> 
> Signed-off-by: Mao YingMing <maoyingming at baidu.com>
> ---
> diff with v1: rebase
> 
>  lib/dpctl.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/dpctl.c b/lib/dpctl.c
> index d43e0a7..ef8ae74 100644
> --- a/lib/dpctl.c
> +++ b/lib/dpctl.c
> @@ -2687,9 +2687,9 @@ static const struct dpctl_command all_commands[] = {
>      { "del-if", "dp iface...", 2, INT_MAX, dpctl_del_if, DP_RW },
>      { "set-if", "dp iface...", 2, INT_MAX, dpctl_set_if, DP_RW },
>      { "dump-dps", "", 0, 0, dpctl_dump_dps, DP_RO },
> -    { "show", "[dp...]", 0, INT_MAX, dpctl_show, DP_RO },
> -    { "dump-flows", "[dp] [filter=..] [type=..] [pmd=..]",
> -      0, 4, dpctl_dump_flows, DP_RO },
> +    { "show", "[-s] [dp...]", 0, INT_MAX, dpctl_show, DP_RO },
> +    { "dump-flows", "[-m] [--names] [dp] [filter=..] [type=..] [pmd=..]",
> +      0, 6, dpctl_dump_flows, DP_RO },
>      { "add-flow", "[dp] flow actions", 2, 3, dpctl_add_flow, DP_RW },
>      { "mod-flow", "[dp] flow actions", 2, 3, dpctl_mod_flow, DP_RW },
>      { "get-flow", "[dp] ufid", 1, 2, dpctl_get_flow, DP_RO },
> @@ -2697,7 +2697,8 @@ static const struct dpctl_command all_commands[] = {
>      { "add-flows", "[dp] file", 1, 2, dpctl_process_flows, DP_RW },
>      { "mod-flows", "[dp] file", 1, 2, dpctl_process_flows, DP_RW },
>      { "del-flows", "[dp] [file]", 0, 2, dpctl_del_flows, DP_RW },
> -    { "dump-conntrack", "[dp] [zone=N]", 0, 2, dpctl_dump_conntrack, DP_RO },
> +    { "dump-conntrack", "[-m] [-s] [dp] [zone=N]",
> +      0, 4, dpctl_dump_conntrack, DP_RO },
>      { "flush-conntrack", "[dp] [zone=N] [ct-tuple]", 0, 3,
>        dpctl_flush_conntrack, DP_RW },
>      { "ct-stats-show", "[dp] [zone=N]",
> 


LGTM. Reviewed and tested.

Acked-by: Mark Gray <mark.d.gray at redhat.com>



More information about the dev mailing list