[openib-general] Re: [PATCH] Don't require create_ah and modify_port provider methods

Michael S. Tsirkin mst at mellanox.co.il
Wed Mar 15 12:33:58 PST 2006


Quoting r. Michael S. Tsirkin <mst at mellanox.co.il>:
> But we can have separate static ENOSYS stubs for each field, and fill them in
> instead of NULL pointers on device registration.
> 
> BTW, would be good for IB devices too, and will let us kill a bunch
> of checks spread over the core right now.

On the other hand, if I want to know whether a device implements
a function, its much better to compare the function pointer to NULL
than call it and check the return status.
For example, its nice that I can just check the alloc_fmr pointer
and know the device implements FMRs, so I can't use that
optimization.

All things considered - I like it how it is today. Let's just add
checks in core for functions that iWarp misses - this is never
data-path stuff.

So I'm fine with the way Steve did it.

-- 
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies



More information about the general mailing list