From: Jiri Pirko Date: Sat, 4 Apr 2020 16:16:17 +0000 (+0200) Subject: devlink: Add alias "counters_enabled" for "counters" option X-Git-Tag: v5.7.0~42^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=192e7b3ffa1de43dc65b95b8c19a1e73baa251ff;p=thirdparty%2Fiproute2.git devlink: Add alias "counters_enabled" for "counters" option 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 Signed-off-by: Stephen Hemminger --- diff --git a/devlink/devlink.c b/devlink/devlink.c index 6a24f28fa..476f8df63 100644 --- a/devlink/devlink.c +++ b/devlink/devlink.c @@ -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);