diff mbox series

[iproute2/net-next,4/8] devlink: Add alias "counters_enabled" for "counters" option

Message ID 20200404161621.3452-5-jiri@resnulli.us
State New
Headers show
Series devlink: spring cleanup | expand

Commit Message

Jiri Pirko April 4, 2020, 4:16 p.m. UTC
From: Jiri Pirko <jiri@mellanox.com>

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>
---
 devlink/devlink.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/devlink/devlink.c b/devlink/devlink.c
index 79a1c3829c31..d40991d52cf6 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -1345,7 +1345,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);