For reference, these are the abstractions to support the half dozen device APIs 
known to libfabric:

struct ofi_hmem_ops {
        bool initialized;
        int (*init)(void);
        int (*cleanup)(void);
        int (*copy_to_hmem)(uint64_t device, void *dest, const void *src,
                            size_t size);
        int (*copy_from_hmem)(uint64_t device, void *dest, const void *src,
                              size_t size);
        bool (*is_addr_valid)(const void *addr, uint64_t *device, uint64_t 
*flags);
        int (*get_handle)(void *dev_buf, void **handle);
        int (*open_handle)(void **handle, uint64_t device, void **ipc_ptr);
        int (*close_handle)(void *ipc_ptr);
        int (*host_register)(void *ptr, size_t size);
        int (*host_unregister)(void *ptr);
        int (*get_base_addr)(const void *ptr, void **base, size_t *size);
        bool (*is_ipc_enabled)(void);
        int (*get_ipc_handle_size)(size_t *size);
};

Can someone tell me the difference between dest, src, addr, dev_buf, ipc_ptr, 
ptr, and base parameters?

Dest, src, and addr appear to be virtual addresses *within* some allocated 
memory region.  The region may be allocated on either the host or device.  I 
get the name difference here.

Discussions in https://github.com/ofiwg/libfabric/pull/8199 indicate the same 
may not be true for the other parameters, and it's unclear to me if the same 
type of parameter is going by different names based on which call is invoked.  
E.g. do base and dev_buf reference the same memory?

- Sean


_______________________________________________
ofiwg mailing list
[email protected]
https://lists.openfabrics.org/mailman/listinfo/ofiwg

Reply via email to