[openib-general] Usage of ib_mad_recv_wc.recv_buf?
Roland Dreier
Mon Oct 18 09:30:40 PDT 2004
Sean> I'm not sure that we gain any advantage to using a
Sean> doubly-linked list over a singly-linked one, so I would be
Sean> fine with converting it back to *recv_buf. If we do decide
Sean> to keep list_head, then list_head should be added into
Sean> ib_mad_recv_wc as you suggest.
It seems that consumers will walk the list from the start, while the
MAD layer will need to add buffers to the tail, it seems we need both
a head and tail pointer in ib_mad_recv_wc anyway. Since the recv_bufs
all have 256-byte packet buffers, the savings of having only a single
pointer there is pretty minimal. I would think that avoiding
open-coding all the list manipulation is worth the extra pointer anyway.
Since we need an ib_mad_recv_wc structure anyway, the objection I had
to using struct list_head for posting send requests (namely that it
forces the creation of another structure to hold the list head)
doesn't apply here.
- R.
More information about the openib-general mailing list