[openib-general] Re: Re: [PATCH] RFC Verbs: add support for transport specific verbs

Michael S. Tsirkin mst at mellanox.co.il
Tue Feb 28 14:21:56 PST 2006


Quoting r. Sean Hefty <mshefty at ichips.intel.com>:
> 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



More information about the general mailing list