List of APIs to transport NvSciBuf buffers and attribute list objects across various communication boundaries that interact using NvSciIpc.
Functions | |
NvSciError | NvSciBufIpcExportAttrListAndObj (NvSciBufObj bufObj, NvSciBufAttrValAccessPerm permissions, NvSciIpcEndpoint ipcEndpoint, void **attrListAndObjDesc, size_t *attrListAndObjDescSize) |
Exports NvSciBufAttrList and NvSciBufObj into an NvSciIpc-transferable object export descriptor. More... | |
NvSciError | NvSciBufIpcImportAttrListAndObj (NvSciBufModule module, NvSciIpcEndpoint ipcEndpoint, const void *attrListAndObjDesc, size_t attrListAndObjDescSize, const NvSciBufAttrList attrList[], size_t count, NvSciBufAttrValAccessPerm minPermissions, int64_t timeoutUs, NvSciBufObj *bufObj) |
This API is invoked by the importing process after it receives the object export descriptor sent by the other process who has created descriptor. More... | |
void | NvSciBufAttrListAndObjFreeDesc (void *attrListAndObjDescBuf) |
Frees the descriptor used for exporting both NvSciBufAttrList and NvSciBufObj together. More... | |
NvSciError | NvSciBufObjIpcExport (NvSciBufObj bufObj, NvSciBufAttrValAccessPerm accPerm, NvSciIpcEndpoint ipcEndpoint, NvSciBufObjIpcExportDescriptor *exportData) |
Exports the NvSciBufObj into an NvSciIpc-transferable object export descriptor. More... | |
NvSciError | NvSciBufObjIpcImport (NvSciIpcEndpoint ipcEndpoint, const NvSciBufObjIpcExportDescriptor *desc, NvSciBufAttrList reconciledAttrList, NvSciBufAttrValAccessPerm minPermissions, int64_t timeoutUs, NvSciBufObj *bufObj) |
Creates the NvSciBufObj based on supplied object export descriptor and returns the NvSciBufObj bound to the reconciled NvSciBufAttrList. More... | |
NvSciError | NvSciBufAttrListIpcExportUnreconciled (const NvSciBufAttrList unreconciledAttrListArray[], size_t unreconciledAttrListCount, NvSciIpcEndpoint ipcEndpoint, void **descBuf, size_t *descLen) |
Transforms the input unreconciled NvSciBufAttrList(s) to an exportable unreconciled NvSciBufAttrList descriptor that can be transported by the application to any remote process as a serialized set of bytes over an NvSciIpc channel. More... | |
NvSciError | NvSciBufAttrListIpcExportReconciled (NvSciBufAttrList reconciledAttrList, NvSciIpcEndpoint ipcEndpoint, void **descBuf, size_t *descLen) |
Transforms the reconciled NvSciBufAttrList to an exportable reconciled NvSciBufAttrList descriptor that can be transported by the application to any remote process as a serialized set of bytes over an NvSciIpc channel. More... | |
NvSciError | NvSciBufAttrListIpcImportUnreconciled (NvSciBufModule module, NvSciIpcEndpoint ipcEndpoint, const void *descBuf, size_t descLen, NvSciBufAttrList *importedUnreconciledAttrList) |
Translates an exported unreconciled NvSciBufAttrList descriptor (potentially received from any process) into an unreconciled NvSciBufAttrList. More... | |
NvSciError | NvSciBufAttrListIpcImportReconciled (NvSciBufModule module, NvSciIpcEndpoint ipcEndpoint, const void *descBuf, size_t descLen, const NvSciBufAttrList inputUnreconciledAttrListArray[], size_t inputUnreconciledAttrListCount, NvSciBufAttrList *importedReconciledAttrList) |
Translates an exported reconciled NvSciBufAttrList descriptor (potentially received from any process) into a reconciled NvSciBufAttrList. More... | |
void | NvSciBufAttrListFreeDesc (void *descBuf) |
Frees the NvSciBuf exported NvSciBufAttrList descriptor. More... | |
void NvSciBufAttrListAndObjFreeDesc | ( | void * | attrListAndObjDescBuf | ) |
Frees the descriptor used for exporting both NvSciBufAttrList and NvSciBufObj together.
[in] | attrListAndObjDescBuf | Descriptor to be freed. The valid value is the one returned by successful call to NvSciBufIpcAttrlistAndObjExport. |
void NvSciBufAttrListFreeDesc | ( | void * | descBuf | ) |
Frees the NvSciBuf exported NvSciBufAttrList descriptor.
[in] | descBuf | NvSciBufAttrList descriptor to be freed. The valid value is non-NULL. |
NvSciError NvSciBufAttrListIpcExportReconciled | ( | NvSciBufAttrList | reconciledAttrList, |
NvSciIpcEndpoint | ipcEndpoint, | ||
void ** | descBuf, | ||
size_t * | descLen | ||
) |
Transforms the reconciled NvSciBufAttrList to an exportable reconciled NvSciBufAttrList descriptor that can be transported by the application to any remote process as a serialized set of bytes over an NvSciIpc channel.
[in] | reconciledAttrList | The reconciled NvSciBufAttrList to be exported. |
[in] | ipcEndpoint | NvSciIpcEndpoint. |
[out] | descBuf | A pointer to the new reconciled NvSciBufAttrList descriptor, which the caller can deallocate later using NvSciBufAttrListFreeDesc(). |
[out] | descLen | The size of the new reconciled NvSciBufAttrList descriptor. |
NvSciError NvSciBufAttrListIpcExportUnreconciled | ( | const NvSciBufAttrList | unreconciledAttrListArray[], |
size_t | unreconciledAttrListCount, | ||
NvSciIpcEndpoint | ipcEndpoint, | ||
void ** | descBuf, | ||
size_t * | descLen | ||
) |
Transforms the input unreconciled NvSciBufAttrList(s) to an exportable unreconciled NvSciBufAttrList descriptor that can be transported by the application to any remote process as a serialized set of bytes over an NvSciIpc channel.
[in] | unreconciledAttrListArray | The unreconciled NvSciBufAttrList(s) to be exported. The valid value is non NULL. |
[in] | unreconciledAttrListCount | Number of unreconciled NvSciBufAttrList(s) in unreconciledAttrListArray. This value must be non-zero. For a single list, the count must be set 1. |
[in] | ipcEndpoint | The NvSciIpcEndpoint. |
[out] | descBuf | A pointer to the new unreconciled NvSciBufAttrList descriptor, which the caller can deallocate later using NvSciBufAttrListFreeDesc(). |
[out] | descLen | The size of the new unreconciled NvSciBufAttrList descriptor. |
NvSciError NvSciBufAttrListIpcImportReconciled | ( | NvSciBufModule | module, |
NvSciIpcEndpoint | ipcEndpoint, | ||
const void * | descBuf, | ||
size_t | descLen, | ||
const NvSciBufAttrList | inputUnreconciledAttrListArray[], | ||
size_t | inputUnreconciledAttrListCount, | ||
NvSciBufAttrList * | importedReconciledAttrList | ||
) |
Translates an exported reconciled NvSciBufAttrList descriptor (potentially received from any process) into a reconciled NvSciBufAttrList.
It also validates that the reconciled NvSciBufAttrList to be imported will be a reconciled NvSciBufAttrList that is consistent with the constraints in an array of input unreconciled NvSciBufAttrList(s). This is recommended while importing what is expected to be a reconciled NvSciBufAttrList to cause NvSciBuf to validate the reconciled NvSciBufAttrList against the input un-reconciled NvSciBufAttrList(s), so that the importing process can be sure that an NvSciBufObj will satisfy the input constraints.
[in] | module | NvScibufModule with which to associate the imported NvSciBufAttrList. |
[in] | ipcEndpoint | NvSciIpcEndpoint. |
[in] | descBuf | The reconciled NvSciBufAttrList descriptor to be translated into a reconciled NvSciBufAttrList. The valid value is non-NULL that points to descriptor received on NvSciIpc channel. |
[in] | descLen | The size of the reconciled NvSciBufAttrList descriptor. This value must be non-zero. |
[in] | inputUnreconciledAttrListArray | The array of unreconciled NvSciBufAttrList against which the new reconciled NvSciBufAttrList is to be validated. NULL pointer is acceptable as a parameter if the validation needs to be skipped. |
[in] | inputUnreconciledAttrListCount | The number of unreconciled NvSciBufAttrList(s) in inputUnreconciledAttrListArray. If inputUnreconciledAttrListCount is non-zero, then this operation will fail with an error unless all the constraints of all the unreconciled NvSciBufAttrList(s) in inputUnreconciledAttrListArray are met by the imported reconciled NvSciBufAttrList. |
[out] | importedReconciledAttrList | Imported reconciled NvSciBufAttrList. |
NvSciError NvSciBufAttrListIpcImportUnreconciled | ( | NvSciBufModule | module, |
NvSciIpcEndpoint | ipcEndpoint, | ||
const void * | descBuf, | ||
size_t | descLen, | ||
NvSciBufAttrList * | importedUnreconciledAttrList | ||
) |
Translates an exported unreconciled NvSciBufAttrList descriptor (potentially received from any process) into an unreconciled NvSciBufAttrList.
[in] | module | NvScibufModule with which to associate the imported NvSciBufAttrList. |
[in] | ipcEndpoint | NvSciIpcEndpoint. |
[in] | descBuf | The unreconciled NvSciBufAttrList descriptor to be translated into an unreconciled NvSciBufAttrList. The valid value is non-NULL that points to descriptor received on NvSciIpc channel. |
[in] | descLen | The size of the unreconciled NvSciBufAttrList descriptor. This value must be non-zero. |
[out] | importedUnreconciledAttrList | The imported unreconciled NvSciBufAttrList. |
NvSciError NvSciBufIpcExportAttrListAndObj | ( | NvSciBufObj | bufObj, |
NvSciBufAttrValAccessPerm | permissions, | ||
NvSciIpcEndpoint | ipcEndpoint, | ||
void ** | attrListAndObjDesc, | ||
size_t * | attrListAndObjDescSize | ||
) |
Exports NvSciBufAttrList and NvSciBufObj into an NvSciIpc-transferable object export descriptor.
The blob can be transferred to the other processes to create a matching NvSciBufObj.
[in] | bufObj | NvSciBufObj to export. |
[in] | permissions | Flag indicating the expected access permission (see NvSciBufAttrValAccessPerm). The valid value range is such that the value of NvSciBufGeneralAttrKey_ActualPerm set in the reconciled NvSciBufAttrList exported to the peer to which NvSciBufObj is being exported is less than or equal to accPerm and accPerm is less than or equal to underlying NvSciBufObj permission. Additionally, NvSciBufAccessPerm_Auto value is unconditionally valid. |
[in] | ipcEndpoint | NvSciIpcEndpoint to identify the peer process. |
[out] | attrListAndObjDesc | NvSciBuf allocates and fills in the exportable form of NvSciBufObj and its corresponding NvSciBufAttrList to be shared across an NvSciIpc channel. |
[out] | attrListAndObjDescSize | Size of the exported blob. |
NvSciError NvSciBufIpcImportAttrListAndObj | ( | NvSciBufModule | module, |
NvSciIpcEndpoint | ipcEndpoint, | ||
const void * | attrListAndObjDesc, | ||
size_t | attrListAndObjDescSize, | ||
const NvSciBufAttrList | attrList[], | ||
size_t | count, | ||
NvSciBufAttrValAccessPerm | minPermissions, | ||
int64_t | timeoutUs, | ||
NvSciBufObj * | bufObj | ||
) |
This API is invoked by the importing process after it receives the object export descriptor sent by the other process who has created descriptor.
The importing process will create its own NvSciBufObj and return as output.
[in] | module | NvSciBufModule to be used for importing NvSciBufObj. |
[in] | ipcEndpoint | NvSciIpcEndpoint to identify the peer process. |
[in] | attrListAndObjDesc | The exported form of NvSciBufAttrList and NvSciBufObj. The valid value must be non NULL. |
[in] | attrListAndObjDescSize | Size of the imported blob. This value must be non-zero. |
[in] | attrList[] | Receiver side array of NvSciBufAttrList(s) against which the imported NvSciBufAttrList has to be validated. NULL is valid value here if the validation of the received NvSciBufAttrList needs to be skipped. |
[in] | count | Number of NvSciBufAttrList objects in the array. This value must be non-zero. |
[in] | minPermissions | Minimum permissions of the buffer that the process is expecting to import the buffer (see NvSciBufAttrValAccessPerm). The valid data range is from NvSciBufAccessPerm_Readonly to less than NvSciBufAccessPerm_Invalid and should be less than NvSciBufAttrValAccessPerm, with which it was exported. |
[in] | timeoutUs | Maximum delay (in microseconds) before an NvSciBuf object times out. The value of the variable is ignored currently. |
[out] | bufObj | NvSciBuf Object duplicated and exported during the importing process. This object is associated with the reconciled NvSciBufAttrList imported from the attrListAndObjDesc. |
NvSciError NvSciBufObjIpcExport | ( | NvSciBufObj | bufObj, |
NvSciBufAttrValAccessPerm | accPerm, | ||
NvSciIpcEndpoint | ipcEndpoint, | ||
NvSciBufObjIpcExportDescriptor * | exportData | ||
) |
Exports the NvSciBufObj into an NvSciIpc-transferable object export descriptor.
Descriptor can be transferred to other end of IPC where matching NvSciBufObj can be created from the descriptor.
[in] | bufObj | NvSciBufObj to export. |
[in] | accPerm | Flag indicating the expected access permission (see NvSciBufAttrValAccessPerm). The valid value range is such that the value of NvSciBufGeneralAttrKey_ActualPerm set in the reconciled NvSciBufAttrList exported to the peer to which NvSciBufObj is being exported is less than or equal to accPerm and accPerm is less than or equal to underlying NvSciBufObj permission. Additionally, NvSciBufAccessPerm_Auto value is unconditionally valid. |
[in] | ipcEndpoint | NvSciIpcEndpoint. |
[out] | exportData | NvSciBuf populates the return value with exportable form of NvSciBufObj shared across an NvSciIpc channel. |
NvSciError NvSciBufObjIpcImport | ( | NvSciIpcEndpoint | ipcEndpoint, |
const NvSciBufObjIpcExportDescriptor * | desc, | ||
NvSciBufAttrList | reconciledAttrList, | ||
NvSciBufAttrValAccessPerm | minPermissions, | ||
int64_t | timeoutUs, | ||
NvSciBufObj * | bufObj | ||
) |
Creates the NvSciBufObj based on supplied object export descriptor and returns the NvSciBufObj bound to the reconciled NvSciBufAttrList.
[in] | ipcEndpoint | NvSciIpcEndpoint. |
[in] | desc | A pointer to an NvSciBufObjIpcExportDescriptor. The valid value is non-NULL that points to descriptor received on NvSciIpc channel. |
[in] | reconciledAttrList | Reconciled NvSciBufAttrList returned by NvSciBufAttrListIpcImportReconciled(). |
[in] | minPermissions | Flag indicating the expected access permission. The valid value range is such that minPermissions <= permission with which NvSciBufObj was exported. |
[in] | timeoutUs | Maximum delay (in microseconds) before an NvSciBufObj times out. The value of the variable is ignored currently. |
[out] | bufObj | Imported NvSciBufObj created from the descriptor. |