From: Christopher S M Hall <christopher.s.h...@intel.com> IEEE1588-2019 and 802.1AS-2020 both require the field to be 0 in transmitted messages except when the "version 1 hardware option" is set (IEEE1588-2019 C.4.2) and only with IPv4. Since ptp4l isn't padding the UDP messages to 124 bytes as required for compatibility with the "V.1 Hardware" implementations, assume that we're not dealing with such hardware, do not implement the option as defined in C.4.2.
Since the default behaviour changes, in principle this could break things. It is similar to 2a2532d66121 ("Bump to IEEE 1588-2019 version") however, where ptp4l switches the version field to the IEEE1588-2019 value. Signed-off-by: Andrew Zaborowski <andrew.zaborow...@intel.com> --- The original patch added a per-port v1_hw_support option that would force the previous controlField values but it wasn't implementing the rest of the C.4.2 logic so with no indication that there's a use case for such partial support and no mention in the specification, I dropped it. port.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/port.c b/port.c index 3453716..76f817c 100644 --- a/port.c +++ b/port.c @@ -1544,7 +1544,6 @@ static int port_pdelay_request(struct port *p) msg->header.correction = -p->asymmetry; msg->header.sourcePortIdentity = p->portIdentity; msg->header.sequenceId = p->seqnum.delayreq++; - msg->header.control = CTL_OTHER; msg->header.logMessageInterval = port_is_ieee8021as(p) ? p->logPdelayReqInterval : 0x7f; @@ -1608,7 +1607,6 @@ int port_delay_request(struct port *p) msg->header.correction = -p->asymmetry; msg->header.sourcePortIdentity = p->portIdentity; msg->header.sequenceId = p->seqnum.delayreq++; - msg->header.control = CTL_DELAY_REQ; msg->header.logMessageInterval = 0x7f; if (p->hybrid_e2e) { @@ -1660,7 +1658,6 @@ int port_tx_announce(struct port *p, struct address *dst, uint16_t sequence_id) msg->header.domainNumber = clock_domain_number(p->clock); msg->header.sourcePortIdentity = p->portIdentity; msg->header.sequenceId = sequence_id; - msg->header.control = CTL_OTHER; msg->header.logMessageInterval = p->logAnnounceInterval; msg->header.flagField[1] = tp.flags; @@ -1743,7 +1740,6 @@ int port_tx_sync(struct port *p, struct address *dst, uint16_t sequence_id) msg->header.domainNumber = clock_domain_number(p->clock); msg->header.sourcePortIdentity = p->portIdentity; msg->header.sequenceId = sequence_id; - msg->header.control = CTL_SYNC; msg->header.logMessageInterval = p->logSyncInterval; if (p->timestamping != TS_ONESTEP && p->timestamping != TS_P2P1STEP) { @@ -1779,7 +1775,6 @@ int port_tx_sync(struct port *p, struct address *dst, uint16_t sequence_id) fup->header.domainNumber = clock_domain_number(p->clock); fup->header.sourcePortIdentity = p->portIdentity; fup->header.sequenceId = sequence_id; - fup->header.control = CTL_FOLLOW_UP; fup->header.logMessageInterval = p->logSyncInterval; fup->follow_up.preciseOriginTimestamp = tmv_to_Timestamp(msg->hwts.ts); @@ -2130,7 +2125,6 @@ static int process_delay_req(struct port *p, struct ptp_message *m) msg->header.correction = m->header.correction; msg->header.sourcePortIdentity = p->portIdentity; msg->header.sequenceId = m->header.sequenceId; - msg->header.control = CTL_DELAY_RESP; msg->header.logMessageInterval = p->logMinDelayReqInterval; msg->delay_resp.receiveTimestamp = tmv_to_Timestamp(m->hwts.ts); @@ -2321,7 +2315,6 @@ int process_pdelay_req(struct port *p, struct ptp_message *m) rsp->header.domainNumber = m->header.domainNumber; rsp->header.sourcePortIdentity = p->portIdentity; rsp->header.sequenceId = m->header.sequenceId; - rsp->header.control = CTL_OTHER; rsp->header.logMessageInterval = 0x7f; /* @@ -2369,7 +2362,6 @@ int process_pdelay_req(struct port *p, struct ptp_message *m) fup->header.correction = m->header.correction; fup->header.sourcePortIdentity = p->portIdentity; fup->header.sequenceId = m->header.sequenceId; - fup->header.control = CTL_OTHER; fup->header.logMessageInterval = 0x7f; fup->pdelay_resp_fup.requestingPortIdentity = m->header.sourcePortIdentity; @@ -3210,7 +3202,6 @@ port_management_construct(struct PortIdentity pid, struct port *ingress, msg->header.domainNumber = clock_domain_number(ingress->clock); msg->header.sourcePortIdentity = pid; msg->header.sequenceId = sequenceId; - msg->header.control = CTL_MANAGEMENT; msg->header.logMessageInterval = 0x7f; if (targetPortIdentity) -- 2.34.1 _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel