[EMAIL PROTECTED] wrote on Fri, 08 Dec 2006 08:50 -0500:
> In the BMI IB method, when BMI_ib_method_addr_lookup() is called with  
> a new IB host string (ib://hostname:port/filesystem), it calls  
> ib_alloc_method_addr() to malloc a new ib_method_addr_t using  
> alloc_method_addr() but it does not call bmi_method_addr_reg_callback().
> 
> It appears that the server calls bmi_method_addr_reg_callback() but  
> not the client. Why is this?
> 
> Why not call bmi_method_addr_reg_callback() as soon as the allocs the  
> new ib_method_addr_t?

I never completely grasped this myself, and the IB code ended up
like that by trying all the combinations until the core dumps went
away.

I think it is this, but Phil may correct me:  when you do an active
lookup, via BMI_addr_lookup, it is that function itself that builds
the new reference for the address (alloc_ref_st()).  The device, as
invoked by the addr_lookup method function, does not need to call
back into BMI to tell it to allocate the address it is currently
working on for the client.

On the other hand, when the server happens to find out about a new
address due to passive activity, in our case listening on a TCP
socket for new connections, the BMI layer doesn't know about the
address.  The device must use the callback function to tell BMI to
allocate the reference structure.

If you come up with a nice way to understand and comment that, let
me know and I'll stick it here and there in the code.  Better yet,
send a patch for bmi.c that will let us all know.

                -- Pete
_______________________________________________
Pvfs2-developers mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers

Reply via email to