[openib-general] Re: Re: [PATCH] RFC Verbs: add support for transport specific verbs

Michael S. Tsirkin mst at mellanox.co.il
Tue Feb 28 14:11:00 PST 2006


Quoting r. Caitlin Bestler <caitlinb at broadcom.com>:
> The only trick is avoiding an extra layer of indirection
> for any fastpath operations. So we may want to keep all
> fastpath operations transport neutral, at least on a
> syntax basis, to avoid the extra dereference. I'm not
> sure there are any, though.

No, thats not the only way. You can just do

struct ib_ops {
	process_local_mad;
};

struct iw_ops {
	llp_connect;
};

struct ib_device {
	struct ib_ops ib;
	struct iw_ops iw;
}

And there's no runtime overhead to this - its not an extra indirection.

You can even do:

struct ib_device {
	struct ib_ops;
	struct iw_ops;
}

To hide an extra structure from the user.

-- 
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies



More information about the general mailing list