[HN Gopher] Was the NE2000 really that bad?
       ___________________________________________________________________
        
       Was the NE2000 really that bad?
        
       Author : vitplister
       Score  : 59 points
       Date   : 2021-04-09 19:55 UTC (3 hours ago)
        
 (HTM) web link (www.os2museum.com)
 (TXT) w3m dump (www.os2museum.com)
        
       | garyrichardson wrote:
       | Great article. Brings me back.
       | 
       | I also learned something, I thought it was an ne2000 driver as in
       | "any 2000" as in "it works with all these generic network cards."
        
       | linker3000 wrote:
       | Oh, I remember them well - I worked as Technical Sales Manager
       | for a reseller/distie and did mostly network-oriented things.
       | 
       | * NE1000: PS148
       | 
       | * NE2000: PS348
        
       | stuaxo wrote:
       | Really good article, probably a bit late now, but it would be
       | good if someone implemented the fix he points out.
        
         | jandrese wrote:
         | The fix is about 20 years too late at this point. I'm kind of
         | surprised the driver is still in the kernel. There has to be a
         | vanishingly small number of these cards still in use in the
         | wild. Likely the only reason it survives is there were PCI
         | implementations.
        
       | tssva wrote:
       | I deployed probably thousands of NE2000 cards in the early 90s.
       | They were reliable and as the article points out presented much
       | less potential resource conflicts than competing cards. 3COM
       | cards were particularly awful in that regard.
       | 
       | I have a few NE2000 clones running in retro systems I have from
       | that era. I have an actual Novell NE1000 with a 10BASE-T
       | transceiver connected to the AUI port running in an 1984 Zenith
       | Z-160 luggable.
        
         | jandrese wrote:
         | I remember the 3Com cards struggling a lot with Ethernet
         | autodetection. It wasn't terribly uncommon to get a complaint
         | about a slow network and find that the 3Com plugged into a hub
         | had decided to go full duplex.
         | 
         | That said I was generally happy with the 3c509s, once I
         | manually wired down the duplex setting at least.
        
           | fbellag wrote:
           | Oh, I remember having to look at the revision code for the
           | 3c509... If memory serves, if it wasn't one of the red ones
           | it had to be returned, and the red were a mixed bag!
        
       | anigbrowl wrote:
       | No, it was my go-to for years when I worked in systems
       | sales/deployments - affordable (by contemporary standards),
       | predictable, reliable. I went through some Linux struggles with
       | it, but that was true of all hardware at the time. It was a lot
       | less painful than trying to get X-Windows running on higher
       | resolution VGA modes.
        
         | [deleted]
        
         | jandrese wrote:
         | I used them on FreeBSD boxes and never had issues beyond
         | standard ISA resource sharing headaches. I didn't even know
         | they had a bad reputation. I used to prefer the ones with
         | jumpers to set the resources because I never trusted Plug-n-
         | Pray on ISA.
        
         | burnte wrote:
         | Right? I'd never heard it had a bad name but I never used Linux
         | in the 90s. I'd installed thousands of those cards through my
         | years, they were tanks. Cheap, reliable, compatitble with
         | everything.
        
         | alexott wrote:
         | Oh, I remember fixing sources for it in Linux kernel right
         | after 2.0.0 release to make one of the clones working. Then it
         | was fixed properly in next release (2.0.1, or something like).
         | 
         | But yes, it was widespread, especially in my circles -
         | universities, etc. in ex-ussr
        
       | tannhaeuser wrote:
       | Why should NE2000 have been bad? It was the gold standard for ISA
       | NICs in terms of compat, with many clones available, similar to
       | what SoundBlaster was for audio cards.
        
         | bluGill wrote:
         | That is half the problem: there were a lot of clones, and not
         | all were good. I never used it myself, but the stories were
         | enough to get me to buy a bunch of 3com cards off eBay back in
         | the day just to get something that would work.
        
       | phpnode wrote:
       | No, it was great, but BNC / Coax ethernet was awful and horrible
       | and an absolute nightmare to debug. I probably still have a
       | drawer full of terminators somewhere
        
         | anyfoo wrote:
         | I remember the many advertisements for LAN analyzers back in
         | computer magazines aiming at the "professionals" IT audience.
         | 
         | Are those still in wide use today, for maybe other reasons?
        
       | flyinghamster wrote:
       | Back in the NE2000 era, I had more problems with thin-net cabling
       | than I did with the cards themselves. It definitely didn't help
       | that the boss had a ton of old 3270 cable lying around and
       | insisted that it was fine for the application. Hello, impedance
       | mismatch.
       | 
       | I really don't miss thin-net.
        
       | moonbug wrote:
       | beat the 3c509, that's for sure.
        
         | h2odragon wrote:
         | Bah. a pair of 3c509's would do a link of 750m or so on coax.
         | And when i needed that they were available _cheap_ used and in
         | bulk, which was good. Every lightning storm would fry one end
         | of the link if not both.
        
       | eek04_ wrote:
       | Back in the 1990s, I was a FreeBSD guy, and at some point I
       | looked over the code for a few of the popular Linux ISA
       | networking drivers for some reason and was shocked at the low
       | quality. The code quality of the core Linux kernel is generally
       | excellent - the code quality of these drivers was at the level of
       | "lowest passing undergraduate's second C program". I'd not be at
       | all surprised if this turned out bugs giving bad performance;
       | drivers are often considered finished when they produce the
       | expected result, and network protocols have enough recovery
       | mechanisms that you can get the expected result with a fair
       | number of bugs.
       | 
       | The NE2000 clones worked fairly well in FreeBSD at the same time
       | all the complaints were coming over in Linux-land. To be fair:
       | You'd usually have less support for hardware in FreeBSD than
       | Linux at the time (and almost certainly still.)
        
       | jhallenworld wrote:
       | On ISA-bus DMA: it was horrendously slow. They kept the 8237 DMA
       | controller speed pretty much unchanged even after faster
       | processor speeds appeared (maybe for backwards compatibility- the
       | one thing that the PC centralized DMA controller must work for is
       | the floppy controller).
       | 
       | I designed a card that used DMA before I understood this. PIO was
       | much faster. So for example "UDMA" for the ATA-3 IDE drives was
       | dependent on PCI-bus or on-motherboard ports.
        
         | ajross wrote:
         | The 8237 is an ISA device and operates at the bus speed (with
         | some overhead, ymmv, yada yada). The bus didn't get faster so
         | the devices it automated didn't get faster.
         | 
         | But PC DMA certainly did get faster. The PCI bus has bus
         | mastering DMA (i.e. none of that fly-by nonsense implemented by
         | the 8237) as a core feature, and PCI network cards used it. But
         | they were expensive for quite a few years, so we were still
         | buying ISA cards well into the 90's. Which were slow. Because
         | ISA.
        
           | jhallenworld wrote:
           | Yeah, I saw DMA going much slower than PIO on the ISA bus. I
           | remember scope shots showing the strobes being longer than
           | anything else happening on the bus.
           | 
           | Right, PCI bus master DMA was fast (probably true of EISA and
           | MCA also.. but don't know first hand).
        
           | kiwidrew wrote:
           | _> The 8237 is an ISA device and operates at the bus speed
           | (with some overhead, ymmv, yada yada)._
           | 
           | It's even worse than that -- the 8237 DMA controller is
           | clocked at 4.77Mhz for backwards compatability. The normal
           | ISA bus clock is ~8.25Mhz. So ISA DMA is actually half the
           | speed of ISA memory or PIO access.
           | 
           | https://wiki.osdev.org/ISA_DMA is a good reference to the
           | ugly gory details of DMA...
        
             | ajross wrote:
             | That's correct, but sort of missing context. The original
             | PC bus was synchronous, and everything lived on it. So the
             | idea was you'd fetch an instruction byte from the bus, then
             | another, then another, then spend a cycle interpreting the
             | instruction, then execute the load or whatever it was on
             | the bus, then go back to do it over again. In that world a
             | DMA controller that can do a transfer ever other cycle is
             | much _faster_ than the CPU copy it would be replacing.
             | 
             | Modern readers, weened on PCI, see something like "The ISA
             | bus is 16 bits wide at 8 MHz" and think they should be able
             | to stream 16MB/s "across" it "into" main memory. But that's
             | not how it worked with ISA. It's not how it ever worked
             | with ISA. The memory was on the same bus! And the CPU
             | didn't even have a L1 cache!
        
       | knorker wrote:
       | Coping some files with a ne2k card on linux, pentium 133mhz
       | caused mp3 playing to go bonkers from being overload. Switching
       | to a better card fixed it.
       | 
       | Was it the hw, or the driver? Shrug, I don't know. But the
       | experience sucked.
        
         | tyingq wrote:
         | An ne2k uses programmed io, where your cpu is constantly
         | interacting in a fifo way with it.
         | 
         | Shared memory or bus master cards are easier on the CPU. Some
         | compute and pass checksums too, which offloads more cpu.
        
           | anyfoo wrote:
           | Yeah, but as called out in the article, ISA (8257 style) DMA
           | wasn't a good option either. And carving out address space
           | came with its own set of problems, especially if you needed
           | this to work on DOS (with maybe Windows on top)--which was
           | pretty much the default at the time.
           | 
           | PCI made most of that go away with its introduction, hence me
           | wondering what the replacement card was.
        
             | oso2k wrote:
             | Probably something with a rtl8129/39/69 chip. I had a few
             | dozens of those NICs in the late 90s and early 2000s
             | university computer labs I worked at. They're so common
             | that they're (almost) a standard in x86 emulation (see
             | qemu, VirtualBox, etc.).
        
         | anyfoo wrote:
         | Out of curiosity, did you maybe switch to a PCI card? DMA was
         | just a better option in general with PCI than ISA, so just
         | switching to a PCI card could likely relieve your CPU of work
         | (unless the PCI card/driver weren't completely crap).
        
         | AnotherGoodName wrote:
         | Note that PIO hard drive modes that were unintentionally common
         | back then would also lead to this. You used to have to go out
         | of your way and meddle with specific drivers to avoid PIO mode.
         | 
         | You could have even ended up with a double whammy if not
         | careful. Your hard drive and network might both have relied on
         | the CPU for data transfer in which case the system would really
         | have ground to a halt.
        
       | karmakaze wrote:
       | I've used lots of network cards from the BNC flavoured ones for
       | IPX/SPX and later UTP ones for Ethernet. Most of them worked
       | fine, and most of the time they didn't was because of drivers
       | being not so great, or being misconfigured. Don't have any
       | complaints about the NE2000. It was probably difficult because it
       | was early. Later cards/drivers benefitted from things generally
       | getting sorted out.
       | 
       | A few of the (much later) cheapest bargain-basement (but also
       | popular) cards did have small buffers and had low throughput, or
       | simply lost packets without detecting the errors.
        
       | guardiangod wrote:
       | I used to use PCI NE2000 clone cards in Windows 95. I never had
       | any real issues using them. I do remember thinking that "who made
       | these cards? I couldn't find the brand?!"
       | 
       | One thing I really hated was Windows 95's built in generic NE2000
       | drivers never work, and you could never find the correct driver
       | floppy disk because you don't know the brand.
        
       | jeffbee wrote:
       | I think the lesson here is not to believe some myth just because
       | a nerd from the 90s wrote it down. Some guy said that the NE2k
       | was never meant to be mass-produced and people have been
       | repeating that for 30 years.
        
       | johndoe0815 wrote:
       | This is a well researched and very interesting article! I
       | especially like that it considers both the hardware and software
       | side of things and that it includes an analysis of the Linux
       | NE2000 driver code, its initial deficiencies and its evolution
       | over more than 20 years.
        
         | pilif wrote:
         | _> This is a well researched and very interesting article!_
         | 
         | That is true for all articles on that site. If you were alive
         | in the 90ies, then this site has something for you.
         | 
         | I spent hours and hours reading through most of it
        
       ___________________________________________________________________
       (page generated 2021-04-09 23:00 UTC)