<!--
{
  "availability" : [
    "DriverKit: -"
  ],
  "documentType" : "symbol",
  "framework" : "SCSIControllerDriverKit",
  "identifier" : "/documentation/SCSIControllerDriverKit/IOUserSCSIParallelInterfaceController/UserMapBundledParallelTaskCommandAndResponseBuffers",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SCSIControllerDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUserSCSIParallelInterfaceController@F@UserMapBundledParallelTaskCommandAndResponseBuffers#*$@S@IOBufferMemoryDescriptor#S0_#"
  },
  "title" : "UserMapBundledParallelTaskCommandAndResponseBuffers"
}
-->

# UserMapBundledParallelTaskCommandAndResponseBuffers

Maps the shared command and response buffers in the dext address space in response to a call from the framework.

```
virtual kern_return_t UserMapBundledParallelTaskCommandAndResponseBuffers(IOBufferMemoryDescriptor *parallelCommandIOMemoryDescriptor, IOBufferMemoryDescriptor *parallelResponseIOMemoryDescriptor);
```

## Parameters

`parallelCommandIOMemoryDescriptor`

The memory descriptor corresponding
to the command buffers.

`parallelResponseIOMemoryDescriptor`

The memory descriptor corresponding
to the response buffers.

## Return Value

<doc://com.apple.documentation/documentation/DriverKit/kIOReturnSuccess> on success and <doc://com.apple.documentation/documentation/DriverKit/kIOReturnError> on failure.

## Discussion

To optimize the interaction with the DriverKit Extension (dext) class, SCSIControllerDriverKit allocates contiguous command and response buffers to hold the maximum number of tasks reported by [`UserReportMaximumTaskCount`](/documentation/SCSIControllerDriverKit/IOUserSCSIParallelInterfaceController/UserReportMaximumTaskCount).
The framework calls this method before [`UserStartController`](/documentation/SCSIControllerDriverKit/IOUserSCSIParallelInterfaceController/UserStartController), so the dext class can map these buffers in the dext address space.
The framework uses the shared buffers to pass command and response payloads.
The command and response buffers use a one-to-one mapping; use the same slot number for related command and response payloads.
For example, if the framework assigns buffer slot number 12 to a command, use slot number 12 in the mapped response buffers during I/O completion.

The framework owns the shared buffer slots for both command and responses until it passes ownership to the dext in the [`UserProcessBundledParallelTasks`](/documentation/SCSIControllerDriverKit/IOUserSCSIParallelInterfaceController/UserProcessBundledParallelTasks) call.
From that point, the dext has ownership of these buffer slots until it returns ownership back to the framework in [`BundledParallelTaskCompletion`](/documentation/SCSIControllerDriverKit/IOUserSCSIParallelInterfaceController/BundledParallelTaskCompletion).
Don’t access a command or response buffer slot until the framework passes ownership to your dext.

If you don’t want to use the shared buffers, your dext can return <doc://com.apple.documentation/documentation/DriverKit/kIOReturnError> and continue to use [`UserProcessParallelTask`](/documentation/SCSIControllerDriverKit/IOUserSCSIParallelInterfaceController/UserProcessParallelTask) and `UserCompleteParallelTask` to process the I/O.
If you return <doc://com.apple.documentation/documentation/DriverKit/kIOReturnSuccess> from this method, the framework expects your dext to use [`UserProcessBundledParallelTasks`](/documentation/SCSIControllerDriverKit/IOUserSCSIParallelInterfaceController/UserProcessBundledParallelTasks) and `UserCompleteBundledParallelTask`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)