I've flashed your firmware to my V1 board and ran some tests. For context, I'm running a fresh "this Macintosh" version of 7.5.3 on a IIsi, Daynaport 7.7.2, writing to the scuznet flash card with a volume image in 'forcefast' mode. The "server" is a Debian VM running vsftpd on my desktop. It also has 7.5.3 running inside of Basilisk II networked via sheep_net as the AppleTalk host system. The test file is a Mac Binary copy of Escape Velocity, weighing in at 5.4 megabytes (base-10).
Right off the bat, performance looks good. For FTP downloads, Fetch is reporting ~22KB/s, which is quite similar or slightly better than what the Nuvolink was doing with this size of buffer. Watching Wireshark, I'm seeing a nearly identical pattern of TCP retransmits as with my firmware on Nuvolink. That seems to point to vsftpd being the underlying issue; like what
@Chopsticks reported before, the choice of FTP server appears to have quite an impact on performance.
For FTP writes, there is some really bizarre traffic on Wireshark. I don't think that has anything to do with your changes. The code you branched from did a poor job of handling the ENC28J60 transmission bugs, and I'd bet a shiny nickel the issues here are my fault. Speed is very inconsistent, with Fetch reporting ~12.8KB/s, but actual performance is worse. The test file did successfully transfer in the end and the SHA256 checksum matched the origin file, so no data loss or anything like that.
Over on the AppleTalk side, I got 77KB/s downloading. Uploading was a dreadful 9KB/s, but again that's likely my shoddy transmission code at work.
To give comparisons, here's the same values after I re-flashed the board to my current 'master' branch. Only the firmware was changed, everything else was left exactly the same.
- FTP down / up: could not be tested, Fetch kept crashing with a type 10 error when listing the server contents. I'll have to investigate, likely my focus on Nuvolink has broken something here.
- AFP down: 43.2KB/s
- AFP up: 37.2KB/s
Seems pretty clear your packet-stuffing discovery with the Daynaport helps out quite a bit. Another interesting tidbit: the Daynaport driver really did not like it when the Linux VM started sending it ARP requests during the AppleTalk transfers: it wouldn't respond to ARP, and the transfer stalled out for a few seconds each time those packets showed up. I re-did the transfer after they stopped and things were fine, getting the results shown above.
I also have a mirrored copy of the same Mac system for the IIsi, just with the Nuvolink driver instead of Daynaport. Here are results for the Nuvolink, which should be pretty apple-to-apples:
- FTP down: 33.3KB/s
- FTP up: 192.9KB/s (according to Fetch, stopwatch says 98.2KB/s FWIW)
- AFP down: 131.7KB/s
- AFP up: 98.1KB/s