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 | NvSciBufObjAttachPeer (NvSciBufObj bufObj, const NvSciBufAttrList inputArray[], size_t inputCount) |
Allows remote peer NvSciIpcEndpoint to gain access to already allocated NvSciBufObj. 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 NvSciBufIpcExportAttrListAndObj(). |
Usage considerations
void NvSciBufAttrListFreeDesc | ( | void * | descBuf | ) |
Frees the NvSciBuf exported NvSciBufAttrList descriptor.
[in] | descBuf | NvSciBufAttrList descriptor to be freed. The valid value is non-NULL. |
Usage considerations
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. |
Usage considerations
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. |
Usage considerations
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. |
Usage considerations
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. |
Usage considerations
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 is either of NvSciBufAccessPerm_Readonly or NvSciBufAccessPerm_ReadWrite 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 permissions and permissions 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. |
Usage considerations
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, provided attrList is non-NULL. |
[in] | minPermissions | Minimum permissions of the NvSciBufObj that the process is expecting to import it with (see NvSciBufAttrValAccessPerm). The valid value is either of NvSciBufAccessPerm_Readonly or NvSciBufAccessPerm_ReadWrite such that the value is less than or equal to NvSciBufAttrValAccessPerm with which NvSciBufObj was exported. Additionally, NvSciBufAccessPerm_Auto value is unconditionally valid. |
[in] | timeoutUs | Maximum delay (in microseconds) before an NvSciBufObj times out. The value of the variable is ignored currently. |
[out] | bufObj | NvSciBufObj duplicated and exported during the importing process. This NvSciBufObj is associated with the reconciled NvSciBufAttrList imported from the attrListAndObjDesc. |
Usage considerations
NvSciError NvSciBufObjAttachPeer | ( | NvSciBufObj | bufObj, |
const NvSciBufAttrList | inputArray[], | ||
size_t | inputCount | ||
) |
Allows remote peer NvSciIpcEndpoint to gain access to already allocated NvSciBufObj.
Provided that the allocated NvSciBufObj is according to buffer requirements provided by the input unreconciled attribute list of remote peer interested in gaining access to input NvSciBufObj. On success, the NvSciBufObj is exportable to remote peer NvSciIpcEndpoints whose unreconciled NvSciBufAttrList was provided as input to this function.
[in] | bufObj | The NvSciBufObj whose access needs to be granted |
[in] | inputArray | list of unreconciled NvSciBufAttrList imported from remote peers who wants access to the input NvSciBufObj |
[in] | inputCount | Count of unreconciled NvSciBufAttrList provided in input inputArray |
Usage considerations
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 is either of NvSciBufAccessPerm_Readonly or NvSciBufAccessPerm_ReadWrite 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. |
Usage considerations
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 | Minimum permissions of the NvSciBufObj that the process is expecting to import it with (see NvSciBufAttrValAccessPerm). The valid value is either of NvSciBufAccessPerm_Readonly or NvSciBufAccessPerm_ReadWrite such that the value is less than or equal to NvSciBufAttrValAccessPerm with which NvSciBufObj was exported. Additionally, NvSciBufAccessPerm_Auto value is unconditionally valid. |
[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. |
Usage considerations