com.ibm.net.rdma.jverbs.verbs

Class MemoryRegion

  • java.lang.Object
    • com.ibm.net.rdma.jverbs.verbs.MemoryRegion


  • public class MemoryRegion
    extends java.lang.Object
    Represents a memory region that is registered with the RDMA device. Memory registration must be done to pin memory with the RDMA device, which is necessary for any data operations. Memory registration is done through ProtectionDomain.registerMemory(). De-registering must be done when the memory buffer is no longer needed, by using ProtectionDomain.deregisterMemory(). Referred from RDMA programming manual by mellanox.
    • Field Detail

      • IBV_ACCESS_LOCAL_WRITE

        public static final int IBV_ACCESS_LOCAL_WRITE
        Enable local write access constant
        See Also:
        Constant Field Values
      • IBV_ACCESS_MW_BIND

        public static final int IBV_ACCESS_MW_BIND
        Enable memory window binding constant
        See Also:
        Constant Field Values
      • IBV_ACCESS_REMOTE_ATOMIC

        public static final int IBV_ACCESS_REMOTE_ATOMIC
        Enable remote atomic operation access constant
        See Also:
        Constant Field Values
      • IBV_ACCESS_REMOTE_READ

        public static final int IBV_ACCESS_REMOTE_READ
        Enable remote read access constant
        See Also:
        Constant Field Values
      • IBV_ACCESS_REMOTE_WRITE

        public static final int IBV_ACCESS_REMOTE_WRITE
        Enable remote write access constant
        See Also:
        Constant Field Values
    • Method Detail

      • getAccess

        public int getAccess()
        Get the access used to create the memory region.
      • getAddress

        public long getAddress()
        Gets the address of the memory associated with this MR.
        Returns:
        the address of the memory registered.
      • getContext

        public VerbsContext getContext()
        The RDMA device context this MR is registered with.
        Returns:
        the context
      • getHandle

        public int getHandle()
        A unique handle for this MR.
        Returns:
        the handle
      • getLength

        public int getLength()
        Gets the length of the memory associated with this MR.
        Returns:
        the length
      • getLocalKey

        public int getLocalKey()
        Gets the local key of the memory associated with this MR. Local keys can be passed around to enable accessing this memory from remote nodes.
        Returns:
        the local key.
      • getRemoteKey

        public int getRemoteKey()
        Gets the remote key of the memory associated with this MR.
        Returns:
        the remote key.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object