summaryrefslogtreecommitdiff
path: root/devlink
diff options
context:
space:
mode:
authorJiri Pirko <jiri@nvidia.com>2022-12-15 18:00:56 +0100
committerStephen Hemminger <stephen@networkplumber.org>2022-12-19 08:35:48 -0800
commit1e994cf69cfd55fefd000565914fd85e3ec150af (patch)
treeffc7eba78235e14ded4245e5aae59b1a3056cd38 /devlink
parent3715a146e813745ed14cc1cf8cdd527495832c9e (diff)
downloadiproute2-1e994cf69cfd55fefd000565914fd85e3ec150af.tar.gz
devlink: fix mon json output for trap-policer
There is a json footer missed for trap-policer output in "devlink mon". So add it and fix the json output. Fixes: a66af5569337 ("devlink: Add devlink trap policer set and show commands") Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Diffstat (limited to 'devlink')
-rw-r--r--devlink/devlink.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/devlink/devlink.c b/devlink/devlink.c
index b865b83c..ae93e7cb 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -6741,6 +6741,7 @@ static int cmd_mon_show_cb(const struct nlmsghdr *nlh, void *data)
return MNL_CB_ERROR;
pr_out_mon_header(genl->cmd);
pr_out_trap_policer(dl, tb, false);
+ pr_out_mon_footer();
break;
case DEVLINK_CMD_LINECARD_GET: /* fall through */
case DEVLINK_CMD_LINECARD_SET: /* fall through */