PTP (IEEE 1588-2019) supports two different transports: Layer 2 and Layer 3 (UDP).
UDP is by far the more common of the two, so I will assume you are using it. In that case, you are in a bit of "rock and a hard place" situation:
- LinuxPTP does not support bridges, so you can't configure it to use
br0.
mgbe0 does not have an IP address, so it cannot send UDP datagrams (which are layered on top of IP).
In particular, if you use PTPv2.1 hybrid PTP (which I personally prefer since it is the most efficient use of the network), then you need to be able to both receive multicast UDP datagrams as well as send and receive unicast UDP datagrams.
So, you need to "somehow" trick Linux into sending PTP datagrams from mgbe0 using the source IP of br0, and also make sure that received PTP datagrams get forwarded to LinuxPTP.
Your situation seems to be similar to the one in this mailing list thread on the linux-netdev mailing list: RFC: PTP Boundary Clock over UDPv4/UDPv6 on Linux bridge. Unfortunately, this thread does not come to a general solution, only a workaround using ebtables to move the datagrams around the kernel:
ebtables --table broute --append BROUTING --protocol 0x88F7 --jump DROP
ebtables --table broute --append BROUTING --protocol 0x0800 --ip-protocol udp --ip-destination-port 320 --jump DROP
ebtables --table broute --append BROUTING --protocol 0x0800 --ip-protocol udp --ip-destination-port 319 --jump DROP
ebtables --table broute --append BROUTING --protocol 0x86DD --ip6-protocol udp --ip6-destination-port 320 --jump DROP
ebtables --table broute --append BROUTING --protocol 0x86DD --ip6-protocol udp --ip6-destination-port 319 --jump DROP
Note: at first glance, it seems like this would completely break PTP. After all, it filters PTP traffic and DROPs it. However, the BROUTING chain in the broute table has a special meaning for the ACCEPT and DROP targets: ACCEPT means "should be bridged" and DROP means "should be routed".
So, what these rules are saying is that UDP packets addressed to ports 319 and 320 (i.e., PTP) should be routed, not bridged. This means that they are processed by the constituent member interfaces of the bridge, not the bridge itself.
If I understood all of that correctly (which I will not guarantee, as I have literally only started learning about it when I started writing this answer 10 minutes ago), mgbe0 will need to have a valid IP configuration for this to work. So, you would need to modify your Netplan configuration something like this:
network:
version: 2
renderer: NetworkManager
ethernets:
mgbe0:
dhcp4: no
addresses:
- 192.168.2.85/24 # or whatever
mgbe1:
dhcp4: no
bridges:
br0:
dhcp4: no
addresses:
- 192.168.2.86/24
interfaces:
- mgbe0
- mgbe1