Thread (13 messages) flat view 13 messages, 4 authors, 2017-07-11

Re: [PATCH iproute2 V3 2/4] rdma: Add dev object

From: Leon Romanovsky <hidden>
Date: 2017-07-04 09:04:49
Also in: linux-rdma

On Tue, Jul 04, 2017 at 10:55:39AM +0300, Leon Romanovsky wrote:
From: Leon Romanovsky <redacted>

Device (dev) object represents struct ib_device to the user space.

Device properties:
 * Device capabilities
 * FW version to the device output
 * node_guid and sys_image_guid
 * node_type

Signed-off-by: Leon Romanovsky <redacted>
---
<...>
+}
+
+static void dev_print_node_type(struct nlattr **tb)
+{
+	uint8_t node_type;
+	/*
+	 * FIXME: move to index exported by the kernel
+	 */
+	static const char *str[] = {
+		"UNKNOWN",
+		"SWITCH",
+		"ROUTER",
+		"RNIC",
+		"USNIC",
+		"USNIC_UDP",
+	};
There is a bug here, i forgot to add "CA" to the list of node_types
(before SWITCH). Thanks to Or Gerlitz who spotted it.

Thanks

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help