Blame SOURCES/0189-devlink-introduce-pr_out_port_handle-helper.patch

049c96
From 8a2d81a5e49d22ee486c16864ae3462bd037e8ed Mon Sep 17 00:00:00 2001
049c96
From: Phil Sutter <psutter@redhat.com>
049c96
Date: Sat, 9 Jul 2016 11:33:14 +0200
049c96
Subject: [PATCH] devlink: introduce pr_out_port_handle helper
049c96
049c96
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1342515
049c96
Upstream Status: iproute2.git commit 68cab0ba763f9
049c96
049c96
commit 68cab0ba763f9d80740d171e1882ad4f262ca6e1
049c96
Author: Jiri Pirko <jiri@mellanox.com>
049c96
Date:   Fri Apr 15 09:51:46 2016 +0200
049c96
049c96
    devlink: introduce pr_out_port_handle helper
049c96
049c96
    Signed-off-by: Jiri Pirko <jiri@mellanox.com>
049c96
---
049c96
 devlink/devlink.c | 10 ++++++++--
049c96
 1 file changed, 8 insertions(+), 2 deletions(-)
049c96
049c96
diff --git a/devlink/devlink.c b/devlink/devlink.c
049c96
index 39f423a..0904e07 100644
049c96
--- a/devlink/devlink.c
049c96
+++ b/devlink/devlink.c
049c96
@@ -523,6 +523,12 @@ static void pr_out_handle(struct nlattr **tb)
049c96
 			mnl_attr_get_str(tb[DEVLINK_ATTR_DEV_NAME]));
049c96
 }
049c96
 
049c96
+static void pr_out_port_handle(struct nlattr **tb)
049c96
+{
049c96
+	pr_out_handle(tb);
049c96
+	pr_out("/%d", mnl_attr_get_u32(tb[DEVLINK_ATTR_PORT_INDEX]));
049c96
+}
049c96
+
049c96
 static void pr_out_dev(struct nlattr **tb)
049c96
 {
049c96
 	pr_out_handle(tb);
049c96
@@ -599,8 +605,8 @@ static void pr_out_port(struct nlattr **tb)
049c96
 	struct nlattr *pt_attr = tb[DEVLINK_ATTR_PORT_TYPE];
049c96
 	struct nlattr *dpt_attr = tb[DEVLINK_ATTR_PORT_DESIRED_TYPE];
049c96
 
049c96
-	pr_out_handle(tb);
049c96
-	pr_out("/%d:", mnl_attr_get_u32(tb[DEVLINK_ATTR_PORT_INDEX]));
049c96
+	pr_out_port_handle(tb);
049c96
+	pr_out(":");
049c96
 	if (pt_attr) {
049c96
 		uint16_t port_type = mnl_attr_get_u16(pt_attr);
049c96
 
049c96
-- 
049c96
1.8.3.1
049c96