[openib-general] [PATCH] ib_cancel_mad API

Roland Dreier roland at topspin.com
Wed Sep 29 16:54:18 PDT 2004


    Sean> What is the client doing with the reference counting?  When
    Sean> their send handler gets called, they free their send
    Sean> context.  After they deregister, they free their mad_agent
    Sean> context.

OK, here's a realistic example.  In IPoIB, I'll probably only create
one mad_agent per HCA.  Now suppose I want to remove a network
interface, say because a P_Key is going away.  I need to cancel any
outstanding multicast queries that might be outstanding.  With the
current cancel API, If I don't reference count in the IPoIB driver,
the race I described could cause me to get a multicast response after
I've freed the network interface it corresponds to.

 - Roland



More information about the general mailing list