Main Page | Modules | Directories | File List | Globals | Related Pages

gm_register.c File Reference

#include "gm_call_trace.h"
#include "gm_compiler.h"
#include "gm_debug.h"
#include "gm_internal.h"
#include "gm_debug_mem_register.h"

Functions

GM_ENTRY_POINT gm_status_t gm_register_memory (gm_port_t *p, void *ptr, gm_size_t length)

Detailed Description

This file contains the GM API function gm_register_memory().

Function Documentation

GM_ENTRY_POINT gm_status_t gm_register_memory gm_port_t *  p,
void *  ptr,
gm_size_t  length
 

gm_register_memory() registers length bytes of user virtual memory starting at ptr for DMA transfers. The memory is locked down (made nonpageable) and DMAs on the region of memory are enabled. Memory may be registered multiple times. Memory may be deregistered using matching calls to gm_deregister_memory(). Note that memory registration is an expensive operation relative to sending and receiving packets, so you should use persistent memory registrations wherever possible. Also note that memory registration is not supported on Solaris 2.7 and earlier due to operating system limitations.

Return values:
GM_SUCCESS Operation completed successfully.
GM_FAILURE 
GM_PERMISSION_DENIED 
GM_INVALID_PARAMETER 
Parameters:
p (IN) Handle to the GM port.
ptr (OUT) The address of the memory location to be registered.
length (IN) The length in bytes of the memory location to be registered.
See also:
gm_deregister_memory
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)


Generated on Sat May 20 19:20:42 2006 for GM by  doxygen 1.4.4