[openib-general] Re: (SPAM?) [RFC] new ibv_get_devices() API -- avoid dlists
Michael S. Tsirkin
mst at mellanox.co.il
Sat Nov 12 13:40:29 PST 2005
Quoting r. Roland Dreier <rolandd at cisco.com>:
> Subject: Re: (SPAM?) [RFC] new ibv_get_devices() API -- avoid dlists
>
> > I would prefer one call to get the entire structure. Another option might
> > be:
> >
> > struct ibv_device ** ibv_get_device()
> >
> > where it returns a list which is null terminated so you do not need to
> > return the length.
>
> Yes, I thought of that too. It seemed faintly preferable to tell the
> caller how big the array was rather than forcing the caller to count
> for itself. But I can't really think of a use case where it makes a
> difference, so perhaps your simpler version is better.
>
> - R.
Me, I like the
int ibv_get_device_list(struct ibv_device **list[]);
better.
NULL-terminated arrays are, to me, inconvenient.
--
MST
More information about the general
mailing list