[Openib-windows] Make KAL static library

Fabian Tillier ftillier at silverstorm.com
Mon Apr 10 13:37:25 PDT 2006


On 4/10/06, Tzachi Dar <tzachid at mellanox.co.il> wrote:
> Hi Fab,
>
> We (that is the SDP) weren't using the node_desc for anything.
> Our problem is that, today once we link with IBAL this forces us to
> define this variable in the SDP code, just so the link will succeed.

Ok, I think I'm confused.  If you're not using it for anything, why
not remove the reference?  Where you linking in the entry points
rather than using the IBAL interface structure through a
QUERY_INTERFACE IRP?

> This it true for everyone who will be statically linking with IBAL. In
> order to remove this dependency, we thought that it might be better to
> move the variable from the bus driver to the IBAL. There can also be
> other solutions to this problems, such as passing a pointer to this
> location and so on.

I want to move away from DLLs in the kernel, as they would require
adding explicit versioning in the API calls.  The right way to access
IBAL is to query for its interface, as well as register for PnP events
on that interface.  The interface is versioned, so a driver built for
the wrong version will just fail to load rather than potentially crash
the system.  I don't know how you're loading - are you loading as a
protocol driver above IPoIB?  Are you creating a virtual device node? 
Do you currently query for the IBAL interface?

You can look at any of the ULPs for how to query for the interface. 
The HCA drivers have code to find the IBAL device dynamically and
register for PnP notifications on that device.  Both of these should
help you resolve the linker problems.

If the node description is needed, we can add it to the IBAL interface
structure.  I would like to understand how it would be used before
making the change, though.

- Fab



More information about the ofw mailing list