[openib-general] question about register MR from user level

James Lentini jlentini at netapp.com
Thu Sep 15 07:46:00 PDT 2005



On Thu, 15 Sep 2005, Dotan Barak wrote:

> Hi.
> 
> i try to register 2 types of memory buffers with local write permission
> enabled:
> 	if the memory was declared as: const char ptr{5}; ,
> 		then the registration can be done
> 
> 	if the memory was declared as: const char *ptr = "somthing ";
> 		then the registration fails.
> 
> what is the difference between the 2 memory buffers?

I'm not sure what your problem is, but I'll make this observation:

Since buffer #1 is not initialized and buffer #2 is initialized, they 
will be located in different parts of the process address space. 
Buffer #1 will go into the bss and #2 will go into the data area. It 
may be that buffer #2 is placed on a read only page. 

What is the error you receive? 

Why are you requesting local write permission on buffers you have 
declared const, ie. read only?

> should the MR registration verbs handle both of the buffers as read only
> memory buffers?

If you request local write permission, I believe the MR registration 
will attempt to set that up. If it finds that the memory is not 
writable, I would expect an error.



More information about the general mailing list