[openib-general] [PATCH] [RFC] group devices by type

James Lentini jlentini at netapp.com
Wed Jan 25 12:33:16 PST 2006


On Wed, 25 Jan 2006, Sean Hefty wrote:

> Index: include/rdma/ib_verbs.h
> ===================================================================
> --- include/rdma/ib_verbs.h	(revision 5098)
> +++ include/rdma/ib_verbs.h	(working copy)
> @@ -57,7 +57,8 @@ union ib_gid {
>  };
>  
>  enum ib_node_type {
> -	IB_NODE_CA 	= 1,
> +	IB_NODE_IB = 0x10,		/* mask for all IB node types */

Is is time to update the prefix to RDMA_ (e.g. RDMA_NODE_IB)?

> +	IB_NODE_CA,
>  	IB_NODE_SWITCH,
>  	IB_NODE_ROUTER
>  };
> Index: core/mad.c
> ===================================================================
> --- core/mad.c	(revision 5098)
> +++ core/mad.c	(working copy)
> @@ -2661,7 +2661,9 @@ static void ib_mad_init_device(struct ib
>  {
>  	int start, end, i;
>  
> -	if (device->node_type == IB_NODE_SWITCH) {
> +	if ((device->node_type & IB_NODE_IB) != IB_NODE_IB)
> +		return;
> +	else if (device->node_type == IB_NODE_SWITCH) {
>  		start = 0;
>  		end   = 0;
>  	} else {



More information about the general mailing list