<neggles> stintel: are you running `oct-remote-boot` as root
<neggles> doesn't work from not-root, not sure what permissions it needs
seasonal has joined #openwrt-devel
<stintel> neggles: yes
<neggles> well that's... odd
<stintel> neggles: I even added octeon_remote_debug(1, "foo\n"); in host/remote-lib/octeon-remote-pci.c in the loop that reads /proc/bus/pci/devices
<stintel> it doesn't print a single time
<stintel> and that shouldn't even happen as non-root
<stintel> because I can cat that "file" just fine
<neggles> h-uh.
<neggles> what kernel version is your host?
<neggles> I remember I had the same issue initially but after a kernel update and running under `sudo -i` (with env-setup ofc) it started working
<neggles> i did install the dpdk packages & then blacklist the liquidio module
<neggles> i'm on 5.11.0-38-generic
<stintel> I did this on Debian before
<stintel> which had an older kernel than 5.10 most likely
<stintel> pretty sure that's not going to be the issue
<stintel> but that SDK is ..
<stintel> gcc 11 doesn't help
<neggles> once you run envsetup it should be using its own precompiled binaries
<neggles> but it's not hugely complex to get the toolchain to build on something semi-recent
<neggles> I have a Dockerfile based on the one that Wireguard uses to build modules for edgeos' v4.9.79 kernel that works
<neggles> i.e. which GCC version you have shouldn't affect whether `oct-remote-reset`/`oct-remote-boot` work
<stintel> dunno, I had to fix uboot and some things
<stintel> but that stupid SDK modifies itself when you build stuff
<stintel> seriously, what monkeys built that
<neggles> ah, yeah, `make clobber` will clean it up though iirc
<neggles> I did `alias snic-uboot-build='make clobber octeon_snic10e_config && make -j$(nproc)'` :P
<stintel> make: *** No rule to make target 'clobber'. Stop.
<stintel> ah that's for uboot
<neggles> yeah
<neggles> the SDK itself you shouldn't need to touch other than running `env-setup`
<neggles> `source env-setup OCTEON_CN66XX --runtime-model --verbose && export OCTEON_REMOTE_PROTOCOL=PCI:0`
<stintel> nah git diff is still unhappy
<stintel> let me start over
<stintel> signin from new location, yeah right
<stintel> heh
<stintel> cool, my gitlab has been active almost every day since may
<stintel> due to adding a mirrored repo ¯\_(ツ)_/¯
<stintel> I'm close to removing my repos there, I really don't like (working with) gitlab
seasonal has quit [Remote host closed the connection]
Tapper has joined #openwrt-devel
strobo has joined #openwrt-devel
strobo_ has quit [Ping timeout: 480 seconds]
victhor has quit [Ping timeout: 480 seconds]
goliath has quit [Quit: SIGSEGV]
dave14305 has joined #openwrt-devel
dave14305 has quit [Remote host closed the connection]
danitool has quit [Quit: Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos]
seasonal has joined #openwrt-devel
Tapper has quit [Ping timeout: 480 seconds]
aiyion_ has quit [Remote host closed the connection]
aiyion_ has joined #openwrt-devel
minimal has joined #openwrt-devel
valku has joined #openwrt-devel
valku has quit []
rua has quit [Quit: Leaving.]
minimal has quit []
<mangix> stintel: neither do I.
<mangix> the web interface is a joke.
<owrt-snap-builds> Build [#356](https://buildbot.openwrt.org/master/images/#builders/65/builds/356) of `archs38/generic` failed.
floof58 has joined #openwrt-devel
floof58_ has quit [Read error: Connection reset by peer]
kenny has quit [Quit: WeeChat 3.1]
Tapper has joined #openwrt-devel
rua has joined #openwrt-devel
noltari has quit [Quit: Bye ~ Happy Hacking!]
noltari has joined #openwrt-devel
gladiac has quit [Quit: k thx bye]
gladiac has joined #openwrt-devel
<neggles> never in my life have I been so happy to see a ping reply
dedeckeh has joined #openwrt-devel
neoraider has quit [Remote host closed the connection]
neoraider has joined #openwrt-devel
neoraider is now known as Guest5844
fotvoren has joined #openwrt-devel
fotvoren has left #openwrt-devel [#openwrt-devel]
victhor has joined #openwrt-devel
danitool has joined #openwrt-devel
Tapper has quit [Ping timeout: 480 seconds]
Borromini has joined #openwrt-devel
dangole has joined #openwrt-devel
dedeckeh has quit [Remote host closed the connection]
rua has quit [Quit: Leaving.]
rua has joined #openwrt-devel
goliath has joined #openwrt-devel
dedeckeh has joined #openwrt-devel
danitool has quit [Quit: Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos]
Grommish has quit [Ping timeout: 480 seconds]
Tapper has joined #openwrt-devel
<stintel> neggles: :)
pmelange has joined #openwrt-devel
pmelange has left #openwrt-devel [#openwrt-devel]
norris has quit [autokilled: Host violated network policy. - Contact support@oftc.net for help. (2021-11-14 15:00:27)]
seasonal has quit [Remote host closed the connection]
minimal has joined #openwrt-devel
giaco has quit [Ping timeout: 480 seconds]
seasonal has joined #openwrt-devel
Tapper has quit [Ping timeout: 480 seconds]
Borromini has quit [Quit: leaving]
AndyCap has quit [Ping timeout: 480 seconds]
dangole_ has joined #openwrt-devel
seasonal has quit [Quit: Page closed]
dangole has quit [Ping timeout: 480 seconds]
dangole has joined #openwrt-devel
dangole_ has quit [Remote host closed the connection]
AndyCap has joined #openwrt-devel
Acinonyx_ has joined #openwrt-devel
Acinonyx has quit [Ping timeout: 480 seconds]
<stintel> root@OpenWrt:/# ip maddr add 225.0.0.50 dev xaui0.31
<stintel> Error: Invalid address length 4 - must be 6 bytes
<stintel> does anyone know the correct syntax ?
<svanheule> stintel: is it supposed to be a MAC address, instead of IP?
<stintel> I was just trying that ;)
<stintel> but "ip maddr" shows in ip4 form too
<stintel> so I wonder what's up with that
<svanheule> man ip-maddress: "This command only manages link-layer addresses."
<stintel> this worked: ip maddr add 01:00:5e:00:00:32 dev xaui0.31
<stintel> I have several pps on that maddr, let's see if that memleaks on octeon :)
<stintel> ok apparently that's not enough to send out igmp join
<stintel> hurricos: do you remember how you got oct-remote-console working ?
Tapper has joined #openwrt-devel
<owrt-snap-builds> Build [#350](https://buildbot.openwrt.org/master/images/#builders/40/builds/350) of `ipq40xx/mikrotik` failed.
<stintel> ok, once I enabled conntrackd on the octeon device, amount of kmalloc-128 objects start growing steadily
<stintel> hmmm but it seems to "recycle" them
floof58 has quit []
floof58 has joined #openwrt-devel
Acinonyx_ has quit [Ping timeout: 480 seconds]
Acinonyx has joined #openwrt-devel
dangole_ has joined #openwrt-devel
dangole has quit [Ping timeout: 480 seconds]
dangole_ has quit [Remote host closed the connection]
dangole_ has joined #openwrt-devel
danitool has joined #openwrt-devel
Borromini has joined #openwrt-devel
floof58 has quit [Remote host closed the connection]
<owrt-snap-builds> Build [#347](https://buildbot.openwrt.org/master/images/#builders/22/builds/347) of `ipq40xx/generic` failed.
floof58 has joined #openwrt-devel
<hurricos> Hey stintel: I don't believe I ever did for sure
<stintel> oh :(
<hurricos> I would strongly recommend looking at other utilities in the SDK.
<hurricos> Obviously the console "works", insofar as all of the other utilies can send or redirect commands to the device's console
<hurricos> even liquidio can do it for sure. But it really should be rewritten cleanly
<stintel> I've now 2 SNIC10E-G in my test box, unfortunately the NAND driver is ancient and will need some refactoring for 5.10
<hurricos> (bleh!)
<hurricos> They're not crashing your test box too often?
<stintel> just pushed fixes for the SPI NOR and added uboot-envtools + /etc/fw_env.config
<stintel> I don't recall if it ever crashed my test box
<stintel> ah, I also had to massage the SDK a bit to get stuff to build on a musl host :P
<hurricos> Your *host* is running OpenWrt?
<stintel> no
<Habbie> why not?
<Habbie> :)
<stintel> Habbie: if I need to be compiling stuff on the host, I rather have a general-purpose distro
<stintel> with gcc only being available in the packages feed ... nuff said
<Habbie> ack, i was kidding, although i was pondering a general-purpose distro on docker on openwrt last week ;)
<stintel> that's a minefield I don't want to step into
<Habbie> i tried just running some regression tests on openwrt a few weeks ago, it was a major pain
<Habbie> (i did not succeed)
<hurricos> Unfortunately a lot of the glue that makes containers 'n' stuff work just isn't there for OpenWrt. Hugely systemd
<stintel> systemdisease :)
<hurricos> Not saying not to fight the good fight. The problem is that people (like me) give up before they succeed.
<Habbie> i never missed systemd when doing things with containers
<Habbie> (and i miss systemd plenty, although procd seems decent)
<hurricos> I'm right now struggling with the MX100 not having ports deterministically named
<hurricos> Or not *declaratively* named, anyways. OpenWrt completely non-mac80211 device naming, expecting the kernel / (procd?) to handle it, but there isn't even a config element in /etc/config/network for what I want
<hurricos> s/but/so/
<hurricos> stintel: try looking at octeon-remote-bootcmd
<hurricos> wow, that is ugly. Never mind. It calls out to octeon-remote.c::octeon_remote_send_bootcmd which dives directly into writing into memory on the Octeon device at 'BOOTLOADER_PCI_READ_BUFFER_DATA_ADDR'
<stintel> lol if I add console=ttyS0,115200 console=ttyS1,115200 to cmdline I get duplicate output
<hurricos> @neggles: oh, hey! How is the performance? Still based on stintel's Linux tree, yes?
<Slimey> lols
<hurricos> stintel: That's strange. I thought ttyS1 mapped to the unpopulated headers near the LED / bracket.
Borromini has quit [Quit: leaving]
philipp64 has quit [Quit: philipp64]
<hurricos> @stintel: I imagine you're also using the oct-remote-console binary shipped with the repo? Have you tried recompiling it?
<stintel> hurricos: I have to recompile everything, remote-lib borks on musl and doesn't detect the octeon devices
<hurricos> Oh, but other things work post-recompilation?
philipp64 has joined #openwrt-devel
<stintel> hurricos: yes, I can boot/load/bootcmd
<hurricos> I'm realizing I've forgotten more than I wanted to. I certainly recall having oct-remote-console work for U-boot based on a re-compiled U-boot sent via oct-boot. However, that sotps working as soon as Linux loads.
<stintel> ah yes, same here
<hurricos> Not unlikely a Cavium patch is needed
<hurricos> Yes, you need Cavium.
<hurricos> See V.
floof58 has quit [Ping timeout: 480 seconds]
<hurricos> See e.g. https://github.com/MarvellEmbeddedProcessors/Octeon-Toolchain's build-51 which provides `toolchain/sdk-external/executive/octeon-pci-console.c`
<hurricos> this is not included in mainline Linux
shibboleth has joined #openwrt-devel
<hurricos> stintel: Rare and glad to see, though, that this repo is developed out in the open. Despite the last update being more than 2y ago ...
<stintel> hurricos: oh, interesting, that is already ported to rawnand
<hurricos> Yes, he is Williams' old boss: https://www.linkedin.com/in/david-daney-b8a36a2/
<hurricos> (lead architeact @ cavium until Feb 2018.)
<hurricos> But seeing that chronology is exactly why I've given up on Cavium Octeon MIPS stuff
<hurricos> the platform is dead: Marvell began the Cavium acquisition in Nov 2017, finished it Jun 2018; in between, David Daney left in Feb '18.
<hurricos> Still ... code's here, so :P
<stintel> yeah
<stintel> bah, already after 22:00
philipp64 has quit [Quit: philipp64]
floof58 has joined #openwrt-devel
<stintel> ugh wtf, arch/mips/cavium-octeon/octeon-nand.c vs drivers/mtd/nand/cavium_nand.c
<stintel> confusing much
<stintel> buuuut maybe the octeon-nand is less old
<Habbie> i don't know what you're doing, but can i be of any help with the octeon you gave me?
<Habbie> go on
<stintel> check the wiki there :)
<Habbie> oh, this is about 10G?
<stintel> it's about PCIe cards built on Octeon SoC
<Habbie> ah
<Habbie> let me try
<Habbie> no the ERL does not fit into my PCIe slot
<stintel> :D
<Habbie> oh i got it in
<Habbie> are the sparks normal?
<swalker> updated openwrt/upstream, https://sdwalker.github.io/uscan/index.html
<stintel> I think so, it's Cavium :P
<Habbie> dual port 10gbe, $20 on ebay
<Habbie> we live in magical times
<stintel> yeah, and it boots OpenWrt, so you can make a 10GbE router with it in theory
<Habbie> right
<Habbie> reminds me of that person who booted linux on their WD SATA drive
<stintel> but the SPI NOR is too small
<Habbie> not from
<Habbie> -on-
<stintel> but the early revisions of the card have NAND as well
<stintel> and that's what I'm trying to access nwo
<Habbie> the day you realise that your computer is a network of devices, some of which allow you access to farther away network of devices, is a magical day
<stintel> :P
floof58 has quit [Ping timeout: 480 seconds]
<neggles> hurricos: yep :) I have some hope that my concept of “router/firewall hiding in the NIC” might actually be achievable
<neggles> it’s worth noting that they’re still doing *some* work on octeons, the toolchain-265 package is only nine months old https://github.com/MarvellEmbeddedProcessors/Octeon-Toolchain/blob/master/toolchain-src-265.0.tar.bz2
<neggles> it’s also an LFS file so that link won’t work oops
<hurricos> neggles: yeah, but not versioned :(
<hurricos> I guess you could unpack and commit each dump in sequence.
<neggles> i have considered doing that, starting with the 5.1 full SDK release
<hurricos> s/versioned/directly in git/. Just makes observability harder is all.
Tapper has quit [Ping timeout: 480 seconds]
<neggles> yeah it’s because it’s just the tools/ directory from the full SDK; I’m still trying to twist their arm for the full SDK matching that version
<neggles> but yeah, I might just extract the tools releases one by one and commit them on top of the 5.1 SDK, then do the same with the kernel sources I’ve found from various versions / vendor gpl tarballs; not sure how useful it’ll be 🤷‍♂️
<hurricos> And while the hardware has XAUI to interact with SFI (for your SFP+ modules), the CPU is very weak. You need to be using the Cavium-specific packet handling hardware to get any real performance
<hurricos> Even so much as passing packets through the standard OpenWrt firewall chain is limited to ~1-2Gbps.
<hurricos> This ignoring the fact that the card draws 30W constantly :grimacing:
<neggles> yeah, the offload / acceleration binaries from EdgeOS 2.0 on an ER-6 should work - same chip generation, just less cores
<hurricos> well, when you say "work" ....
<neggles> it’s just netfilter plugins and I actually have source for some of it
<neggles> ¯\_(ツ)_/¯ what I really want is a nVidia/Mellanox BlueField 2, but they’re four grand (and even if I wanted to pay that, they’re unobtanium atm)
<hurricos> Oh, wow. I did not notice the wiki page here: https://gitlab.com/stintel/openwrt/-/wikis/Cavium-SNIC10E/Hardware
<stintel> hurricos: let's blame gitlab for that :P
<neggles> neither did I…
<stintel> pffft that octeon-nand driver is also a huge mess
<neggles> have we worked out wtf tiny switch is for?
<hurricos> stintel: Hey there. For this page (https://gitlab.com/stintel/openwrt/-/wikis/Cavium-SNIC10E/Hardware) svanheule should also note the details on the barcode to the far right (4.0G1345-GB000365)
<hurricos> '1345' is the bit that varies throughout the adapters -- earlier (e.g. 1337) has female connectors for serial, instead of male ones, etc. etc.
<neggles> the other odd thing is that these cards shipped with backup bootloaders present, while liquidio adapters usually don’t have that, you have to set a register in the Vitesse PHY to invert the RX loss signal, and XAUI0 is connected to PHY1 / vice versus
<neggles> (I checked the crosspoint registers, it’s not flipped inside the chip)
<neggles> might be an idea to flip those 3 bits so int 0 = int 0
<hurricos> neggles: Do you have a raw copy of the NOR hanging around anywhere?
<neggles> i have a dump from mine yes
<hurricos> Would you mind submitting it to e.g. https://paste.c-net.org/ ?
<neggles> NAND was completely blank
<neggles> but also has zero bad sectors!
floof58 has joined #openwrt-devel
<neggles> sure, I can give you the boot app binary from the jffs2 part as well
<stintel> Slimey: dafuq
<Slimey> lol i dunno
<Slimey> i mean even with two screws you got it
<stintel> someone hoarded too many rolls of toilet paper during first wave? :P
<Slimey> looks that way
<hurricos> ehh.
<hurricos> I wanted to go back and compare it to lio_210sv_nic.bin to see if I could shim it in to get liquidio working, but the passion is gone ._.
<stintel> I'm arriving to that point again after some attempts to get NAND working :P
<hurricos> It sucks. Argh!
<stintel> it's probably going to be a better idea to rewrite the NAND driver
dedeckeh has quit [Remote host closed the connection]
<neggles> oh I am pretty sure we can get liquidio working just by changing the TLV EEPROM board ID
<neggles> and using a version of u-boot with the right bits set in config
<hurricos> Well, liquidio can't upload firmware to the c.. yeha.
<hurricos> TLV?
<neggles> liquidio does in fact upload the firmware
<neggles> the firmware fails because the board ID is wrong
<hurricos> You do need to have u-boot willing to accept it is the problem
<neggles> there’s a 24c256 eeprom on the board which contains the board version, RAM settings, and MAC addresses
Tusker has joined #openwrt-devel
<neggles> changing the board ID from 0x50 (SNIC10E) to <value I forgot> (NIC210NV or NIC210SV ones) should do it
<neggles> u-boot tlv_eeprom command
<neggles> but I’ve also got a fully functional u-boot running out of the CFI NOR
<hurricos> boot-app needs to be unwrapped from its elf wrapper
<hurricos> Oh, there are even more AMZN-specific strings. Never mind, blah
<neggles> all the octeon boot commands just take an elf
<hurricos> I'm thinking the wrong way around, the liquidio firmwares are actually *themselves* ELFs wrapped in extra config.
Tapper has joined #openwrt-devel
<neggles> they’re just cse binaries with some lio specific features turned on
<hurricos> Right, I know
<neggles> you can build a liquidio cse with the 5.1 sdk
<hurricos> you what?
<hurricos> How so?
<neggles> add --liquidio to the env-setup command line
<neggles> and add a few lines to the u-boot config
<neggles> then build simple-executive
<neggles> look at the nic210nvg u-boot config to see the differences
<hurricos> I see no `simple-executive` Makefile target anywhere
<neggles> if you run a plain “make” in the sdk tools dir
<neggles> it’s one of the targets in there iirc
<neggles> but I should get out of bed and look on my actual PC
<hurricos> is my copy of the SDK incomplete?
<neggles> you’re using the IM8724 v5.1 one yeah?
<hurricos> Yes.
<neggles> it should have it; it’s also a target in the toolchain tar.bz2s from the Marvell GitHub but those are missing simple exec code
<hurricos> No, looks like I'm looking for a path like octeon/se/apps/nic/cvmcs-nic-main.c
floof58 has quit [Ping timeout: 480 seconds]
<neggles> hmm you're right, you can build the u-boot with support for oct-remote-app-ctl but not the actual firmware blob it seems
<hurricos> Let me see if I have any computers that can read disks, I did get a uh
floof58 has joined #openwrt-devel
<hurricos> which I still have, though the board is so warped it's unlikely to actually *work* :grimacing:
<hurricos> "EP6600C"
<hurricos> though I suspect this board is actually a EP6300C
<hurricos> my desktop has a disk drive. I am saved
<neggles> https://github.com/neg2led/octeon-sdk-51/tree/snic10e-dev <-- this is what i've done so far, but you're right, no liquidio firmware source in here
<neggles> this does make a u-boot with the liquidio pcie hotplug stuff for oct-remote-app-ctl enabled, and proper
<neggles> er, a proper DTS that matches these actual cards, and UBIFS/NAND support as well (fat-fingered the enter key)
<hurricos> I just remembered I pilfered one of the SATA cables for my RAID1 array
<hurricos> so my disk drive isn't attached to the motherboard (sigh)
<hurricos> looks like the BIOS disagrees that there's a disk drive now
<hurricos> brb
hurricos has quit [Quit: WeeChat 2.8]
hurricos has joined #openwrt-devel
<hurricos> OK
<neggles> thought so, the lio_210nv and lio_210sv firmware bins are looking for the board ID number in the TLV EEPROM to match
<hurricos> how can you tell?
rmilecki has quit [Ping timeout: 480 seconds]
jlsalvador has quit [Remote host closed the connection]
<hurricos> that is, what mechanism is used? The 210sv is the fw that gets loaded by liquidio for this board, fwiw
<neggles> function that iterates through an enum
jlsalvador has joined #openwrt-devel
<neggles> of all the board types
<neggles> strip the first 1312 bytes off the lio_210sv_nic.bin and load it into ghidra :P
<hurricos> so, I suppose I could just ... screw the function?
<hurricos> I could go either way, edit the fw file or the TLV EEPROM.
<neggles> it appears that SNIC10E is in the supported list there, but then the LIO driver on the host side rejects it for invalid board ID
<hurricos> oh, OK
<hurricos> u-boot tlv_eeprom grants *write* access, as well, to the eeprom?
<neggles> yep
<neggles> full get/set and it even has help
<neggles> if you do an `i2c md 0x53 0.1 0x100` (iirc) you'll find it's a very simple format too
<neggles> driver is expecting 0x3f and it gets 0x32
<neggles> that's interesting. in this version of the SDK, 0x3f (63) is CVMX_BOARD_TYPE_NIC210NVG
<neggles> and it's called that in the lio_210nv_nic.bin as well...
<hurricos> The SDK doesn't have it. Checking now whether the OCTEON-LINUX rpm has it
<hurricos> nor any references to liquidio
<dwfreed> is there a mapping somewhere of all targets to package architecture?
<dwfreed> I build a third party package, and want to make sure I'm building it for all arches
<neggles> hurricos: the 210nv/210sv public liquidio bins do not have vsc8488 support in there, only vsc8490 (next gen replacement) :(
<neggles> grr
<neggles> guess I need to hound my marvell guy some more
<hurricos> gah
<owrt-snap-builds> Build [#357](https://buildbot.openwrt.org/master/images/#builders/65/builds/357) of `archs38/generic` completed successfully.
dwfreed has quit [Quit: ZNC - http://znc.in]
dwfreed has joined #openwrt-devel