]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
devlink: Add alias "counters_enabled" for "counters" option
authorJiri Pirko <jiri@mellanox.com>
Sat, 4 Apr 2020 16:16:17 +0000 (18:16 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 6 Apr 2020 17:00:32 +0000 (10:00 -0700)
To be consistent with netlink attribute name and also with the
"dpipe table show" output, add "counters_enabled" for "counters" in
"dpipe table set" command.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
devlink/devlink.c

index 6a24f28fac8764f6e6787ddd152210bb9059af68..476f8df632f21f85e41a8ed2b4fae9cabb0e7e9b 100644 (file)
@@ -1332,7 +1332,8 @@ static int dl_argv_parse(struct dl *dl, uint64_t o_required,
                        if (err)
                                return err;
                        o_found |= DL_OPT_DPIPE_TABLE_NAME;
-               } else if (dl_argv_match(dl, "counters") &&
+               } else if ((dl_argv_match(dl, "counters") ||
+                           dl_argv_match(dl, "counters_enabled")) &&
                           (o_all & DL_OPT_DPIPE_TABLE_COUNTERS)) {
                        dl_arg_inc(dl);
                        err = dl_argv_bool(dl, &opts->dpipe_counters_enable);