Date: Tue, 25 Oct 2022 16:13:46 +0200 (CEST) From: Ronald Klop <ronald-lists@klop.ws> To: Mike Karels <mike@karels.net> Cc: freebsd-arm@freebsd.org Subject: Re: wake-on-lan lost from rpi4 (works on rpi3) Message-ID: <1407175820.10534.1666707226593@localhost> In-Reply-To: <64FDF71E-B0B8-4625-833E-CCA62785DEB4@karels.net> References: <108673236.151493.1666699064016@localhost> <64FDF71E-B0B8-4625-833E-CCA62785DEB4@karels.net>
next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_10533_55839858.1666707226554 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Van: Mike Karels <mike@karels.net> Datum: dinsdag, 25 oktober 2022 14:55 Aan: Ronald Klop <ronald-lists@klop.ws> CC: freebsd-arm@freebsd.org Onderwerp: Re: wake-on-lan lost from rpi4 (works on rpi3) > > On 25 Oct 2022, at 6:57, Ronald Klop wrote: > > > Hi, > > > > When I do "wake ue0 `cat /home/ronald/freenas.ethernet `" on my RPI3B+ my NAS boots and tcpdump shows the following line on my rpi3 as well as on my router. > > 13:39:44.344111 IPX 00217046.6c:da:00:21:70:46.6cda > 00217046.6c:da:00:21:70:46.6cda: ipx-#6cda 65505 > > > > When I do "wake genet0 `cat /home/ronald/freenas.ethernet `" on my RPI4 my NAS does not boot and tcpdump only show this on my rpi4 and *not* on my router. > > 13:37:26.448251 IPX 00217046.6c:da:00:21:70:46.6cda > 00217046.6c:da:00:21:70:46.6cda: ipx-#6cda 65505 > > > > Firewall ipfw does not indicate that it blocks anything. > > > > RPI4 runs: > > FreeBSD rpi4 14.0-CURRENT FreeBSD 14.0-CURRENT #11 main-4f0c9b76cf: Sat Aug 13 23:59:19 CEST 2022 ronald@rpi4:/home/ronald/dev/obj/home/ronald/dev/freebsd/arm64.aarch64/sys/GENERIC-NODEBUG arm64 > > > > genet0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 > > options=68000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6> > > > > > > RPI3 runs: > > FreeBSD rpi3 13.1-RELEASE-p2 FreeBSD 13.1-RELEASE-p2 GENERIC arm64 > > > > ue0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 > > options=80009<RXCSUM,VLAN_MTU,LINKSTATE> > > > > > > Does genet0 not support these packages? > > What can prevent this packet to go on the ethernet while tcpdump still shows it is outgoing on the interface? > > genet0 does have a vlan configured connected to a bridge0 for some jails > > vlan3: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 > > options=80000<LINKSTATE> > > groups: vlan > > vlan: 3 vlanproto: 802.1q vlanpcp: 0 parent interface: genet0 > > > > ue0 is itself connected to a bridge0 > > Is the RPI3 also on a vlan and bridge? > > Is the router (or switch) expecting the packet on the vlan? > If so, maybe you need to send on vlan3 rather than genet0. > > The genet interface has some oddities about packet layouts; > that could be hitting here. You could try disabling TCP TX > checksum offload: ifconfig genet0 -txcsum -txcsum6; that > simplifies some of the issues. > > Mike > > > Regards, > > Ronald. Hi, Thanks for the hint. I experimented some further. Disabling -txcsum -rxcsum didn't matter. But when I use bridge0 or vlan3 as device then it goes into the wire but on the VLAN which is not where my NAS is which I want to boot. Looking at the driver I found this interesting peace of code. static int gen_parse_tx(struct mbuf *m, int csum_flags) { ... if (ether_type == ETHERTYPE_IP) { COPY(((struct ip *)p)->ip_hl << 2); offset += ((struct ip *)p)->ip_hl << 2; } else if (ether_type == ETHERTYPE_IPV6) { COPY(sizeof(struct ip6_hdr)); offset += sizeof(struct ip6_hdr); } else { /* * Unknown whether other cases require moving a header; * ARP works without. */ } ... } There is also some code which handles EHTERTYPE_VLAN. I don't have time to start debugging this today. But would this ring a bell to anybody in connection to a wake-on-lan packet? Regards, Ronald. ------=_Part_10533_55839858.1666707226554 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <html><head></head><body> <p><strong>Van:</strong> Mike Karels <mike@karels.net><br> <strong>Datum:</strong> dinsdag, 25 oktober 2022 14:55<br> <strong>Aan:</strong> Ronald Klop <ronald-lists@klop.ws><br> <strong>CC:</strong> freebsd-arm@freebsd.org<br> <strong>Onderwerp:</strong> Re: wake-on-lan lost from rpi4 (works on rpi3)</p> <blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: #000000 2px solid; margin-right: 0px"> <div class="MessageRFC822Viewer" id="P"> <div class="TextPlainViewer" id="P.P">On 25 Oct 2022, at 6:57, Ronald Klop wrote:<br> <br> > Hi,<br> ><br> > When I do "wake ue0 `cat /home/ronald/freenas.ethernet `" on my RPI3B+ my NAS boots and tcpdump shows the following line on my rpi3 as well as on my router.<br> > 13:39:44.344111 IPX 00217046.6c:da:00:21:70:46.6cda > 00217046.6c:da:00:21:70:46.6cda: ipx-#6cda 65505<br> ><br> > When I do "wake genet0 `cat /home/ronald/freenas.ethernet `" on my RPI4 my NAS does not boot and tcpdump only show this on my rpi4 and *not* on my router.<br> > 13:37:26.448251 IPX 00217046.6c:da:00:21:70:46.6cda > 00217046.6c:da:00:21:70:46.6cda: ipx-#6cda 65505<br> ><br> > Firewall ipfw does not indicate that it blocks anything.<br> ><br> > RPI4 runs:<br> > FreeBSD rpi4 14.0-CURRENT FreeBSD 14.0-CURRENT #11 main-4f0c9b76cf: Sat Aug 13 23:59:19 CEST 2022 ronald@rpi4:/home/ronald/dev/obj/home/ronald/dev/freebsd/arm64.aarch64/sys/GENERIC-NODEBUG arm64<br> ><br> > genet0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500<br> > options=68000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6><br> ><br> ><br> > RPI3 runs:<br> > FreeBSD rpi3 13.1-RELEASE-p2 FreeBSD 13.1-RELEASE-p2 GENERIC arm64<br> ><br> > ue0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500<br> > options=80009<RXCSUM,VLAN_MTU,LINKSTATE><br> ><br> ><br> > Does genet0 not support these packages?<br> > What can prevent this packet to go on the ethernet while tcpdump still shows it is outgoing on the interface?<br> > genet0 does have a vlan configured connected to a bridge0 for some jails<br> > vlan3: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500<br> > options=80000<LINKSTATE><br> > groups: vlan<br> > vlan: 3 vlanproto: 802.1q vlanpcp: 0 parent interface: genet0<br> ><br> > ue0 is itself connected to a bridge0<br> <br> Is the RPI3 also on a vlan and bridge?<br> <br> Is the router (or switch) expecting the packet on the vlan?<br> If so, maybe you need to send on vlan3 rather than genet0.<br> <br> The genet interface has some oddities about packet layouts;<br> that could be hitting here. You could try disabling TCP TX<br> checksum offload: ifconfig genet0 -txcsum -txcsum6; that<br> simplifies some of the issues.<br> <br> Mike<br> <br> > Regards,<br> > Ronald.</div> </div> </blockquote> <br> <br> Hi,<br> <br> Thanks for the hint. I experimented some further.<br> <br> Disabling -txcsum -rxcsum didn't matter.<br> <br> But when I use bridge0 or vlan3 as device then it goes into the wire but on the VLAN which is not where my NAS is which I want to boot.<br> <br> Looking at the driver I found this interesting peace of code.<br> <br> static int<br> gen_parse_tx(struct mbuf *m, int csum_flags) {<br> ...<br> if (ether_type == ETHERTYPE_IP) {<br> COPY(((struct ip *)p)->ip_hl << 2);<br> offset += ((struct ip *)p)->ip_hl << 2;<br> } else if (ether_type == ETHERTYPE_IPV6) {<br> COPY(sizeof(struct ip6_hdr));<br> offset += sizeof(struct ip6_hdr);<br> } else {<br> /*<br> * Unknown whether other cases require moving a header;<br> * ARP works without.<br> */<br> }<br> ...<br> }<br> <br> There is also some code which handles EHTERTYPE_VLAN.<br> <br> I don't have time to start debugging this today. But would this ring a bell to anybody in connection to a wake-on-lan packet?<br> <br> <br> Regards,<br> Ronald.<br> </body></html> ------=_Part_10533_55839858.1666707226554--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1407175820.10534.1666707226593>