<div dir="ltr"><div>Hi James,</div><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 2, 2021 at 1:50 PM James Feeney <<a href="mailto:james@nurealm.net">james@nurealm.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 12/2/21 08:41, Brian Hutchinson wrote:<br>
> Yup, I'm using systemd-networkd ... I think I have to in order to leverage network-online.target etc., and set up my network (bonding in this case) with .netdev and .network files in /etc/systemd/network.<br>
<br>
You don't "have" to do anything.  It is a choice.  Other network managers you might consider include:<br>
ConnMan<br>
netctl<br>
NetworkManager<br>
Wicd<br>
<br>
> What kind of platform are you on?  PC, embedded?<br>
<br>
Just Arch Linux on various PCs, but, if you are already running systemd, I don't expect that the hardware makes any difference.<br>
<br>
> Can you give an example of what this would look like?<br>
<br>
I could, but, unless you want to abandon systemd-networkd for some reason, and also not consider some of the other popular network management systems, there would be no point.<br></blockquote><div><br></div><div>Well, I'm on an embedded imx8 platform and my ethernet interface is an Ethernet Switch ;)  I have to bust that switch up into individual network interfaces with DSA (Distributed Switch Architecture) so everything is wildly different than just a simple, normal NIC interface.  I have no display/graphics, keyboard etc., so I can't just use a 'normal' network manager most are familiar with.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> ... but I can also check carrier of my interfaces ...<br>
<br>
The kernel bonding module is its own thing, and automatically monitors the state of its slave devices and manages the state of its virtual interface.  I don't know why you would want to bother with the carrier state of - presumably - an ethernet device, or whatever.  If there were a problem with the bonding module, that would be an entirely separate issue.<br></blockquote><div><br></div><div>I think I found my issue.  I've got a fairly new systemd but looks like I'm missing this patch:</div><div> <a href="https://github.com/systemd/systemd/pull/14536/commits/75cd4a5d929480055c74d14fef6f25c9e0e966e0">https://github.com/systemd/systemd/pull/14536/commits/75cd4a5d929480055c74d14fef6f25c9e0e966e0</a></div><div><br></div><div>... so I cannot specify my bond1 min and max operational state which should be degraded-carrier:carrier</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Of course, this all presupposes that you have actually selected and configured the correct options to the kernel bonding module, to provide the functionality you want with the hardware you are using.  But that is nothing to do with systemd or with ptp4l.<br></blockquote><div><br></div><div>All done in /etc/systemd/network with .netdev and .network files.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> My issue is with systemd starting PTP before the bond is fully set up.<br>
<br>
As I mentioned, I cannot help you with systemd-networkd.  I cannot find any author attributions in or to the systemd-networkd source, and none of the actual developers here appears to have volunteered any insight - and good luck with that.<br>
<br>
Still, you might read here for clues: </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><a href="https://wiki.archlinux.org/title/Systemd-networkd">https://wiki.archlinux.org/title/Systemd-networkd</a><br>
though, you will have to disregard the reference to "Wireless bonding", which was originally written by me, but is now quite obsolete, without updates, having been subsequently "vandalized" by a rather persistent inexperienced and arrogant user.<br></blockquote><div><br></div><div>Ha, ha, don't you just love it when that happens!  It looks like I was trying out commands based on all the documentation that I saw that my code base didn't support.  And it looks like I need that feature because if I only have one network of my bond hooked up then that is operational state 'degraded-carrier' and if I have both interfaces hooked up then the operational state is just 'carrier' ... and I need the systemd-networkd-wait-online.service to look for both of those cases.</div><div><br></div><div>Take care,</div><div><br></div><div>Brian<br></div><div> <br></div></div></div>