On Mon, 2005-05-23 at 10:29, Roland Dreier wrote: > Hal> It appears to me that there is nothing that enforces the man > Hal> page behavior above in Linux so this is a "convention". Is > Hal> this something we can take advantage of or do we need to > Hal> require the additional call to get the buffer length ? > > Something I was thinking a little while ago was that the character > device interface for userspace MADs might have been a mistake. Having > a new datagram socket family would solve this problem quite nicely -- > a consumer could pass MSG_PEEK and/or MSG_TRUNC to recv() to get the > true length of a datagram.
One could always add an ioctl to the character device to do this if it is unacceptable to change the convention for this character device. Changing over to a socket based interface appears to be a longer term approach. Does this have other advantages over the character device based approach ? Are sockets more hot swap friendly ? > However it's a little tricky to see a > really clean way for userspace to use this to handle arbitrary sized > RMPP receives. Not sure what you are referring to here. Wouldn't the returned size be used for the size on the subsequent read ? Isn't the issue still the same whether it is socket or character device based: how is a read with a too short length handled ? -- Hal _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
