Suresh> What I am missing is, when a packet arrives at the PHY, Suresh> how is the recv_handler() being called? Just need the flow Suresh> at this level.
When a packet arrives the HCA executes a work request from the receive queue of the appropriate queue pair. A completion queue entry is added to the completion queue associated with this receive queue. If the completion queue has had an event requested, then a completion event will be generated and the driver needs to call the comp_handler for the completion queue. Chapter 10 of the IBA spec may be helpful for understanding the semantics here. In the case of MADs, comp_handler will be ib_mad_thread_completion_handler(), which defers processing through a work queue and after a baroque path eventually calls the consumer MAD agent's recv_handler. In mthca, comp_handler is called because an event queue entry is generated, which will usually cause an interrupt. The interrupt handler sees the event queue entry for the completion event and calls mthca_cq_event(). However, there is no requirement for your device to implement event queues or even to use interrupts. - R. _______________________________________________ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general