On 5/15/07, Roland Dreier <[EMAIL PROTECTED]> wrote:

> First I should add the case that triggered his patch: the userspace code
> calculated a smaller buffer size than the kernel code, which caused
> get_user_pages() to fail since part of the buffer did not belong to the
> process's address space.

OK, in this case it seems the bug is in the kernel -- since it is
overestimating the size of the WQEs needed.  So we might as well fix
it in the kernel.

> As Mihcael said in a subsequent post, we still need this code both in
> user and in kernel.

Yes, but I think this issue really convinces me that we should
decouple the two calculations, so the kernel code is only used for
kernel QPs.  And then change the mlx4 ABI so that userspace tells the
kernel the wqe buffer size and rq/sq wqe shift/offset.  That will
allow for different SQ BB sizes and also make things more robust
against bugs like this.

- R.


So it looks like we can start by:
1. Change the user code to pass the size to kernel
2. Fix calculations in kernel.

Would like me to send patches or do you prefer to add your code? If you
prefer to code this can you tell when that would be?
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to