[ofa-general] Re: [PATCH 2/3] remove ib pkey gid and lmc cache

Michael S. Tsirkin mst at dev.mellanox.co.il
Thu May 3 05:22:15 PDT 2007


> Quoting Yosef Etigin <yosefe at voltaire.com>:
> Subject: Re: [PATCH 2/3] remove ib pkey gid and lmc cache
> 
> Michael S. Tsirkin wrote:
> >>+ * ib_query_lmc() returns the LID mask control associated
> >>+ * with port @port_num
> >>+ */
> >>+int ib_query_lmc(struct ib_device *device, u8 port_num, u8 *lmc);
> >>+
> > 
> > 
> > I don't think we need this one in ib_verbs.h - it just does query_port once.
> > Let's keep the API simple. The only user is in mad.c - move
> > it there and make it static.
> > 
> > 
> 
> why keep ib_query_lmc anyway if we won't use it?

Actually, I think I see a problem with changing
ib_get_cached_lmc -> ib_query_lmc: it is called on data path in mad.c.
Calling ib_query_port there will slow down MAD processing significantly,
because it's hard to driver to cache all of portinfo state
(e.g. how do you cache phys_state?).

But mad.c is actually seeing all MADs, too, so maybe the right thing
is to cache lmc directly there.

-- 
MST



More information about the general mailing list