lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1460706713-5942-5-git-send-email-jiri@resnulli.us>
Date:	Fri, 15 Apr 2016 09:51:46 +0200
From:	Jiri Pirko <jiri@...nulli.us>
To:	netdev@...r.kernel.org
Cc:	stephen@...workplumber.org, davem@...emloft.net,
	idosch@...lanox.com, eladr@...lanox.com, yotamg@...lanox.com,
	ogerlitz@...lanox.com, roopa@...ulusnetworks.com,
	nikolay@...ulusnetworks.com, jhs@...atatu.com,
	john.fastabend@...il.com, rami.rosen@...el.com,
	gospo@...ulusnetworks.com, sfeldma@...il.com
Subject: [patch iproute2 04/11] devlink: introduce pr_out_port_handle helper

From: Jiri Pirko <jiri@...lanox.com>

Signed-off-by: Jiri Pirko <jiri@...lanox.com>
---
 devlink/devlink.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/devlink/devlink.c b/devlink/devlink.c
index 39f423a..0904e07 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -523,6 +523,12 @@ static void pr_out_handle(struct nlattr **tb)
 			mnl_attr_get_str(tb[DEVLINK_ATTR_DEV_NAME]));
 }
 
+static void pr_out_port_handle(struct nlattr **tb)
+{
+	pr_out_handle(tb);
+	pr_out("/%d", mnl_attr_get_u32(tb[DEVLINK_ATTR_PORT_INDEX]));
+}
+
 static void pr_out_dev(struct nlattr **tb)
 {
 	pr_out_handle(tb);
@@ -599,8 +605,8 @@ static void pr_out_port(struct nlattr **tb)
 	struct nlattr *pt_attr = tb[DEVLINK_ATTR_PORT_TYPE];
 	struct nlattr *dpt_attr = tb[DEVLINK_ATTR_PORT_DESIRED_TYPE];
 
-	pr_out_handle(tb);
-	pr_out("/%d:", mnl_attr_get_u32(tb[DEVLINK_ATTR_PORT_INDEX]));
+	pr_out_port_handle(tb);
+	pr_out(":");
 	if (pt_attr) {
 		uint16_t port_type = mnl_attr_get_u16(pt_attr);
 
-- 
2.5.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ