> The verb also checks the user-space provided response buffer size and only > fills in capabilities that will fit in the buffer. In attempt to follow the > spirit of presentation [2] by Tzahi Oved that was presented during OpenFabrics > Alliance International Developer Workshop 2013, the comp_mask bits will only > describe which fields are valid.
> + if (ucore->outlen < resp.response_length) > + return -ENOSPC; So is this really what we want? A future kernel that adds new fields will cause previously working userspace to get an error? Or do we expect userspace to retry with a bigger buffer on ENOSPC, without actually returning the required size back to userspace? Is there anything wrong with truncating the response to only include the fields that userspace asked for? Is it just that this is the initial implementation of the query_device_ex verb, so the current size is also the minimum size? If so I think we need at least a comment here, so that we remember to fix the ENOSPC code when adding more fields in the kernel. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
