Is PTP supported over macvlan interfaces?
Environment
- Red Hat Enterprise Linux (RHEL) 7, 8
- kernel version 3.10.0-693.5.2.el7.x86_64
- linuxptp-1.8-3.el7_4.1.x86_64
Issue
ptp4l
service doesn't work on macvlan
interfaces.
Resolution
The macvlan driver doesn't have ptp support, so you should configure PTP in a NIC with a supported driver.
Current plan is to introduce PTP
support on macvlan
interfaces in future RHEL 8 minor release.
Root Cause
The macvlan
driver didn't
have PTP
support previously.
Diagnostic Steps
Command fails when launching ptp4l on macvlan interface:
ptp4l[3233.524]: interface 'macvlan' does not support requested timestamping mode
failed to create a clock
Even if the 'physical' interface supports TIMESTAMPING, the macvlan does not:
$ ethtool -T ens32
Time stamping parameters for ens32:
Capabilities:
software-transmit (SOF_TIMESTAMPING_TX_SOFTWARE)
software-receive (SOF_TIMESTAMPING_RX_SOFTWARE)
software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
PTP Hardware Clock: none
Hardware Transmit Timestamp Modes: none
Hardware Receive Filter Modes: none
$ ethtool -T macvlan_ens32
Cannot get device time stamping settings: No such device
Time stamping parameters for macvlan@ens32:
$ ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: ens32: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:xx:xx:xx brd ff:ff:ff:ff:ff:ff
3: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:xx:xx:xx brd ff:ff:ff:ff:ff:ff
4: macvlan@ens32: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
link/ether c6:87:a9:xx:xx:xx brd ff:ff:ff:ff:ff:ff
inet 10.x.x.x/24 brd 10.x.x.255 scope global macvlan
valid_lft forever preferred_lft forever
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments