>> But the receive side needs to calculate back the correct size of the >assembled MAD. >> If it is done in kernel or user it does not matter. To my best knowledge the >only way to calculate how many records are enclosed in an RMPP message is to >use the paylen and offset. >> How can it be done without looking at paylen ? >> >> All Sean is saying is that the receive RMPP ignores a non zero PayLen in a >first segment and uses the last bit (and obviously the PayLen in the last >segment) to determine the received length (of the reassembled MAD). >> >OK, thanks for the clarification. We could use a paylen = 0 at first >(but that is not last) segment
Looking through the code, it appears that the proper size of the MAD is being reported in the kernel and exported up to userspace. If I guessed the structure of the opensm code correctly, the length is returned by umad_recv() in umad_receiver() in osm_vendor_ibumad.c The length is discarded after umad_receiver() returns. I guess that one possible solution is for opensm to save the length value into the payload_length field in the RMPP header before returning from umad_receiver(). - Sean _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
