Post

Replies

Boosts

Views

Activity

No packet in IOUserNetworkRxSubmissionQueue
I am writing a NetworkingDriverKit extension. So I subclassed IOUserNetworkEthernet. In my class Start method, among hardware specific things here is what I do: Allocate a IOUserNetworkPacketBufferPool, with IOUserNetworkPacketBufferPool::Create(this, "myPacketsPool", 5000, 5000, 10000, &ivars->PacketsPool); Create an IODispatchQueue with IODispatchQueue::Create("myPacketsDispatchQueue", 0, 0, &ivars->PacketsDispatchQueue); Create the IOUserNetworkPacketQueue objects: IOUserNetworkRxSubmissionQueue::Create(ivars->PacketsPool, this, 250, 0, ivars->PacketsDispatchQueue, &ivars->RxSubmissionQueue); IOUserNetworkRxCompletionQueue::Create(ivars->PacketsPool, this, 250, 0, ivars->PacketsDispatchQueue, &ivars->RxCompletionQueue); IOUserNetworkTxSubmissionQueue::Create(ivars->PacketsPool, this, 250, 0, ivars->PacketsDispatchQueue, &ivars->TxSubmissionQueue); IOUserNetworkTxCompletionQueue::Create(ivars->PacketsPool, this, 250, 0, ivars->PacketsDispatchQueue, &ivars->TxCompletionQueue); queues[0] = ivars->RxSubmissionQueue; queues[1] = ivars->RxCompletionQueue; queues[2] = ivars->TxSubmissionQueue; queues[3] = ivars->TxCompletionQueue; I register the ethernet interface: RegisterEthernetInterface(mac, ivars->PacketsPool, queues, 4); And I report link status with ReportLinkStatus(kIOUserNetworkLinkStatusActive, kIOUserNetworkMediaEthernet1000BaseT | kIOUserNetworkMediaOptionFullDuplex); After that, the new network interface shows up in MacOS. I see that SetInterfaceEnable gets called with true as argument. In the receive data path I get data from the USB device, which I want to pass to the network stack. So I try to get an empty packet with: IOUserNetworkPacket * packet; r = ivars->RxSubmissionQueue->DequeuePacket(&packet); But at that point, I always get kIOReturnUnderrun. Is there something else I should do to be able to dequeue empty packets from the IOUserNetworkRxSubmissionQueue ? I already tried to enable the packets queues with: ivars->RxSubmissionQueue->SetEnable(true); ivars->RxCompletionQueue->SetEnable(true); ivars->TxSubmissionQueue->SetEnable(true); ivars->TxCompletionQueue->SetEnable(true); But that doesn't change anything.
1
0
1.4k
Aug ’22
IOUSBHostPipe AsynIO transfer size
I am working on a DriverKit system extension that handles some kind of USB Ethernet adapter. I'm trying to receive data from a Bulk endpoint. Each USB transfer should be up to 512kB, but the actual size of the transfer is not known in advance. What I do is the following: Allocate an IOBufferMemoryDescriptor with IOUSBHostInterface::CreateIOBuffer: ret = ivars->interface->CreateIOBuffer(kIOMemoryDirectionIn, 524288, &b->buffer); Create an OSAction to be used as transfer complete callback: ret = CreateActionReadComplete(0, &b->action); Start the I/O request: ret = ivars->pipe->AsyncIO(b->buffer, 524288, b->action, 0); At that point, I see that instead of starting a single 524288 bytes transfer, it starts 14 36864 bytes transfers and a 8192 bytes one. Which will absolutely not work with the USB device. Is there a transfer size limit I am not aware of?
0
0
577
Jul ’22
Notarization error 1048
I'm trying to get a pkg file notarized.The notarization process worked fine for me until some day ago.Now, when I run the altool command, I get this error : *** Error: To use this application, you must first sign in to iTunes Connect and sign the relevant contracts. (1048)I have checked https://developer.apple.com/account/ and https://appstoreconnect.apple.com/agreements/ too see if you have any pending agreement, but there is nothing there.The command I use is 'xcrun altool --notarize-app --primary-bundle-id $MYBUNDLEID --username $MYUSERID --asc-provider $MYTEAMID --password $MYAPPPASSWORD --file $MYPKGFILE'The last time the altool command worked for me was on the 29 May.Any idea what is going wrong here?
8
0
15k
Jun ’19