public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [patch iproute2-main] devlink: fix mon json output for trap-policer
@ 2022-12-15 17:00 Jiri Pirko
  2022-12-15 17:19 ` Ido Schimmel
  2022-12-19 16:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Jiri Pirko @ 2022-12-15 17:00 UTC (permalink / raw)
  To: netdev; +Cc: stephen, dsahern, idosch

From: Jiri Pirko <jiri@nvidia.com>

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>
---
 devlink/devlink.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/devlink/devlink.c b/devlink/devlink.c
index 11daf0c36e5d..4baac2a8d60f 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -6522,6 +6522,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 */
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-19 16:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-15 17:00 [patch iproute2-main] devlink: fix mon json output for trap-policer Jiri Pirko
2022-12-15 17:19 ` Ido Schimmel
2022-12-19 16:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox