**** BEGIN LOGGING AT Mon Apr 05 02:59:56 2021 Apr 05 03:49:48 Hello, I've been working on protocol in luci and netifd for about a day. I'm stuck, but let me dump what pain points I've experienced thus far. Apr 05 03:51:16 netifd: Testing the protocol script. I know about `-n`, I assume that's `ash -n`, but this didn't allert to the syntax error in my script. I attempted to call my protocol `bonding-slave`... Apr 05 03:52:07 The fix was to rename to `bonding_slave`, but I only got an error when booting up... Yes, I've been having to reboot. Apr 05 03:53:21 I've asked about user support regarding this on #openwrt and have had no response and I don't think it's an appropriate topic here. Apr 05 03:55:18 I'll try and pastebin my current code, but that's steps ahead. Apr 05 04:01:17 http://ix.io/2V4Z http://ix.io/2V50 http://ix.io/2V55 Apr 05 04:04:49 I was like, ohh shoot, I forgot to update the copyright... Then there wasn't one. Apr 05 04:09:00 This may be a question better answered in ##javascript I've noticed that one can't effectively interrogate scopes, like that of `bonding_slave.js`. Is there a way to add the scope to `global` or something to export it, for debugging? Apr 05 04:10:37 ...I mean I know I can add things to `global`, what I'm asking is can I then debug the data in the JS console. Instead of calling `console.log` on everything. Apr 05 04:12:28 I think I'm at my ask, finally, I'm trying to get the interface created with `bonding_slave.js` to show up in the slaves menu of a bridge? Apr 05 04:13:57 AYCS I've implemented `getIfname` and no such luck. Ohh, there is also the issue of netifd not being able to bring up the interface... working on it. Apr 05 04:16:07 The NEXT project I plan to tackle is `brtables` SNAT and DNAT for WiFi devices, some need arp proxy like shinanagains. Apr 05 04:34:52 cheakoirccloud: Hang around ifyou can to a catch any replies.. People are coming and going Apr 05 06:37:25 I'm wondering what `address-external` does? It's the 3rd parameter to `proto_init_update` in netifd. Apr 05 08:07:12 Grommish: pong Apr 05 10:43:33 Hauke: I got feedback from jwh with software polling (instead of hardware auto polling) for the RMII PHY on the 7360: that fixes these ports Apr 05 12:05:32 xdarklight: nice Apr 05 12:06:28 xdarklight: do you kown the settings used with the old driver on the 7412? Apr 05 12:07:25 xdarklight: maybe we should always configure the mac like phylink suggestes from the SW and use the auto polling only for link up Apr 05 12:08:31 xdarklight: for the 7412 it works when flow controll is off, flow controll could also explain the problems occurring after some time. It could be that something is not able to handle pause frames Apr 05 12:09:25 Hauke: https://github.com/openwrt/openwrt/blob/180c4635265b4907221a62b3068ac89447cd83d7/target/linux/lantiq/patches-5.4/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch#L1442 - the old driver also did not use auto polling Apr 05 12:10:12 Hauke: I can ask the person with 7412 to test with the software polling patch as used on the 7360 Apr 05 12:11:09 yes that would be nice Apr 05 12:11:22 if this does not work, I would suggest to force flow controll off Apr 05 12:13:04 Hauke: interestingly the old driver does not do any flow control configuration, while I came up with this: https://github.com/xdarklight/linux/commit/3ecb7fbe0a3415d305bd92e10d02a47132272052#diff-ef37c1cd49259d486f2056f660782e01e91ac8be863d1dc426a66e15de44a4ecR1552 Apr 05 12:14:35 xdarklight: shouldn't it be sufficent to set this only in gswip_phylink_mac_link_up ? Apr 05 12:15:45 Hauke: I did it like this for two reasons: 1) gswip_phylink_mac_link_up doesn't have the speed/duplex/etc. arguments on 5.4 and 2) I wanted to have separate functions to make it easier to read anyways. so it'll be easy to change Apr 05 12:17:07 xdarklight: I would call gswip_port_set_pause() with tx_pause and rx_pause as seperate parameters Apr 05 12:17:18 that should make it easier at least for upstream Apr 05 12:18:24 sure, I can do that Apr 05 12:26:41 xdarklight: looks good Apr 05 16:01:23 Hauke: This is what I call a clusterfuck… https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/fs/ubifs/sb.c?h=linux-5.10.y#n54 Apr 05 16:06:00 Hauke: blogic_: can I get an Ack for http://lists.openwrt.org/pipermail/openwrt-devel/2021-March/034280.html ? Apr 05 16:06:15 rsalvaterra: it was worse some time ago: https://git.kernel.org/linus/d62e98ed1efcaa94caa004f622944afdce5f1c3c Apr 05 16:06:30 I'd like to bump to 1.0.9 too to fix some memory leaks related to a CVE Apr 05 16:07:21 Yeah, but not even considering zstd, when it should be the default, if available? Jeez… :/ Apr 05 16:08:19 I'm going to cook an upstream patch and see if it sticks… Apr 05 16:08:42 * rsalvaterra is still waiting for comments/insults on his jffs2 zstd patch… Apr 05 16:12:41 rsalvaterra: thanks for taking care of this Apr 05 16:13:01 Hauke: Don't mention it, just scratching my own itches. ;) Apr 05 16:14:46 Even if for some unfathomable reason my patch doesn't stick, It's probably a good idea to integrate it in OpenWrt. It will make the zstd migration easier, in the long run, won't it? Apr 05 16:18:54 Hauke: thanks - thought that would add the acked-by to all of the patches in the series but apparently not, ok to add it to patch 1-3 and leave it out of the lldpd dependency ? Apr 05 16:23:02 stintel: ok Apr 05 16:23:05 thanks! Apr 05 16:31:02 Hauke: https://lore.kernel.org/linux-mtd/20210405152935.148129-1-rsalvaterra@gmail.com/ Apr 05 16:31:06 Let's see how it goes… Apr 05 17:33:48 back Apr 05 18:08:17 Hauke: https://github.com/openwrt/openwrt/pull/3085#issuecomment-813508417 Apr 05 18:24:30 xdarklight: nice Apr 05 18:24:59 I think the isolation is not needed Apr 05 18:27:37 Hauke: I added it in case some weird bootloader sets it. or do you mean it doesn't have to be changed at runtime (only at initialization time)? Apr 05 18:41:25 xdarklight: I think we should only set it at initialisation Apr 05 18:46:42 xdarklight: which bootloader configures isolation mode? Apr 05 18:52:14 Hauke: not sure. it was one of the experiments I did with jwh to get it the two RMII ports on the 7360 working Apr 05 18:57:30 xdarklight: I do not know if setting GSWIP_MDIO_PHY is still needed Apr 05 18:57:37 when we configure the MAC explicitly Apr 05 18:58:34 xdarklight: will you clean the patches up and send them upstream? Apr 05 19:50:52 Common sense prevailed, thankfully… https://www.techdirt.com/articles/20210405/09243546552/supreme-court-sides-with-google-decade-long-fight-over-api-copyright-googles-copying-java-api-is-fair-use.shtml Apr 05 20:32:21 Hauke: ok, I'll unset the isolation bit only in gswip_setup. whether GSWIP_MDIO_PHY is needed or not: I don't know. I can try removing it and let people test again Apr 05 20:32:26 Hauke: do you have any other clean-ups in mind? Apr 05 21:06:52 xdarklight: you should shaush some of these patches together Apr 05 21:07:18 one patch sets GSWIP_MII_CFG_RATE_AUTO and the next one removes it again Apr 05 21:07:30 Hauke: ah, this I can do Apr 05 21:07:54 Hauke: I already squashed the isolation one with the next one which configures the remaining MII_CFG registers Apr 05 21:08:09 setting the mdio_phy register too should be ok Apr 05 21:08:18 it does not hurd if it is not needed Apr 05 21:08:53 xdarklight: where do I find the most recent version? Apr 05 21:09:10 Hauke: let me push it Apr 05 21:10:08 Hauke: https://github.com/xdarklight/linux/commits/lantiq-random-network-fixes-20210405 Apr 05 21:11:28 Hauke: the GSWIP_MII_CFG_RATE_AUTO one is already upstream so I will not squash it. it at least fixed the Gbit/s ports with RGMII PHY on the Fritz 7490 according to some user so I am not asking for a revert of that Apr 05 21:12:06 ah ok, I was not aware of that Apr 05 21:12:55 Hauke: for reference: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=3e6fdeb28f4c331acbd27bdb0effc4befd4ef8e8 Apr 05 21:13:11 ok, I just remembered Apr 05 21:14:24 xdarklight: I am not sure if the configuration of the MAC should be done in the gswip_phylink_mac_config() and gswip_phylink_mac_link_up() Apr 05 21:15:38 Hauke: it's also not 100% clear to me so that's why I would send it as RFC. I found different example: some configuring the LINK_UP register in _phylink_mac_link_{up,down} and others are doing it (additionally) in _phylink_mac_config Apr 05 21:20:31 xdarklight: you could write GSWIP_MAC_CTRL_0_FCS_EN BIT(7) and same for PADEN Apr 05 21:21:29 Hauke: will change this. in general I think the whole driver could make use of GENMASK and FIELD_PREP() to make the code easier to read Apr 05 21:22:05 didn't know FIELD_PREP() Apr 05 21:23:16 I believe that I already converted most of the non-lantiq drivers for which I am responsible by now. but certainly I also started without FIELD_PREP Apr 05 21:24:26 xdarklight: the autopoling is disabled for all ports by default so you do not have to manually disable it again Apr 05 21:25:12 the change in gswip_setup is not needed Apr 05 21:25:23 Quick question, trying to get the libcap binaries installed on 19.07 but the -bin package seems to be missing. Is anyone able to push it to https://downloads.openwrt.org/releases/19.07.7/packages/ or is it build it myself situation? Apr 05 21:28:18 xdarklight: Is regs->version correct? Is this the version of the HW and not the version of the regs format? Apr 05 21:30:41 Hauke: for regs->version I used this as reference: https://elixir.bootlin.com/linux/v5.12-rc6/source/drivers/net/dsa/mv88e6xxx/chip.c#L1158 Apr 05 21:31:07 hmm ok Apr 05 21:31:09 Hauke: I can drop disabling the auto-polling mechanism, but I think it's a good idea to be clear it anyways in case any of the bootloaders sets it Apr 05 21:31:42 it is unset here: gswip_mdio_w(priv, 0x0, GSWIP_MDIO_MDC_CFG0); Apr 05 21:32:17 oh, I missed that. thanks! Apr 05 21:34:06 I'll remove the newly added code but update the comment above that line with the AR8030 example Apr 05 21:34:16 ok Apr 05 21:34:44 I would combine the "net: dsa: lantiq_gswip: Configure all remaining GSWIP_MII_CFG bits" and the "net: dsa: lantiq_gswip: Don't use PHY auto polling - WiP " commit into one Apr 05 21:35:06 at least this split is not so good becasue you revert some changes in the next commit again Apr 05 21:36:06 Hauke: I think you're right for the GSWIP_MII_CFG_RATE_* bits. GSWIP_MII_CFG_RMII_CLK and GSWIP_MII_CFG_RGMII_IBS can be part of a separate patch IMO Apr 05 21:36:30 yes, that split is good Apr 05 21:38:16 why don't you disbale the link in the setip function any more? Apr 05 21:40:05 xdarklight: could you add a comment to GSWIP_MII_CFG_RMII_CLK (the definition or the useage): 1: RMII clock is output Apr 05 21:41:21 I haven't found a DSA interface to configure this, so output should be the default option to match RMII specification when it is conencted to only the one PHY Apr 05 21:41:49 Hauke: okay. I think similar to the RGMII RX/TX delay it's probably more phylink specific rather than DSA specific Apr 05 21:42:17 xdarklight: ok, but I also haven't seen there any support ;-) Apr 05 21:42:32 :-) Apr 05 21:42:34 as I do not have any device which uses it, just set it Apr 05 21:43:52 yep, that's what was tested by jwh on the 7360 also Apr 05 21:44:59 Hauke: RE disabling the link in .setup: I just force pushed - can you please double-check with the latest code? looks good to me Apr 05 21:45:43 in the reg debug commit: You can also print gswip_switch_r(priv, GSWIP_MAC_PSTATp(port)); for the CPU port Apr 05 21:46:44 done :) Apr 05 21:47:17 DSA doesn't have support for getting stats on the CPU port but I think it's still good to be prepared for whenever that is added Apr 05 21:51:09 xdarklight: looks good Apr 05 21:54:26 xdarklight: you can add my Acked-by to the first 3 patches Apr 05 21:56:58 Hauke: thanks :) Apr 05 22:50:36 xdarklight: for the TP-Link vr200v port 1 and port 3 are mixed up in the DSA pull request Apr 06 02:18:16 russell--: not sure if you had time for review, but the NLS fixes already merged, and I've added them to a backport PR. Would appreciate if you and nbd could confirm it looks OK: https://github.com/openwrt/openwrt/pull/4025. Thanks again. Apr 06 02:26:15 aparcar[m]: Hi Paul, any update on the libelf conversations you mentioned before? If there are still questions/concerns probably best to review and post in my BTF PR. Cheers. **** ENDING LOGGING AT Tue Apr 06 02:59:57 2021