[openib-general] Usage of ib_mad_recv_wc.recv_buf?
Roland Dreier
roland at topspin.com
Mon Oct 18 09:11:34 PDT 2004
Hal> I believe that the intention is that the receive completion
Hal> is not indicated to the consumer until the complete RMPP
Hal> transaction has been received. The multiple receive
Hal> completions (one per segment) are "coaelsced" into one and
Hal> provided to the client when the final RMPP segment is
Hal> received.
Right, and then the consumer can call
void ib_coalesce_recv_mad(struct ib_mad_recv_wc *mad_recv_wc,
void *buf);
to get the MAD packets' payloads copied into a single buffer.
What I was trying to point out was that we have:
struct ib_mad_recv_buf {
struct list_head list;
struct ib_grh *grh;
struct ib_mad *mad;
};
with "list" described as "Reference to next data buffer for a received
RMPP MAD," but:
struct ib_mad_recv_wc {
struct ib_wc *wc;
struct ib_mad_recv_buf *recv_buf;
int mad_len;
};
with only a pointer to a single ib_mad_recv_buf (although the comment
describes recv_buf as "Specifies the location of the received data
buffer(s)").
It seems to me that if ib_mad_recv_wc is supposed to return a list of
MAD packets, then instead of the recv_buf member, it should have a
struct list_head member to serve as the head of the list of packets.
- R.
More information about the general
mailing list