Re: [9fans] USB3 1Gb ethernet card working on 9legacy (rpi 4)
On Wed, 3 Aug 2022, adr wrote: linux: $ wget -O /dev/null https://arch.mirror.constant.com/images/v20220801.71902/Arch-Linux-x86_64-basic-20220801.71902.qcow2 [...] /dev/null 100%[===>] 489.88M 10.5MB/sin 51s 2022-08-02 22:56:44 (9.58 MB/s) - ???/dev/null??? saved [513671168/513671168] real0m51.875s user0m8.594s sys 0m5.379s And the progress bar saw me several times the speed reaching my limit. So the usb and ethernet drivers seem to be working pretty good (at least for my bandwidth) plan9: ; time hget -o /dev/null https://arch.mirror.constant.com/images/v20220801.71902/Arch-Linux-x86_64-basic-20220801.71902.qcow2 couldn't set mtime: permission denied 8.06u 35.25s 211.17r hget -o /dev/null https://arch.mirror.constant.com/images/v20220801.71902/Arch-Linux-x86_64-basic-20220801.71902.qcow2 See the difference? That's a little more than 19Mb/s, some 2MiB/s almost 50% slower. That was a typo, is almost five times slower (~80% slower). Just to be clear, it is really worst! -- 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T668643d11149fab4-M34d187a3f75731aef4861b40 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
Re: [9fans] USB3 1Gb ethernet card working on 9legacy (rpi 4)
By the way Richard, should I take the last rpi image at 9legacy as the more recent with your work? Are you going to abandon https://plan9.io/sources/contrib/miller/? -- 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T668643d11149fab4-M406ab1ba9e7ee9fe37676b4a Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
Re: [9fans] USB3 1Gb ethernet card working on 9legacy (rpi 4)
On Tue, 2 Aug 2022, Richard Miller wrote: It should be documented somewhere, but at present it's only implemented for the bcm kernel, and raspberry pi doesn't have a plan9.ini. I think that cmdline.txt should be described in plan9.ini(8) (It should be possible to move etherusb.c to /sys/src/9/port and use it on other platforms too. But it's a bit of an ugly hack.) The performance of the usb/ether driver without etherusb is much, much worse. I think is a good idea to move it to port. Those devices are very common nowadays, and can save your day if your ethernet card breaks, or if your new computer has incompatible drivers, etc. What I would love to see is the kernel creating the '#l' device when a usb ethernet card is attached, and destroy it when the card is unplugged. But that's the dream of an ignorant, that would already been done if it were feasible, I suppose. -- 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T668643d11149fab4-M7a30ac10a19a0a86b37f471e Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
Re: [9fans] USB3 1Gb ethernet card working on 9legacy (rpi 4)
On Tue, 2 Aug 2022, Richard Miller wrote: So bad maxpkt... etherusb check for maxpkt < 512 which is the max for bulk transfers in usb2 high speed. Using 1024 instead fixes the problem. Thanks, the code was correct when written but the world has moved on! Is your adapter transmitting packets successfully now? It's working really well. I'm using David du Colombier's nat patch (I'll post to the list another one without the il stuff in case someone wants to try it) to share internet to a linux machine, so I made a test from the browser (speedtest.net) and almost reached the contracted limit of my fiber connection, although I only have a crappy 100Mb plan (I don't really need more). So packets are flowing, but when plan9 is more involved things get worse. For example with this setup (a small arm linux machine connected through plan9, using the usb adapter for internet): linux: $ wget -O /dev/null https://arch.mirror.constant.com/images/v20220801.71902/Arch-Linux-x86_64-basic-20220801.71902.qcow2 [...] /dev/null 100%[===>] 489.88M 10.5MB/sin 51s 2022-08-02 22:56:44 (9.58 MB/s) - ???/dev/null??? saved [513671168/513671168] real0m51.875s user0m8.594s sys 0m5.379s And the progress bar saw me several times the speed reaching my limit. So the usb and ethernet drivers seem to be working pretty good (at least for my bandwidth) plan9: ; time hget -o /dev/null https://arch.mirror.constant.com/images/v20220801.71902/Arch-Linux-x86_64-basic-20220801.71902.qcow2 couldn't set mtime: permission denied 8.06u 35.25s 211.17r hget -o /dev/null https://arch.mirror.constant.com/images/v20220801.71902/Arch-Linux-x86_64-basic-20220801.71902.qcow2 See the difference? That's a little more than 19Mb/s, some 2MiB/s almost 50% slower. By the way I don't use archlinux but I've always use their servers to make speed tests, usually they are fast. Actually the limit on maxpkt in that context wasn't strictly necessary anyway. Just remove the check. Yes, I thought the same. adr -- 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T668643d11149fab4-M99ba4fa5f9a9f29941fe318d Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
Re: [9fans] USB3 1Gb ethernet card working on 9legacy (rpi 4)
> Shouln't the usb type be documented in the ethernet section of plan9ini(8), It should be documented somewhere, but at present it's only implemented for the bcm kernel, and raspberry pi doesn't have a plan9.ini. (It sould be possible to move etherusb.c to /sys/src/9/port and use it on other platforms too. But it's a bit of an ugly hack.) Until rpi4, the built-in ethernet adapter on the raspberry pi was via usb, so 'ether0=type=usb' was the default and didn't need stating explicitly. The rpi4 has proper (non-usb) ethernet, so etherusb shouldn't be needed there except for niche situations (like a network appliance with multiple ethers?). > and noauto in usbd(4)? Yes it should. -- 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T668643d11149fab4-M73cd87940d3916d92640771c Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
Re: [9fans] Trouble compiling "Hello, world"
On 8/2/22, Clout Tolstoy wrote: > Years ago I worked at a non-profit called FreeGeek (in Portland, Oregon > USA) . We used to do grants for computers and sent some over to Uganda, > amongst other places. I'm not sure of their current status on their grant, > but it could be worth a shot. You might be able to get the hardware for > free, and grants for shipping through someone else. > That is a kind response and I will let you know what will come of it. My biggest problem, which may be more my own flawed psychology than any real obstacle, is that I want some kind of succession planning up front, rather than create a need I alone can fulfil (I'm not young and I can see the gentle wear and tear having its impact on my abilities). In fact, what I'm trying to establish is a community that can absorb as much as I am able to guide them toward. For now, my efforts are on identifying those analytical skills I found so useful in my own education. I get to see a lot of youths, but few real gems that are also interested in analytical thinking. Lucio. -- 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Te178b97d94173ff8-M1e52e938e9ebd2e5f571af6d Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
Re: [9fans] USB3 1Gb ethernet card working on 9legacy (rpi 4)
> So bad maxpkt... etherusb check for maxpkt < 512 which is the max for > bulk transfers in usb2 high speed. Using 1024 instead fixes the problem. Thanks, the code was correct when written but the world has moved on! Is your adapter transmitting packets successfully now? > Should it chek for the speed of the usb device and set the limit accordingly? Actually the limit on maxpkt in that context wasn't strictly necessary anyway. Just remove the check. diff /n/dump/2022/0802/sys/src/9/bcm/etherusb.c /sys/src/9/bcm/etherusb.c 328c328 < if(maxpkt < 8 || maxpkt > 512) --- > if(maxpkt < 8) -- 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T668643d11149fab4-M7a798f1d29caac2cbe00034f Delivery options: https://9fans.topicbox.com/groups/9fans/subscription