Commit e6aec3d0 authored by Cesar Prados's avatar Cesar Prados Committed by Alessandro Rubini

pdelay/ieee1588: add timeout to the Pdelay_req msg.

The value of logMinPdelayReqInterval is a compromise between the
fluctuation in link delay and startup time and the communication
and computation load imposed by transmission of these messages.
Although, I have set it to 0 so far...
Signed-off-by: Cesar Prados's avatarC.Prados <c.prados@gsi.de>
parent 3925ed68
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#define PP_DEFAULT_DELAY_S 6 #define PP_DEFAULT_DELAY_S 6
#define PP_DEFAULT_ANNOUNCE_INTERVAL 1 /* 0 in 802.1AS */ #define PP_DEFAULT_ANNOUNCE_INTERVAL 1 /* 0 in 802.1AS */
#define PP_DEFAULT_DELAYREQ_INTERVAL 0 #define PP_DEFAULT_DELAYREQ_INTERVAL 0
#define PP_DEFAULT_PDELAYREQ_INTERVAL 0
#define PP_DEFAULT_SYNC_INTERVAL 0 /* -7 in 802.1AS */ #define PP_DEFAULT_SYNC_INTERVAL 0 /* -7 in 802.1AS */
#define PP_DEFAULT_SYNC_RECEIPT_TIMEOUT 3 #define PP_DEFAULT_SYNC_RECEIPT_TIMEOUT 3
#define PP_DEFAULT_ANNOUNCE_RECEIPT_TIMEOUT 20 /* 3 by default */ #define PP_DEFAULT_ANNOUNCE_RECEIPT_TIMEOUT 20 /* 3 by default */
...@@ -53,6 +54,7 @@ ...@@ -53,6 +54,7 @@
/* We use an array of timeouts, with these indexes */ /* We use an array of timeouts, with these indexes */
enum pp_timeouts { enum pp_timeouts {
PP_TO_DELAYREQ = 0, PP_TO_DELAYREQ = 0,
PP_TO_PDELAYREQ,
PP_TO_SYNC, PP_TO_SYNC,
PP_TO_ANN_RECEIPT, PP_TO_ANN_RECEIPT,
PP_TO_ANN_INTERVAL, PP_TO_ANN_INTERVAL,
......
...@@ -262,6 +262,7 @@ typedef struct DSPort { /* page 72 */ ...@@ -262,6 +262,7 @@ typedef struct DSPort { /* page 72 */
Integer8 logAnnounceInterval; Integer8 logAnnounceInterval;
UInteger8 announceReceiptTimeout; UInteger8 announceReceiptTimeout;
Integer8 logSyncInterval; Integer8 logSyncInterval;
Integer8 logMinPDelayReqInterval;
/* Enumeration8 delayMechanism; -- not used */ /* Enumeration8 delayMechanism; -- not used */
UInteger4 versionNumber; UInteger4 versionNumber;
......
...@@ -42,6 +42,7 @@ int pp_initializing(struct pp_instance *ppi, unsigned char *pkt, int plen) ...@@ -42,6 +42,7 @@ int pp_initializing(struct pp_instance *ppi, unsigned char *pkt, int plen)
/* 1-based port number = index of this ppi in the global array */ /* 1-based port number = index of this ppi in the global array */
port->portIdentity.portNumber = 1 + ppi - ppi->glbs->pp_instances; port->portIdentity.portNumber = 1 + ppi - ppi->glbs->pp_instances;
port->logMinDelayReqInterval = PP_DEFAULT_DELAYREQ_INTERVAL; port->logMinDelayReqInterval = PP_DEFAULT_DELAYREQ_INTERVAL;
port->logMinPDelayReqInterval = PP_DEFAULT_PDELAYREQ_INTERVAL;
port->logAnnounceInterval = opt->announce_intvl; port->logAnnounceInterval = opt->announce_intvl;
port->announceReceiptTimeout = PP_DEFAULT_ANNOUNCE_RECEIPT_TIMEOUT; port->announceReceiptTimeout = PP_DEFAULT_ANNOUNCE_RECEIPT_TIMEOUT;
port->logSyncInterval = opt->sync_intvl; port->logSyncInterval = opt->sync_intvl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment