Hacker News new | ask | show | jobs
by cowlevel 16 days ago
So in other words the software stack didn't allow it, and a different one could have allowed it, but that didn't exist.

I bet it did exist though, on MS-DOS. It was Windows NT and Linux that came later and insisted that hardware must do things that it did not do.

1 comments

No amount of software would be able to force Realtek chip into reading/writing packets directly from/into user provided buffer correctly.

In Windows land Winsock 2 in win98 together with capable hardware (3C905) allowed for sending data directly from user provided buffers with no additional buffering (zero copy), same goes for win NT. OS reused user provided buffer. Realtek could never do that because of hardware limitations. You cant force userspace software to allocate buffer that will be compatible with broken hardware.

Receiving still requires one copy with good hardware (you dont know who the packet belongs to without fist storing it in kernel buffer and checking received headers, at least not without 'fancy' NIC running own OS and offloading TCP/IP stack or more modern Flow Steering). Problem with Realtek is it cant even do that because it lacks scatter-gather meaning Kernel has to babysit one ring buffer - constantly copying data from it into its own buffer, and only then from that into user provided buffers.

In both cases Realtek was hammering CPU with interrupts to copy data around to/from tiny fixed/limited buffers while 3Com/Intel would happily do all the data moving automagically in hardware without touching CPU.

Browsing internet at 100KB/s around the year 2000 on ISDN/first slow DSL wasnt a problem, but try to copy data over 100mbit LAN and suddenly you notice 100% CPU load and inability to saturate 10MB/s.