[openib-general] Making gen2 transport neutral

Christoph Hellwig hch at lst.de
Thu Jun 30 09:03:02 PDT 2005


On Thu, Jun 30, 2005 at 08:52:54AM -0700, Caitlin Bestler wrote:
> structs:
> typically "struct ib_xyz" is transformed as follows:
> 
> 	struct ib_xyz {
> 		/* Only IB specific fields remain */
> 		/* In some cases fields have been split, because
>              * iWARP allows two things to vary that IB had
>              * locked together. SGE limits are the primary
>              * example of this. iWARP can have different
> 	 	 * limits on SGE size for each type of message
> 		 */
> 	};
> 
> 	struct iwarp_xyz {
> 		/* equivalent iWARP specific fields */
> 	};
> 
> 	struct rdma_xyz {
> 		/* Transport neutral fields. Typically
> 		 * a subset of what was in struct ib_xyz before
> 		 */
> 		union {
> 			struct ib_xyz ib;
> 			struct iwarp_xyz iwarp;
> 		} xpt;
> 	};

wrong way around, but we had that before.  It should be

struct ib_foo {
	struct rdma_foo common;
	...
}

struct iwarp_foo {
	struct rdma_foo common;
	...
}

see filesystem and network protocol private data for example where
why historically did it that union way and it didn't work out at all
long-term.

> I am assuming that returning a "not supported" error for irrelevant
> verbs is an acceptable burnden for all providers.

Even better make the methods implementing them optional and let the
upper layer return EOPNOTSUPP when it's not implemeneted.




More information about the general mailing list