Introduce a test for running in 802.1AS mode.

We use the follow_up_info to control behavior that is specific to the
802.1AS standard. In several instances, that standard goes against the
1588 standard or requires new run time logic that exceeds what can be
reasonably described as a 1588 profile.

Since we will need a few more run time exceptions in order to support
802.1AS, we introduce a helper function to identify this case, rather
than hard coding a test for follow_up_info, in order to be more clear
about it.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2013-01-27 11:17:18 +01:00
parent a1cd223962
commit 90f791d881
1 changed files with 6 additions and 1 deletions

7
port.c
View File

@ -392,6 +392,11 @@ static int port_ignore(struct port *p, struct ptp_message *m)
return 0; return 0;
} }
static int port_is_ieee8021as(struct port *p)
{
return p->pod.follow_up_info ? 1 : 0;
}
static int port_management_get_response(struct port *target, static int port_management_get_response(struct port *target,
struct port *ingress, int id, struct port *ingress, int id,
struct ptp_message *req) struct ptp_message *req)
@ -592,7 +597,7 @@ static int port_pdelay_request(struct port *p)
msg->header.sourcePortIdentity = p->portIdentity; msg->header.sourcePortIdentity = p->portIdentity;
msg->header.sequenceId = p->seqnum.delayreq++; msg->header.sequenceId = p->seqnum.delayreq++;
msg->header.control = CTL_OTHER; msg->header.control = CTL_OTHER;
msg->header.logMessageInterval = p->pod.follow_up_info ? msg->header.logMessageInterval = port_is_ieee8021as(p) ?
p->logMinPdelayReqInterval : 0x7f; p->logMinPdelayReqInterval : 0x7f;
if (msg_pre_send(msg)) if (msg_pre_send(msg))