[openib-general] Re: [PATCH] request/response matching in MAD code

Hal Rosenstock halr at voltaire.com
Fri Oct 1 09:33:44 PDT 2004


On Thu, 2004-09-30 at 15:16, Sean Hefty wrote: 
> The following patch should match response MADs with the corresponding request.  A response without a matching request is discarded, and responses are reported before requests.
> 
> Timeouts of request MADs are not yet handled.

Thanks! Applied with a few changes:

1. In ib_post_send_mad, where the TID is obtained from the sg list, the
addr is a physical one and needed converted to a virtual one.

mad_send_wr->tid = ((struct ib_mad_hdr*)
                    bus_to_virt(cur_send_wr->sg_list->addr))->tid;
                            
2. Added the following to reassemble_recv (it was eliminated from
ib_mad_recv_done_handler):

INIT_LIST_HEAD(&recv->header.recv_buf.list);

I also eliminated an unneeded stack variable in ib_post_send_mad.

Also, should the TID be overwritten in the high 32 bits or do we trust
the client to set this properly ?

Note that I only validated an incoming request and have not tested the
request/response matching as yet.

-- Hal




More information about the general mailing list