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

From: Leon Romanovsky <[email-masked]>
Date: Tue, 4 Jul 2017 12:04:41 +0300

On Tue, Jul 04, 2017 at 10:55:39AM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <[email-masked]>
>
> 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 <[email-masked]>
> ---

<...>

> +}
> +
> +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