whitequark,
@whitequark@mastodon.social avatar

looks like i have successfully turned (as well as an RTL8211FD devboard I got from Aliexpress) into a fairly decent network interface card :D

this applet is written idiomatically and with no modification of the core USB framework (using the abstractions every other applet is using, rather than direct access to libusb or something), in a single-threaded CPython 3.12 asyncio event loop

iperf UDP: 79 Mbps TX, 91 Mbps RX
iperf TCP: 56 Mbps TX, 60 Mbps RX
latency: <10 ms

wolf480pl,
@wolf480pl@mstdn.io avatar

@whitequark have you tried iperf's bidirectional mode (--bidir) ?

whitequark,
@whitequark@mastodon.social avatar

@wolf480pl yes. it has unfavorable results because the arbitration on the FX2's shared USB FIFO bus is not fair

whitequark,
@whitequark@mastodon.social avatar

@wolf480pl (basically it never forcibly switches from IN to OUT or back)

apicultor,
@apicultor@hachyderm.io avatar

@whitequark Are... are you bit-banging Ethernet?!

whitequark,
@whitequark@mastodon.social avatar

@apicultor define "bit-banging"?

whitequark, (edited )
@whitequark@mastodon.social avatar

I think probably the most fun I have with it is throwing like a gigabit/s of UDP spam at it and watching @mwk's laptop (which uses it as the uplink) get essentially no jank in real-time applications like ssh

whitequark,
@whitequark@mastodon.social avatar

using PyPy and changing absolutely no code, I get:

iperf UDP: 83 Mbps TX, 82 Mbps RX
iperf TCP: 68 Mbps TX, 72 Mbps RX

whitequark,
@whitequark@mastodon.social avatar

i'm pretty sure i could get multi-gigabit networking going on with CPython and a single asyncio thread, but first i'll need faster hardware :p

whitequark,
@whitequark@mastodon.social avatar

empirically, building a 10/100 MAC essentially from scratch, including a bunch of stream infrastructure, with Amaranth and Glasgow takes less than four days

azonenberg,
@azonenberg@ioc.exchange avatar

@whitequark Was this intended as a tech demo, or to solve a specific real world problem? Or are you trying to design a [R]MII backend for glasgow just to have one?

whitequark,
@whitequark@mastodon.social avatar

@azonenberg intended to solve a specific real world problem of needing a NIC that can support 16K jumbo frames (which itself is a result of using Ethernet as a transport layer for what used to be an SCSI device)

whitequark,
@whitequark@mastodon.social avatar

@azonenberg and then @manawyrm told me that (paraphrased) i should not be solving bufferbloat that i got in the applet because it's hard, so i made the latency be under 10ms

xpi,
@xpi@mastodon.social avatar

@whitequark @azonenberg oO.. is this as cursed as ATAoE ... SCSIoE? This should imply MFMoE as well.

whitequark,
@whitequark@mastodon.social avatar

@xpi @azonenberg it's for a scanning electron microscope

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • ethstaker
  • DreamBathrooms
  • modclub
  • magazineikmin
  • InstantRegret
  • khanakhh
  • thenastyranch
  • Youngstown
  • rosin
  • slotface
  • Durango
  • ngwrru68w68
  • kavyap
  • mdbf
  • provamag3
  • tacticalgear
  • tester
  • osvaldo12
  • GTA5RPClips
  • everett
  • cisconetworking
  • cubers
  • megavids
  • normalnudes
  • anitta
  • Leos
  • JUstTest
  • lostlight
  • All magazines