[openib-general] ib_req_ncomp_notif in core_ layer
Grant Grundler
iod00d at hp.com
Wed Aug 4 16:02:00 PDT 2004
On Wed, Aug 04, 2004 at 11:41:38AM +0300, Michael S. Tsirkin wrote:
> Why cant all users just do device->req_ncomp_notif(cq, wc_cnt) directly?
It's useful to hide the indirect function call with either static inline
or a macro. This reduces programming errors, hides the "method" used
to access the indirect function and defines the "API" for a layer of code.
> Its true that req_ncomp_notif could be NULL, but this could
> be fixed, instead, by modifying it to a reasonable default when
> the device is initialised.
I asked the same question about 4 monthes ago for a different
"jump table". If a function is "required", then supplying a default
function call is practical (and my preference too).
thanks,
grant
More information about the general
mailing list