[openib-general] optional function calls
Sean Hefty
sean.hefty at intel.com
Sat Aug 28 21:46:15 PDT 2004
> Sean> I'm trying to decide which IB function require checks to see
> Sean> if they exist. Should we go by the spec and assume that all
> Sean> mandatory functions are implemented by the device driver?
>
>No, I don't think so. I think we might as well make the stack useful
>not just with full HCA hardware but also on embedded hardware (running
>on switches and TCAs). For example, a switch is unlikely to support
>memory windows (even though the MW verbs are mandatory).
This was my thinking as well, but wanted to see if anyone thought
differently.
> Sean> Or should we allow the minimal subset possible?
>
>This is my vote.
If there's no disagreement, then I'll probably use the minimal subset in
your core_device.c file.
> Sean> Also, if calls like ib_create_srq and ib_attach_mcast check
> Sean> to see if the device implemented the functions, do we need
> Sean> the same check on calls to ib_destroy_srq and
> Sean> ib_detach_mcast? I.e. should we only perform the check in
> Sean> the creation calls?
>
>I think it's reasonable to only check the creation calls (and possibly
>put a check in the device registration function that if a device
>implements the create method, it implements all the other methods for
>an object -- although this falls down for things like CQ resize which
>might not be implemented).
I'll add checks to only the necessary calls then. E.g. ib_create_srq,
ib_attach_mcast, ib_resize_cq, ib_query_qp, etc.
More information about the general
mailing list