Skip to contentSkip to conversation

devlink: fix mon json output for trap-policer

PATCH Applied Jiri Pirko 3 participants 3 messages Dec 15, 2022 – Dec 19, 2022

Subsystems (2)
lore
Share & tools
lore

Jiri Pirko

author
#0 lore raw

PATCH 1/1 devlink: fix mon json output for trap-policer

From: Jiri Pirko <[email protected]>

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")
---
 devlink/devlink.c | 1 +
 1 file changed, 1 insertion(+)
devlink/devlink.c +1 -0
index 11daf0c36e5d..4baac2a8d60f 100644
@@ -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 */
Signature · 1 line
2.37.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Jiri Pirko

From: Jiri Pirko <[email protected]>

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")

Looks like we missed it in commit c4dfddccef4e ("devlink: fix JSON output of mon command")

#2 lore raw
In reply to Jiri Pirko
This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:

Hello:

This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:

Quoted 9 lines · On Thu, 15 Dec 2022 18:00:56 +0100 you wrote:

From: Jiri Pirko <[email protected]>

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")

[...]

Here is the summary with links:
- [iproute2-main] devlink: fix mon json output for trap-policer

    https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=1e994cf69cfd

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html