Inter-Process Communication

The NvSciIpc library provides API for any two (2) entities in a system to communicate with each other irrespective of where they are placed. Entities can be:

  • in different threads in the same process.
  • in the same process.
  • in different processes in the same VM.
  • in different VMs on the same SoC.
  • or in different SoCs.

Each of these different boundaries are abstracted by a library that provides unified communication (read/write) API to entities.

Terminology

Channel: An NvSciIpc channel connection allows bidirectional exchange of fixed-length messages between exactly two NvSciIpc endpoints.

Endpoint: A software entity that uses NvSciIpc channel to communicate with another software entity.

Frame: A message that consists of a sequence of bytes that is sent along an NvSciIpc channel from one of the two NvSciIpc endpoints of the NvSciIpc channel to the other NvSciIpc endpoint.

Frame Size: The size, in bytes, of every message exchanged along an NvSciIpc channel. Each NvSciIpc channel may have a distinct frame size.

Frame Count: The maximum number of NvSciIpc frames that may simultaneously be queued for transfer in each direction along an NvSciIpc channel.

Backend: An NvSciIpc backend implements NvSciIpc functionality for a particular class of NvSciIpc channels. For example, for NvSciIpc communication confined to SoCs, there are five different classes of NvSciIpc channels depending on the maximum level of separation between NvSciIpc endpoints that is supported by the NvSciIpc channel.

  • INTER_THREAD: Handles communication between entities that may be in different threads in the same process.
  • INTER_PROCESS: Handles communication between entities that may be in different processes in the same VM.
  • INTER_VM: Handles communication between entities that may be in different VMs in the same SoC.
  • INTER_CHIP: Handles communication between entities that may be in different SoCs.

Endpoint Handle: Abstract data type that is passed to all NvSciIpc channel communication.

Channel Reset: Defines the abrupt end of communication by one of the NvSciIpc endpoints. In case of reset, no communication is allowed over NvSciIpc channel until both endpoints reset their internal states and are ready for communication. NvSciIpc relies on its backend to implement the channel reset mechanism. It may require cooperation from both endpoints where two endpoints have to wait for confirmation that the other has reset its local state.

Notification: An asynchronous signal along an NvSciIpc channel through which one of the two endpoints of the NvSciIpc channel indicates to the other NvSciIpc endpoint that there may be an event for the latter NvSciIpc endpoint to process.