Commit Graph

10 Commits (3f5f5653d7966da8ba96d64fbf74aa472e9f078c)

Author SHA1 Message Date
Vedang Patel 3f5f5653d7 port: Add interval update mechanism.
This commit adds functionality to increase the sync and pdelay request
intervals once gptp synchronization has been achieved. This is useful
while running Automotive Profile where the network is usually static.

Here, we are assuming that the gPTP synchronization is achieved whenever
the last 'n' offsets calculated using the Sync messages are below a
certain threshold. Both, the number of offsets to consider and the offset
threshold are configurable.

In order to support the interval update, a new clock servo state
CLOCK_SERVO_STABLE has been added. The clock will transition to this
state whenever the above condition is satisfied. When this transition
occurs, the slave will send an "interval request" signaling message
asking the master to change the sync interval. It will also update the
pdelay request interval locally.

Four new config options have been added to provide this functionality:

- servo_offset_threshold: All the offset values being considered should
  be below this value.
- servo_num_offset_values: number of previously received offset values
  to consider.
- operLogSyncInterval: slave will ask the master to switch to this
  interval for sending sync messages when the offset stabilizes.
- operLogPdelayReqInterval: the slave will set this interval for pdelay
  request messages when the offset stabilizes.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
2019-05-08 21:29:48 -07:00
Vedang Patel d58b1080bc Add ignore_source_id config option.
This config option will skip the source port identity verification in
the Sync and Follow_up messages. This option is needed when the announce
messages are disabled because the slave cannot know the identity of
master without announce messages.

This is required by Automotive Profile as part of skipping the Best
Master Clock Algorithm (BMCA).

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
2018-10-04 19:38:19 -07:00
Vedang Patel 1cbeec80cd Add inhibit_announce config option.
This option will accomplish 2 things. On the master, it will stop the
announce messages being sent (by disabling FD_MANNO_TIMER timer). On
slave, it will not configure announce message timeouts (by disabling
FD_ANNOUNCE_TIMEOUT timer).

This config option is needed for the Automotive profile as part of
skipping the Best Master Clock Algorithm (BMCA).

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
2018-10-04 19:38:19 -07:00
Vedang Patel 83be05256b Add BMCA config option.
This adds config option to specify static roles for master and slave
in the Best Master Clock Algorithm. This is the case for Automotive
Profile where networks are mostly static and role for each device is
known in advance.

masterOnly and slaveOnly will be used to determine the roles for the
devices. Since masterOnly is a per-port config and slaveOnly is a global
config option, role assignment will be slightly odd in case of bridges.
If slaveOnly is set to 1, all the ports will be in slave roles except
for the ones where masterOnly is set to 1. These ports will assume the
master role.

Two new FSMs which will be used for master and slave roles for this
config option have also been added.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
2018-10-04 19:38:19 -07:00
Vedang Patel 3f764aec6a port: Add configurable option to set asCapable.
If set to 'true', this unconditionally sets the asCapable variable. The
usual checks will be applied to asCapable if it is set to 'auto'. The
default value is 'auto'.

This config option is needed by the Automotive Profile. The master will
be able to send out Sync Message as soon as the daemon is started.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
2018-10-04 19:38:19 -07:00
Anders Selhammer 1173e774dd Introduce the maxStepsRemoved attribute
Add attribute maxStepsRemoved which is included in IEEE1588-2017 (v2.1)
It is an optional attribute which can decide if an Announce message is
considered in the operation of the BMCA or not.

Signed-off-by: Anders Selhammer <anders.selhammer@est.tech>
2018-09-30 18:39:39 -07:00
Richard Cochran b1ce06206f port: Introduce an option to disable mutlicast service.
Some profiles forbid multicast altogther.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-07-01 22:10:07 -07:00
Richard Cochran b9b18268cd port: Hook into the unicast service logic.
Now that all the pieces are in place, hook the port logic into the
unicast service code.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-07-01 22:10:07 -07:00
Richard Cochran e22dc6b113 config: Introduce a unicast master table.
This patch adds configuration file support for a table of unicast
masters.  Each table lives in its own section and has a unique,
positive numerical ID.  Entries in the table are a pair of transport
type and protocol address.

Each port may specify a table id to be used for unicast negotiation.
Tables may not be shared between ports, but nothing prevents table
entries from appearing in more than table.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-07-01 06:27:48 -07:00
Richard Cochran a4981b2050 Move the configuration files to their own directory.
We will be getting more and more of these.  Let's put them into their
own area.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-05-25 07:46:03 -07:00