Quoting r. Sean Hefty <[EMAIL PROTECTED]>:
> Subject: Re: Re: [PATCH] RFC Verbs: add support for transport specific verbs
>
> Michael S. Tsirkin wrote:
> >Okay, but lets try to avoid adding runtime overhead.
>
> This shouldn't add any runtime overhead than what's already there. The
> only difference is the notation used to get to the process_mad function.
The overhead will appear when you call the function, since you
will have to check the device type. I know its small, but lets not
set the wrong precedent.
Lets put it this way: we have e.g. in core/sysfs.c show_pma_counter:
if (!p->ibdev->process_mad)
return sprintf(buf, "N/A (no PMA)\n");
So I dont want to convert that to:
if (!p->ibdev->type != INFINIBAND || !p->ibdev->process_mad)
return sprintf(buf, "N/A (no PMA)\n");
But I'm fine with:
if (!p->ibdev.ib->process_mad)
return sprintf(buf, "N/A (no PMA)\n");
This is faster, and safer.
--
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general