When running freebsd a a pseries guest with a SPAPR network interface, we have some weird behaviour. ``` root@:~ # dmesg | grep llan0 llan0: <POWER Hypervisor Virtual Ethernet> irq 16781570 on vdevice0 llan0: Ethernet address: 52:54:00:93:82:ce llan0: link state changed to UP root@:~ # ``` and ``` root@:~ # sysctl dev.llan.0 dev.llan.0.%iommu: dev.llan.0.%parent: vdevice0 dev.llan.0.%pnpinfo: name=l-lan compat=IBM,l-lan dev.llan.0.%location: dev.llan.0.%driver: llan dev.llan.0.%desc: POWER Hypervisor Virtual Ethernet ``` ok, and ``` cpu0: IBM POWER9 revision 2.2, 3000.00 MHz cpu0: Features dc007182<PPC32,PPC64,ALTIVEC,FPU,MMU,SMT,ISNOOP,ARCH205,ARCH206,VSX,TRUELE> cpu0: Features2 bee00000<ARCH207,DSCR,ISEL,TAR,VCRYPTO,ARCH300,IEEE128,DARN> real memory = 4249452544 (4052 MB) avail memory = 4063674368 (3875 MB) FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs ``` It's a power9 pseries VM ok, and ``` root@:~ # ifconfig llan0 llan0: flags=1008802<BROADCAST,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500 options=0 ether 52:54:00:93:82:ce media: Ethernet autoselect status: active nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> root@:~ # ``` but when i run dhclient ... ``` root@:~ # dhclient llan0 DHCPDISCOVER on llan0 to 255.255.255.255 port 67 interval 8 Jan 3 20:30:06 dhclient[1594]: send_packet: Network is down ^C root@:~ # Jan 3 20:30:08 dhclient[1594]: connection closed Jan 3 20:30:08 dhclient[1594]: exiting. root@:~ # ifconfig llan0 llan0: flags=1008803<UP,BROADCAST,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500 options=0 ether 52:54:00:93:82:ce media: Ethernet autoselect status: active nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> root@:~ # ``` however, programming in /an/ IP address works, and programming in an IP address and then runnign dhclient works, ie ``` root@:~ # ifconfig llan0 inet 0.0.0.0/24 root@:~ # dhclient llan0 DHCPDISCOVER on llan0 to 255.255.255.255 port 67 interval 8 DHCPOFFER from 192.168.100.1 DHCPREQUEST on llan0 to 255.255.255.255 port 67 DHCPACK from 192.168.100.1 bound to 192.168.100.179 -- renewal in 1800 seconds. root@:~ # ifconfig llan0 llan0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500 options=0 ether 52:54:00:93:82:ce inet 192.168.100.179 netmask 0xffffff00 broadcast 192.168.100.255 media: Ethernet autoselect status: active nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> root@:~ # ```
also ``` FreeBSD 15.0-RELEASE FreeBSD 15.0-RELEASE releng/15.0-n280995-7aedc8de6446 GENERIC powerpc ```
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=74dff310698b9a4da9804ed0ded00428b0aebbe8 commit 74dff310698b9a4da9804ed0ded00428b0aebbe8 Author: Justin Hibbits <jhibbits@FreeBSD.org> AuthorDate: 2026-04-23 03:12:37 +0000 Commit: Justin Hibbits <jhibbits@FreeBSD.org> CommitDate: 2026-04-24 02:24:13 +0000 pseries/llan: call init when ioctl sets interface UP This should fix dhcp on an unitialized interface. This solution was found while comparing against another driver, SIOCSIFFLAGS is used by dhclient to force the interface up before it has an IP address. However, all setup work is done in llan_init(), so the interface would not be enabled if configured via only the SIOCSIFFLAGS ioctl. By running llan_init() when the interface is forced up via SIOCSIFFLAGS, the interface is initialized properly. PR: 292164 sys/powerpc/pseries/phyp_llan.c | 4 ++++ 1 file changed, 4 insertions(+)
Thank you for looking at this, Justin. I've just made a quick test with FreeBSD-16.0-CURRENT-powerpc-powerpc64-20260428-551d47c5677a-285508-bootonly.iso and it works as expected now.
ok, should mfc this to 15 and 14, then we can close
^Triage: Set MFC flags.
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=237e851009e81f519a0fcb57220cff0d35223b88 commit 237e851009e81f519a0fcb57220cff0d35223b88 Author: Justin Hibbits <jhibbits@FreeBSD.org> AuthorDate: 2026-04-23 03:12:37 +0000 Commit: Justin Hibbits <jhibbits@FreeBSD.org> CommitDate: 2026-05-20 01:52:50 +0000 pseries/llan: call init when ioctl sets interface UP This should fix dhcp on an unitialized interface. This solution was found while comparing against another driver, SIOCSIFFLAGS is used by dhclient to force the interface up before it has an IP address. However, all setup work is done in llan_init(), so the interface would not be enabled if configured via only the SIOCSIFFLAGS ioctl. By running llan_init() when the interface is forced up via SIOCSIFFLAGS, the interface is initialized properly. PR: 292164 (cherry picked from commit 74dff310698b9a4da9804ed0ded00428b0aebbe8) sys/powerpc/pseries/phyp_llan.c | 4 ++++ 1 file changed, 4 insertions(+)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=0b158de1109174cd5a189e244198ee02062984f0 commit 0b158de1109174cd5a189e244198ee02062984f0 Author: Justin Hibbits <jhibbits@FreeBSD.org> AuthorDate: 2026-04-23 03:12:37 +0000 Commit: Justin Hibbits <jhibbits@FreeBSD.org> CommitDate: 2026-05-20 01:55:31 +0000 pseries/llan: call init when ioctl sets interface UP This should fix dhcp on an unitialized interface. This solution was found while comparing against another driver, SIOCSIFFLAGS is used by dhclient to force the interface up before it has an IP address. However, all setup work is done in llan_init(), so the interface would not be enabled if configured via only the SIOCSIFFLAGS ioctl. By running llan_init() when the interface is forced up via SIOCSIFFLAGS, the interface is initialized properly. PR: 292164 (cherry picked from commit 74dff310698b9a4da9804ed0ded00428b0aebbe8) sys/powerpc/pseries/phyp_llan.c | 4 ++++ 1 file changed, 4 insertions(+)
Changes have been MFC'd to stable/15 and stable/14.