[ofw] UVP library error creating address handles

Sean Hefty sean.hefty at intel.com
Mon Jun 16 17:54:05 PDT 2008


The uvp libraries assume that a user will call post_query_ca() before trying to
allocate an address handle.  There may be other restrictions, but allocating an
address handle is what highlighted the problem to me, and creating/modifying AVs
appears to be the only place where the cached CA attributes are used.
 
The uvp uses the cached attributes in order to perform a 'sanity check' on the
user provided port_number.  (It does the check twice, I guess, to be really
sane.)  This would be simple enough to remove; however, the attributes are also
used to lookup an index for a GID if the GRH is valid.  This lookup is
necessary.

There are a couple of issues.  First, it requires ULPs to query for the CA
attributes in order to carry data needed by the UVPs.  The ULP may not care
about the queried data, and the UVP is only interested in the port count and the
GID table.  Second, and more important, the cached GID table is never updated.

The best fix I can see for this is to always drop into the kernel when creating
an address handle.  Any sanity checks can be done there, along with using
updated GID to index mappings.

Since any fix has the potential to change the user to kernel interface, I think
we should correct this before 2.0 is released.  Thoughts?

- Sean




More information about the ofw mailing list