DaynaPort: Only buffer one outbound packet #351
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR changes to only buffer one packet outbound instead of NETWORK_PACKET_QUEUE_SIZE. If the buffer is full, it will block the SCSI bus temporarily in order to flush the packet (have not encountered this case yet).
Consider this a PR for discussion ... This needs to be verified on the fastest machine that supports daynaport (PowerPC of some denomination?), but it would provide quite a bit of relief to the SRAM congestion on the Daynaport target.
I performed some testing and found the outbound queue depth does not exceed 1 on either an accelerated SE/30 or Quadra 650@40mhz under ideal or worst case conditions. I found sending packets directly from scsiNetworkCommand seemed to work fine with a minor speed improvement, but I'm not sure what the longest acceptable time to perform work in the SCSI call is or worst case time of cyw43_send_ethernet as it is black box code with no documentation that I can find. I suspect the call simply buffers the packet into the Wifi SoC's SRAM... worst case time observed is about 0x12000 cycles as measured by rp2040.getCycleCount64(), best case around 0x4000.
Ideal test conditions: AP a few feet from Quadra 650, with a wired computer downloading a file from the the Mac's web sharing. ~160KB/s mac->computer speed observed.
Worst case: Mac located as far away as possible without huge packet loss. ~60KB/s mac->computer speed observed.