[ofw] RE: IBBUS - keep last HCA reference until IBAL is shutdown.

Sean Hefty sean.hefty at intel.com
Tue May 19 09:39:40 PDT 2009


>The problem with diffs is there is too little context for understanding unless
>one is familiar with the code.  In order to fully understand what's going on,
>reading the code would be advised.

I looked at the code, but it still wasn't obvious to me what the logic was.
This isn't a question of the patch, but of the entire code in this area.

>'hca_ifc_taken' TRUE indicates a reference was taken on the HCA.
>'ic' is function local shorthand for the current number of Bus Filter Instances
>(BFI) (aka enabled HCAs).
>The rational behind the code is during HCA disable, do not release the last HCA
>reference until after IBAL has shutdown.

This makes sense to me; I still don't understand what the code is doing to
accomplish that.  How does ic > 0 or ic > 1 indicate that IBAL has shutdown if
represents enabled HCAs?

>'ic' has not dropped to zero as the current BFI has not been freed; hence '>1'
>TRUE == not the last HCA being disabled.
>Make sense?

This is what I don't get.  If '>1' isn't the last HCA being disabled, then why
release the interface?

- Sean




More information about the ofw mailing list