NVIDIA DRIVE OS Linux SDK API Reference

6.0.4 Release

Detailed Description

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...
 

Function Documentation

◆ NvSciBufAttrListAndObjFreeDesc()

void NvSciBufAttrListAndObjFreeDesc ( void *  attrListAndObjDescBuf)

Frees the descriptor used for exporting both NvSciBufAttrList and NvSciBufObj together.

Parameters
[in]attrListAndObjDescBufDescriptor to be freed. The valid value is the one returned by successful call to NvSciBufIpcExportAttrListAndObj().
Returns
void
  • Panics if:
    • attrListAndObjDescBuf is invalid
Precondition
  • Valid (NvSciBufAttrList + NvSciBufObj) export descriptor is obtained.


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: Yes, with the following conditions:
      • Provided there is no active operation involving the attrListAndObjDescBuf to be freed
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • API group
    • Init: Yes
    • Runtime: No
    • De-Init: No

◆ NvSciBufAttrListFreeDesc()

void NvSciBufAttrListFreeDesc ( void *  descBuf)

Frees the NvSciBuf exported NvSciBufAttrList descriptor.

Parameters
[in]descBufNvSciBufAttrList descriptor to be freed. The valid value is non-NULL.
Returns
void
  • Panics if:
    • descBuf is invalid
Precondition
  • Valid NvSciBufAttrList export descriptor is obtained.


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: Yes, with the following conditions:
      • Provided there is no active operation involving the descBuf to be freed
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • API group
    • Init: Yes
    • Runtime: No
    • De-Init: No

◆ NvSciBufAttrListIpcExportReconciled()

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.

Parameters
[in]reconciledAttrListThe reconciled NvSciBufAttrList to be exported.
[in]ipcEndpointNvSciIpcEndpoint.
[out]descBufA pointer to the new reconciled NvSciBufAttrList descriptor, which the caller can deallocate later using NvSciBufAttrListFreeDesc().
[out]descLenThe size of the new reconciled NvSciBufAttrList descriptor.
Returns
NvSciError, the completion code of this operation:
  • NvSciError_Success if successful.
  • NvSciError_BadParameter if any of the following occurs:
    • reconciledAttrList is NULL
    • reconciledAttrList is unreconciled.
    • ipcEndpoint is invalid
    • descBuf is NULL
    • descLen is NULL
  • NvSciError_InsufficientMemory if memory allocation failed.
  • NvSciError_NotPermitted if reconciled NvSciBufAttrList is not being exported in the reverse direction of IPC path in which unreconciled NvSciBufAttrLists involved in reconciliation of input NvSciBufAttrList were exported.
  • Panic if reconciledAttrList is invalid.
Precondition
  • Valid NvSciIpcEndpoint is obtained.
  • Valid reconciled NvSciBufAttrList is obtained.


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: Yes
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • API group
    • Init: Yes
    • Runtime: No
    • De-Init: No

◆ NvSciBufAttrListIpcExportUnreconciled()

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.

Parameters
[in]unreconciledAttrListArrayThe unreconciled NvSciBufAttrList(s) to be exported. The valid value is non NULL.
[in]unreconciledAttrListCountNumber of unreconciled NvSciBufAttrList(s) in unreconciledAttrListArray. This value must be non-zero. For a single list, the count must be set 1.
[in]ipcEndpointThe NvSciIpcEndpoint.
[out]descBufA pointer to the new unreconciled NvSciBufAttrList descriptor, which the caller can deallocate later using NvSciBufAttrListFreeDesc().
[out]descLenThe size of the new unreconciled NvSciBufAttrList descriptor.
Returns
NvSciError, the completion code of this operation:
  • NvSciError_Success if successful.
  • NvSciError_BadParameter if any of the following occurs:
    • unreconciledAttrListArray is NULL
    • any of the NvSciBufAttrLists in the unreconciledAttrListArray is reconciled.
    • not all the NvSciBufAttrLists in the unreconciledAttrListArray are bound to the same NvSciBufModule.
    • unreconciledAttrListCount is 0
    • ipcEndpoint is invalid
    • descBuf is NULL
    • descLen is NULL
  • NvSciError_InsufficientResource if any of the following occurs:
    • the API is unable to implicitly append an additional attribute key when needed
  • NvSciError_InsufficientMemory if memory allocation failed.
  • Panic if any of the NvSciBufAttrList(s) in unreconciledAttrListArray is invalid.
Precondition
  • Valid NvSciIpcEndpoint is obtained.
  • Valid unreconciled NvSciBufAttrList(s) are obtained.


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: Yes
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • API group
    • Init: Yes
    • Runtime: No
    • De-Init: No

◆ NvSciBufAttrListIpcImportReconciled()

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.

Parameters
[in]moduleNvScibufModule with which to associate the imported NvSciBufAttrList.
[in]ipcEndpointNvSciIpcEndpoint.
[in]descBufThe 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]descLenThe size of the reconciled NvSciBufAttrList descriptor. This value must be non-zero.
[in]inputUnreconciledAttrListArrayThe 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]inputUnreconciledAttrListCountThe 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]importedReconciledAttrListImported reconciled NvSciBufAttrList.
Returns
NvSciError, the completion code of this operation:
  • NvSciError_Success if successful.
  • NvSciError_BadParameter if any of the following occurs:
    • module is NULL
    • ipcEndpoint is invalid
    • descBuf is NULL
    • descBuf represents an NvSciBufAttrList with invalid attribute key values set
    • descBuf represents an NvSciBufAttrList which is unreconciled.
    • descBuf is invalid
    • descLen is 0
    • importedReconciledAttrList is NULL
    • inputUnreconciledAttrListCount is 0 provided inputUnreconciledAttrListArray is non-NULL
  • NvSciError_NotSupported if any of the following occurs:
    • descBuf is incompatible
  • NvSciError_InsufficientMemory if memory allocation failed.
  • NvSciError_AttrListValidationFailed if input unreconciled NvSciBufAttrList(s)' attribute constraints are not satisfied by attributes associated with the imported importedReconciledAttrList.
  • NvSciError_InvalidState if imported NvSciBufAttrList cannot be associated with module.
  • NvSciError_ResourceError if system lacks resource other than memory.
  • Panic if:
    • any of the NvSciBufAttrList in inputUnreconciledAttrListArray is invalid
    • module is invalid
Precondition
  • Valid NvSciIpcEndpoint is obtained.
  • Valid NvSciBufModule is obtained.
  • Valid reconciled NvSciBufAttrList export descriptor is obtained.
  • Valid unreconciled NvSciBufAttrList(s) are obtained.


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: Yes
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • API group
    • Init: Yes
    • Runtime: No
    • De-Init: No

◆ NvSciBufAttrListIpcImportUnreconciled()

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.

Parameters
[in]moduleNvScibufModule with which to associate the imported NvSciBufAttrList.
[in]ipcEndpointNvSciIpcEndpoint.
[in]descBufThe 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]descLenThe size of the unreconciled NvSciBufAttrList descriptor. This value must be non-zero.
[out]importedUnreconciledAttrListThe imported unreconciled NvSciBufAttrList.
Returns
NvSciError, the completion code of this operation:
Precondition
  • Valid NvSciIpcEndpoint is obtained.
  • Valid NvSciBufModule is obtained.
  • Valid unreconciled NvSciBufAttrList export descriptor is obtained.


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: Yes
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • API group
    • Init: Yes
    • Runtime: No
    • De-Init: No

◆ NvSciBufIpcExportAttrListAndObj()

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.

Parameters
[in]bufObjNvSciBufObj to export.
[in]permissionsFlag 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]ipcEndpointNvSciIpcEndpoint to identify the peer process.
[out]attrListAndObjDescNvSciBuf allocates and fills in the exportable form of NvSciBufObj and its corresponding NvSciBufAttrList to be shared across an NvSciIpc channel.
[out]attrListAndObjDescSizeSize of the exported blob.
Returns
NvSciError, the completion code of this operation:
  • NvSciError_Success if successful.
  • NvSciError_BadParameter if any of the following occurs:
    • attrListAndObjDesc is NULL
    • attrListAndObjDescSize is NULL
    • bufObj is NULL
    • ipcEndpoint is invalid
    • permissions takes value other than NvSciBufAccessPerm_Readonly, NvSciBufAccessPerm_ReadWrite or NvSciBufAccessPerm_Auto.
  • NvSciError_InsufficientMemory if memory allocation failed
  • NvSciError_InvalidOperation if reconciled NvSciBufAttrList of bufObj has greater permissions for the ipcEndpoint peer than the permissions
  • NvSciError_Overflow if an arithmetic overflow occurs due to an invalid export descriptor
  • NvSciError_NotPermitted if NvSciBufObj and NvSciBufAttrList associated with it are not being exported in the reverse direction of IPC path in which unreconciled NvSciBufAttrLists involved in reconciliation of NvSciBufAttrList associated with the input NvScibufObj were exported.
  • NvSciError_ResourceError if the NVIDIA driver stack failed.
  • NvSciError_TryItAgain if current operation needs to be retried by the user. This error is returned only when communication boundary is chip to chip (C2c).
  • Panic if bufObj is invalid
Precondition
  • Valid NvSciIpcEndpoint is obtained.
  • Valid NvSciBufObj is obtained.


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: Yes
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • API group
    • Init: Yes
    • Runtime: No
    • De-Init: No

◆ NvSciBufIpcImportAttrListAndObj()

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.

Parameters
[in]moduleNvSciBufModule to be used for importing NvSciBufObj.
[in]ipcEndpointNvSciIpcEndpoint to identify the peer process.
[in]attrListAndObjDescThe exported form of NvSciBufAttrList and NvSciBufObj. The valid value must be non NULL.
[in]attrListAndObjDescSizeSize 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]countNumber of NvSciBufAttrList objects in the array. This value must be non-zero, provided attrList is non-NULL.
[in]minPermissionsMinimum 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]timeoutUsMaximum delay (in microseconds) before an NvSciBufObj times out. The value of the variable is ignored currently.
[out]bufObjNvSciBufObj duplicated and exported during the importing process. This NvSciBufObj is associated with the reconciled NvSciBufAttrList imported from the attrListAndObjDesc.
Returns
NvSciError, the completion code of this operation:
  • NvSciError_Success if successful.
  • NvSciError_BadParameter if any of the following occurs:
    • module is NULL
    • ipcEndpoint is invalid
    • attrListAndObjDesc is NULL
    • attrListAndObjDesc represents an NvSciBufAttrList with invalid attribute key values set
    • attrListAndObjDesc represents an NvSciBufAttrList which is unreconciled.
    • attrListAndObjDesc is invalid
    • attrListAndObjDescSize is 0
    • count is 0, provided attrList is non-NULL
    • minPermissions are invalid.
    • bufObj is NULL
  • NvSciError_NotSupported if any of the following occurs:
    • attrListAndObjDesc is incompatible
    • Internal attribute of the imported NvSciBufAttrList represents memory domain which is not supported.
  • NvSciError_AccessDenied if minPermissions are greater than permissions with which NvSciBufObj was exported
  • NvSciError_AttrListValidationFailed if input unreconciled NvSciBufAttrList(s)' contraints are not satisfied by attributes associated with the imported NvSciBufObj
  • NvSciError_InsufficientMemory if memory allocation failed
  • NvSciError_ResourceError if any of the following occurs:
    • NVIDIA driver stack failed
    • system lacks resource other than memory
  • NvSciError_TryItAgain if current operation needs to be retried by the user. This error is returned only when communication boundary is chip to chip (C2c).
  • NvSciError_InvalidState if any of the following occurs:
    • Imported NvSciBufAttrList cannot be associated with module.
    • Imported NvSciBufObj cannot be associated with module.
  • Panic if:
    • any of the unreconciled NvSciBufAttrList(s) are not valid
    • module is invalid
Precondition
  • Valid NvSciIpcEndpoint is obtained.
  • Valid NvSciBufModule is obtained.
  • Valid (reconciled NvSciBufAttrList + NvSciBufObj) export descriptor is obtained.
  • Valid unreconciled NvSciBufAttrList(s) are obtained.


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: Yes
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • API group
    • Init: Yes
    • Runtime: No
    • De-Init: No

◆ NvSciBufObjIpcExport()

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.

Parameters
[in]bufObjNvSciBufObj to export.
[in]accPermFlag 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]ipcEndpointNvSciIpcEndpoint.
[out]exportDataNvSciBuf populates the return value with exportable form of NvSciBufObj shared across an NvSciIpc channel.
Returns
NvSciError, the completion code of this operation:
  • NvSciError_Success if successful.
  • NvSciError_BadParameter if any of the following occurs:
    • bufObj is NULL
    • accPerm takes value other than NvSciBufAccessPerm_Readonly, NvSciBufAccessPerm_ReadWrite or NvSciBufAccessPerm_Auto.
    • ipcEndpoint is invalid
    • exportData is NULL
  • NvSciError_InsufficientMemory if memory allocation failed.
  • NvSciError_InvalidOperation if reconciled NvSciBufAttrList of bufObj has greater permissions for the ipcEndpoint peer than the accPerm
  • NvSciError_NotPermitted if NvSciBufObj is not being exported in the reverse direction of IPC path in which unreconciled NvSciBufAttrLists involved in reconciliation of NvSciBufAttrList associated with the input NvScibufObj were exported.
  • NvSciError_ResourceError if the NVIDIA driver stack failed.
  • NvSciError_TryItAgain if current operation needs to be retried by the user. This error is returned only when communication boundary is chip to chip (C2c).
  • Panic if bufObj is invalid
Precondition
  • Valid NvSciIpcEndpoint is obtained.
  • Valid NvSciBufObj is obtained.


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: Yes
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • API group
    • Init: Yes
    • Runtime: No
    • De-Init: No

◆ NvSciBufObjIpcImport()

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.

Note
It is not guaranteed that the input reconciled NvSciBufAttrList in this API is the same NvSciBufAttrList that is ultimately associated with the allocated NvSciBufObj. If the user needs to query attributes from an NvSciBufAttrList associated with an NvSciBufObj after allocation, they must first obtain the reconciled NvSciBufAttrList from the NvSciBufObj using NvSciBufObjGetAttrList().
Parameters
[in]ipcEndpointNvSciIpcEndpoint.
[in]descA pointer to an NvSciBufObjIpcExportDescriptor. The valid value is non-NULL that points to descriptor received on NvSciIpc channel.
[in]reconciledAttrListReconciled NvSciBufAttrList returned by NvSciBufAttrListIpcImportReconciled().
[in]minPermissionsMinimum 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]timeoutUsMaximum delay (in microseconds) before an NvSciBufObj times out. The value of the variable is ignored currently.
[out]bufObjImported NvSciBufObj created from the descriptor.
Returns
NvSciError, the completion code of this operation:
  • NvSciError_Success if successful.
  • NvSciError_AccessDenied if minPermissions are greater than permissions with which object was exported
  • NvSciError_BadParameter if any of the following occurs:
    • ipcEndpoint is invalid
    • desc is NULL or invalid
    • reconciledAttrList is NULL
    • reconciledAttrList is unreconciled.
    • minPermissions are invalid.
    • bufObj is NULL
  • NvSciError_InsufficientMemory if there is insufficient system memory.
  • NvSciError_Overflow if an arithmetic overflow occurs due to an invalid export descriptor
  • NvSciError_ResourceError if any of the following occurs:
    • NVIDIA driver stack failed
    • system lacks resource other than memory
  • NvSciError_TryItAgain if current operation needs to be retried by the user. This error is returned only when communication boundary is chip to chip (C2c).
  • NvSciError_InvalidState if imported NvSciBufObj cannot be associated with NvSciBufModule with which reconciledAttrList is associated.
  • NvSciError_NotSupported if the internal attribute of reconciledAttrList represents memory domain which is not supported.
  • Panic if reconciledAttrList is invalid
Precondition


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: Yes
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • API group
    • Init: Yes
    • Runtime: No
    • De-Init: No