Post

Replies

Boosts

Views

Activity

Reply to Xcode 14 signing & capabilities requires a DriverKit development profile
Thanks for your replay The trusted execution system does not change behaviour between beta and final OS releases.  When I sign in with distribution profile in signing & capabilities, Xcode 14 Beta will tell me the error code that "Xcode 14 and later requires a DriverKit development profile enabled for iOS and macOS. Visit the developer website to create or download a DriverKit profile." . I have no idea how to deal with it because that profile works in Xcode 13 macOS 12 ,and the Apple documents are nothing relevant with that. If nothing wrong between signing and profile, could it possible to a bug in Xcode14 Beta 3 or macOS 13 Beta. thanks
Jul ’22
Reply to Archive Build failed " Command SetOwnerAndGroup failed with a nonzero exit code" in Xcode 14
@eskimo Thanks for your reply I think the problem here is that you’re building to within a directory on your desktop. The desktop is protected by MAC, and that can cause all sorts of weird problems. Move your build directory somewhere that’s not MAC protected. I usually do this sort of work in a new directory that I create within my home directory. For more info about MAC, see On File System Permissions. If you want to maintain easy access to that directory, create an alias on your desktop that points to that directory. I have totally no idea which directory is not protected by MAC, I've tried so many directory such like ~/Application and search apple document to realize that where is the best directory to place whole project. Cloud you please tell me where can place whole project to archive successfully? And, I also tried another ways to archive my project to distribute. I use two types of "xcodebuild" command to archive project but both of them have a similar problem. There are two type of commands below: xcodebuild -project USBApp.xcodeproj -scheme AX88179 -archivePath "AX88179.xcarchive" DWARF_DSYM_FOLDER_PATH="build" -targetgeneral/platform=macos archive xcodebuild -alltargets archive error code is : "SetOwnerAndGroup root:wheel /Users/asix/Desktop/Dext2.2.0commandtest/Build/Intermediates.noindex/ArchiveIntermediates/AX88179/IntermediateBuildFilesPath/UninstalledProducts/driverkit/com.asix.development.driverkit.dext (in target 'AX88179' from project 'USBApp') cd /Users/asix/Desktop/Dext2.2.0commandtest /usr/sbin/chown -RH root:wheel /Users/asix/Desktop/Dext2.2.0commandtest/Build/Intermediates.noindex/ArchiveIntermediates/AX88179/IntermediateBuildFilesPath/UninstalledProducts/driverkit/com.asix.development.driverkit.dext chown: /Users/asix/Desktop/Dext2.2.0commandtest/Build/Intermediates.noindex/ArchiveIntermediates/AX88179/IntermediateBuildFilesPath/UninstalledProducts/driverkit/com.asix.development.driverkit.dext/com.asix.development.driverkit: Operation not permitted chown: /Users/asix/Desktop/Dext2.2.0commandtest/Build/Intermediates.noindex/ArchiveIntermediates/AX88179/IntermediateBuildFilesPath/UninstalledProducts/driverkit/com.asix.development.driverkit.dext/embedded.provisionprofile: Operation not permitted chown: /Users/asix/Desktop/Dext2.2.0commandtest/Build/Intermediates.noindex/ArchiveIntermediates/AX88179/IntermediateBuildFilesPath/UninstalledProducts/driverkit/com.asix.development.driverkit.dext/Info.plist: Operation not permitted chown: /Users/asix/Desktop/Dext2.2.0commandtest/Build/Intermediates.noindex/ArchiveIntermediates/AX88179/IntermediateBuildFilesPath/UninstalledProducts/driverkit/com.asix.development.driverkit.dext: Operation not permitted Command SetOwnerAndGroup failed with a nonzero exit code ** ARCHIVE FAILED **" error code is: "Create build description Command failed with a nonzero exit code error: unexpected service error: build aborted due to an internal error: unable to write manifest to '/Users/asix/Desktop/Dext2.2.0commandtest/build/XCBuildData/d004680d06c003af166da503c1228bc3.xcbuilddata/manifest.json': mkdir(/Users/asix/Desktop/Dext2.2.0commandtest/build/XCBuildData/d004680d06c003af166da503c1228bc3.xcbuilddata, S_IRWXU | S_IRWXG | S_IRWXO): Permission denied (13) ** ARCHIVE FAILED **" If I add "sudo" into the top of both of command above, It'll show "note: Building targets in dependency order /Users/asix/Desktop/Dext2.2.0commandtest/USBApp.xcodeproj: error: No profile for team '5RHFAZ9D4P' matching 'Development Driverkit profile' found: Xcode couldn't find any provisioning profiles matching '5RHFAZ9D4P/Development Driverkit profile'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the Signing & Capabilities tab of the target editor. (in target 'AX88179' from project 'USBApp') /Users/asix/Desktop/Dext2.2.0commandtest/USBApp.xcodeproj: error: No profile for team '5RHFAZ9D4P' matching 'Development product' found: Xcode couldn't find any provisioning profiles matching '5RHFAZ9D4P/Development product'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the Signing & Capabilities tab of the target editor. (in target 'USBApp' from project 'USBApp') ** ARCHIVE FAILED **" error code . The error code above, could you please tell me as detail as you can that how to solve those problem no matter use Xcode IDE or Commands? I tried so many ways passing the archive process..... According to the "Simplify distribution in Xcode and Xcode Cloud" introduction video, distribute Driverkit application needs to use Profile type "Development" to config "signing & capability" and pass the archive to notarize project to organizer, later to distribute. Do I have any misunderstanding of the process to distribute the Driverkit application? I really needs some specific methods or suggestions to distribute my Driverkit application. It's fine to tell me another brand new distribute process detail if totally misunderstanding the whole process. Thanks for your help Sincerely.
Jun ’23
Reply to Unsatisfied entitlements: com.apple.developer.driverkit.transport.pci
self solved I created new app different app ID when requested system-extension entitlements. So I match the app ID and array key and values with profile of automatic mode. and then I can running my app. Hi, could you please tell me more informations about how to slove this question? I added "com.apple.developer.driverkit.transport.pci" into .entitlements file under the Entitlements File Key and showed "Unsatisfied entitlements: com.apple.developer.driverkit.transport.pci" error code after run the driver. Then, I tried to add "DriverKit PCI" into it, and log showed the " Unsatisfied entitlements:DriverKit PCI" Last, I added "IOPCIPrimaryMatch"into Info.plist file under the Information Property List -> IOKitPersonakities Dictionary but it can't identify the device via IOPCIPrimaryMatch value.
Topic: Code Signing SubTopic: Entitlements Tags:
Jul ’23
Reply to Unsatisfied entitlements: com.apple.developer.driverkit.transport.pci
Hi @eskimo , I've read all of the post of this problem and no any idea to solve it. what are those error log and errorcode mean? I can't find any answer exactly in apple document, so stop posting the useless documents and links of Forums post. " 2023-11-01 16:38:49.218376+0800 0x5ed4 Error 0x0 139 0 kernelmanagerd: DextRecord ( path: /Library/SystemExtensions/108CB18F-44D3-4CDE-A38D-C665BF4473D0/bundleID; isBeingReplaced: false ) was cleaned up from DextRecordTable but was not found in manager to complete cleanup" " Error 0x0 1171 0 sysextd: no extensions found that are terminating for upgrade via delegate with identifier com.asix.dext.pciedevice" "Error 0x0 139 0 kernelmanagerd: Error occurred while handling request DextUpdateNotification(arguments: Optional(["CFBundleIdentifier": com.asix.dext.pciedevice, "kOSBundleDextUniqueIdentifier": <b706b870 6e3f583d 5cfa6ae1 504adebd 4dcb54b7 a32c286f df042ab6 60d398bc>])): SysExtensionWaitForTerminationError: Could not communicate with sysextd to continueCleanupForDextUpgrade Error Domain=OSSystemExtensionErrorDomain Code=4 "(null)"" I've searched about the SystemExtension and checked, none of them used in my application, so how this error mean and how to solve it??? why ivars->PCIDevice->Open(this,0) excuse failed and show"kernel: DK: IOUserServer(BundleID-0x1000009af)::terminate(AxPCIeEth-0x1000009af) server exit before start(),and Open()'s return value is " 0xe00002d8". What is "0xe0002d8" exactly mean in this function? 5.2023-07-31 13:43:47.031012+0800 0x1d41ce Error 0x0 12158 0 taskgated-helper: (ConfigurationProfiles) [com.apple.ManagedClient:ProvisioningProfiles] com.asix.dext.pciedevice: Unsatisfied entitlements: com.apple.developer.driverkit.transport.pci 6.2023-07-31 13:43:47.031048+0800 0x1d41ce Error 0x0 12158 0 taskgated-helper: (ConfigurationProfiles) [com.apple.ManagedClient:ProvisioningProfiles] Disallowing: com.asix.dext.pciedevice 7.2023-07-31 13:43:47.062775+0800 0x1d436e Error 0x0 103 0 kernelmanagerd: Error occurred while handling request "DextLaunch(arguments: Optional(["Check In Token": 12087, "kOSBundleDextUniqueIdentifier": <04642bc8 90788071 c2a02259 c624ba81 3bebbf55 f9f2db7e f9fbbdd5 1f2ed99d>, "Driver Extension Server Tag": 4294982732, "DriverKit Reslide Shared Cache": 0, "Driver Extension Server Name": com.asix.dext.pciedevice, "CFBundleIdentifier": com.asix.dext.pciedevice]))": Error Domain=NSPOSIXErrorDomain Code=8 "Exec format error" what the meaning of those error message and how to do to avoid showing those error? If you can explain it very clearly, I'll very appreciate it. thanks the file below are my entitlement & plist setting. Info_plist.txt AxPCIeEth_entitlements.txt
Topic: Code Signing SubTopic: Entitlements Tags:
Nov ’23
Reply to Is DEXT Driver supporting these Networking Features?
Hi, @DTS Engineer [quote='820617022, DTS Engineer, /thread/771298?answerId=820617022#820617022'] The queue architecture above handles this. Every queue has an associated dispatch queue, which lets you control parallel packet processing. [/quote] In the RSS feature of Windows (e.g., as described on the website https://learn.microsoft.com/en-us/windows-hardware/drivers/netcx/rsc-offload), the driver developer uses NET_ADAPTER_RECEIVE_SCALING_HASH_SECRET_KEY to request a hash key from the system. This hash key is then used with an algorithm to calculate a hash value, which determines the specific QueueID. Then, I reviewed this document IOUserNetworkRxSubmissionQueue/withpool As I understand it, if I need 4 queues, they can be created using withPool to initialize IOUserNetworkPacketQueueId queueId[0~3]. Each queue extracts packets from the same IOUserNetworkPacketBufferPool, with capacity and bufferCount set as uint32_t capacity, uint32_t bufferCount. However, I am uncertain how to declare or assign values to the two parameters, OSObject * target and DequeueAction dequeueAction. If possible, please provide more information or detailed documentation. Additionally, are there predefined functionality or value lists for the two parameters void * refCon and IOOptionBits options that can be used for specific feature configurations? I would like to know the mechanism by which this method determines which QueueID a packet should be placed into or dequeued from for both Tx and Rx. I hope to get a detailed explanation of the exact usage, sample code, and whether this aligns with your statement, "The queue architecture above handles this." Thanks
Jan ’25
Reply to Is DEXT Driver supporting these Networking Features?
@DTS Engineer We are indeed developing the PCIe DEXT from scratch, as we do not have any prior KEXT products related to this. I will take the time to thoroughly understand IOKit before consulting you on technical questions. However, I’d like to start by discussing the concept with you to understand whether the functionality I am aiming for can be achieved on Apple’s platform. To begin with, let’s assume that I have created four independent queues in the driver: IOUserNetworkTxSubmissionQueue/IOUserNetworkTxCompletionQueue, namely Queue[0], Queue[1], Queue[2], and Queue[3], where Queue[3] has the highest priority, and Queue[0] has the lowest. Would it be possible for a user, through an application, to determine which specific application-generated packets should be processed and transmitted via one of the driver-created queues [Queue[0] ~ Queue[3]] based on priority? Our goal is to implement functionality on macOS similar to the "Realtek Bandwidth Control" feature on Windows, where the transmission priority of different applications can be managed to achieve traffic shaping by application priority. The queue architecture above handles this. Every queue has an associated dispatch queue, which lets you control parallel packet processing. I would like to provide additional information regarding the points mentioned in my previous response. The workflow of RSS (Receive-Side Scaling) on Windows is roughly as follows: "RSS calculates the queue number for each packet based on a hash function and an indirection table. The upper layer uses this to assign processes to corresponding CPU cores. The hash value is calculated using TCP/UDP ports or IPv4/IPv6 addresses, and the hardware uses hash value bits [6:0] to look up the indirection table to obtain the queue number." Does "The queue architecture above handles this" imply that the example I previously mentioned—"setting network packet transmission/receiving priorities for applications via an application"—is achievable? Additionally, in macOS, can a user application transmit a specific value to the hardware device to enable packets from a particular application to be received by a specific Queue ID? I am doing my best to clearly articulate the functionality we hope to achieve with Multi-queue, and I hope that our understanding of the issue is aligned.
Jan ’25
Reply to Is DEXT Driver supporting these Networking Features?
I really appreciate your detailed explanations earlier; I have benefited greatly from them. I would like to continue exploring the topic in greater depth, focusing on the transmission mechanisms between Tx and Rx. My goal is to understand how data is transferred between DEXT and the upper layers. [Tx] In Linux, Qdisc (Queueing Discipline) is responsible for: Determining packet transmission priority. Controlling packet delay or packet drop policies. Implementing traffic shaping and bandwidth limitations. By using tc (Traffic Control), it is possible to influence how packets are distributed across different Driver Queues. However, the final decision is determined by skb->queue_mapping, which is usually set by Qdisc (such as mq or multiq) or XPS (Transmit Packet Steering). In macOS DriverKit (DEXT), I would like to ask: Does macOS have a corresponding mechanism that allows developers to manually assign packets to specific TX Queues? In Linux, ndo_select_queue() allows developers to manually assign packets to a specific TX Queue based on Flow Hashing or QoS policies. Does macOS provide a similar API for developers? Is there a way to manually assign certain types of traffic (e.g., PTP, VoIP, TCP, UDP) to a specific IOUserNetworkTxSubmissionQueue? The queueing system is primarily about recycling I/O buffers than it is about true 'prioritization,' as much of the prioritization was done before the packets ever reached your driver. Does this imply that macOS’s upper networking stack has already completed CPU load balancing and QoS prioritization before the packet reaches the DriverKit extension (DEXT)? Can it be inferred that macOS has already optimized CPU workload distribution, meaning that even when developing a 10GbE Ethernet driver, using a single TX queue will not create performance bottlenecks? Does this mean that TX Path in macOS is primarily a hardware interaction layer rather than an active network packet scheduling layer? [Rx] In Linux, ethtool allows manual configuration of RSS (Receive Side Scaling) via set_rxfh, including: Configuring Flow Types (TCP, UDP, IPv4, IPv6). Modifying the RSS Indirection Table. Changing the RSS Hash Key. In macOS DriverKit (DEXT), I would like to ask: Can RSS be manually configured during the kern_return_t Start(IOService *Provider) override; stage? Does macOS provide an API that allows developers to modify RSS Flow Type, Indirection Table, or Hash Key? Are there any APIs in macOS similar to Linux’s get_rxfh/set_rxfh for configuring RSS? The queue architecture above handles this. Every queue has an associated dispatch queue, which lets you control parallel packet processing. Does this mean that IOUserNetworkRxSubmissionQueue / IOUserNetworkRxCompletionQueue inherently manage CPU load balancing, eliminating the need for developers to manually configure RSS Indirection Tables as required in Linux? Can it be confirmed that macOS DEXT only requires a single serial queue to fully support high-performance Ethernet (e.g., 10GbE), and that RSS Hash Key tuning is unnecessary for efficient packet processing? There are many issues mentioned above, and I hope you can address them one by one. Thank you.
Feb ’25
Reply to Is DEXT Driver supporting these Networking Features?
Hi,@DTS Engineer After our last discussion, I dedicated significant time and effort to implementing the withPoolAndServiceClass()method and testing application-level packet transmission using NWParameters.ServiceClass to specify QoS. Implementation of withPoolAndServiceClass() I attempted to implement withPoolAndServiceClass() as follows: QueryFreeSpaceAction TxQ0QueryFreeSpaceAction = My_QueryFreeSpaceAction DequeueAction TxQ0DequeueAction = My_DequeueAction; ret = IODispatchQueue::Create("NetworkTxSubmission", 0, 0, &ivars->queueDispatch[2]); Require(kIOReturnSuccess == ret, Failed); ret = CreateActionTxPacketAvailable(0, &ivars->txPacketAction); Require(kIOReturnSuccess == ret, Failed); ret = IOUserNetworkTxSubmissionQueue::Create(ivars->txNetworkPool,this,8,kNetworkQueueIdTxSubmission, ivars->queueDispatch[2],&ivars->queueTxSubmission); Require(kIOReturnSuccess == ret, Failed); IOUserNetworkTxSubmissionQueue::withPoolAndServiceClass(ivars->txNetworkPool, kIOUserNetworkPacketServiceClassBE,8,0, this, TxQ0QueryFreeSpaceAction, TxQ0DequeueAction); ret = ivars->queueTxSubmission->CopyDataQueue(&ivars->dataDispatch[2]); Require(kIOReturnSuccess == ret, Failed); My objective is to use withPoolAndServiceClass() to allocate packets from the pool based on a specific service class and assign them to a designated queue ID for transmission. ** Could you confirm whether this implementation correctly achieves that functionality? If not, could you provide corrections and sample code?** Testing NWParameters.ServiceClass for QoS Marking Assuming my withPoolAndServiceClass() implementation is correct, I designed a simple socket client that sets different NWParameters.ServiceClass values (.interactiveVideo, .responsiveData, .background, .bestEffort, .interactiveVoice, .signaling) to verify whether it triggers the DequeueAction function and correctly transmits packets with the expected QoS markings. However, upon inspecting the IPv4 TOS (Type of Service) field using Wireshark and tcpdump (tcpdump -i -v), I observed that regardless of the ServiceClass setting, the transmitted packets always have a TOS value of 0x00. Furthermore, withPoolAndServiceClass() does not seem to invoke the DequeueAction function. I attempted to implement application-level packet transmission as follows: func getQoSClass(from input: String) -> NWParameters.ServiceClass { switch input.lowercased() { case "interactive": return .interactiveVideo case "responsive": return .responsiveData case "background": return .background case "besteffort": return .bestEffort case "interactiveVoice": return .interactiveVoice case "signaling": return .signaling default: print("⚠️ 無效的 QoS,預設使用 `.responsiveData`") return .responsiveData } } Could you help identify any misunderstandings in my approach that might be causing this issue? Specifically: • Are there additional configurations needed for NWParameters.ServiceClass to ensure that packets are transmitted with the expected QoS values? • How can I verify whether withPoolAndServiceClass() is correctly handling packets according to the specified service class? Since Apple's ConnectingANetworkDriver sample code does not reference or implement withPoolAndServiceClass(), I need further guidance on its correct usage. Thank you for your assistance. Best regards,
Mar ’25
Reply to Symbol missing when running Dext builded with Xcode 16.2 and running on macOS 14.7.4
Hi, @DTS Engineer ...yes, please file a bug and post the number back here. While the issue is known and your bug will end up being closed as a duplicate, it's important to file bugs on issues like this to ensure that shipping a fix is given the right priority. I submitted this feedback (FB16516582) back in February and received a single response suggesting that I rebuild the DEXT using Xcode 16.2 on macOS 14.7.4. I followed the instructions and tested the rebuilt DEXT in that specific environment, but unfortunately the issue still persists. I replied to the original feedback to report this outcome, but there has been no further response. It has now been over three months since my last update, and the problem remains unresolved. I would appreciate any update or guidance on this issue, especially regarding compatibility expectations for DEXTs across macOS versions. Thank you.
Topic: App & System Services SubTopic: Drivers Tags:
May ’25