Lurker News

Comments (84) 24 threads

Earlier comments
actionfromafar2 replies#
So, is it better or worse than the Etherlink 3c501 ? :-D

https://mirror.math.princeton.edu/pub/oldlinux/Linux.old/net...
IIRC it over-wrote the buffer the CPU tried to read with new packets from the network or something like that. I had it for a while in Linux and the performance really was bad. :-D

jiveturkey2 replies#
> Fixing the frame length doesn’t have any effect on higher-level protocols because they encode the packet size in their headers and do not rely on the actual Ethernet frame length.

Interesting. I just wrote a packet decoder and I specifically verify at each layer that the lower layer length matches. So for IP, in my decoder the IP datagram length must match exactly the ethernet frame length + link layer header. I didn't do this to be pedantic but rather to detect short frames, and then I decided that long frames were also errors.
You (author) are using uIP but I wonder what Linux or any other modern OS does. You don't specifically mention interoperability but I wonder if you've tested that.

ynoxinul1 reply#
I'm sending my long frames out to the network and no OS I have has any problem with that. I've read somewhere that long frames are actually used by some routers to store metadata after the packet.
jiveturkey1 reply#
wireshark doesn’t complain either?
ynoxinul#
Of course not. Long frames are totally valid.
darrin#
Timestamps and other types of in-band network telemetry are sometimes inserted in the frame as a trailer (with a new FCS). If an application isn't looking for the L2 data, it's just ignored by the Linux IP stack.
formerly_proven#
Physically a lot smaller than DEC's first SSI Ethernet card(-set): https://i.ebayimg.com/images/g/NEYAAOSw-mZlg0lZ/s-l1600.jpg (DEC DEUNA, those boards are over a foot long), though also a lot fewer features. DEUNA is a "real" NIC, it has tx/rx queues and handles all that autonomously. Does DMA, too. It of course comes with it's own on-card PDP-11 to run it.
precompute1 reply#
Very cool! How long did it take you? It's really impressive!
ynoxinul3 replies#
Building the network module took about a month, but writing the compiler took much more time.
gigatexal#
impressive work! a lot of it went over my head but still i could appreciate it being a real feat
magicalhippo1 reply#
> writing the compiler took much more time

Impressive stuff.
I've dabbled wuth making my own ISA and softcore CPU in FPGA, but getting C code to compile has been a bit of a blocker.
I know there are some compilers one could try to port but my ISA is kinda esoteric so not straight forward, and so I considered just writing from scratch like you have.

ynoxinul#
> I know there are some compilers one could try to port but my ISA is kinda esoteric so not straight forward

Same. I tried digging into exsiting compilers, but they are either unsuitable at all or too complicated (clang).

artirdx1 reply#
Very impressive! Could you share some books, training, experiences that helped you reach this stage so a hobbyist could catch up? There are so many parts - compiler design, basic electronics, computer architecture etc. Maybe a blog post.
ynoxinul#
I have a CS/applied math background, my main job is software development, so I don't have problems with the software part. If you are interested in compiler design specifically, you can find a lot to read or to watch online.

When building my system, I was inspired by 8 bit retro computers like ZX Spectrum. Their architecture is straightforward and easy to understand.
Electronics just fascinates me, but I can't really point out a single source which gave me the insight. A lot of playing around with transistors, microcontrollers, logic gates gives the intution how to design stuff.

Load more comments