Commit Graph

18 Commits (83be05256b900d1d83a23ecce9d80fb7cedec865)

Author SHA1 Message Date
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
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 63598688b7 Introduce unicast service.
This patch adds new code that handles unicast service contracts,
sending messages according the negotiated schedule.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-07-01 22:10:07 -07:00
Richard Cochran c2ab96fd40 port: Add a method for processing received signaling messages.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-07-01 22:10:06 -07:00
Richard Cochran 1ccc55ef07 port: Add a method for constructing signaling messages.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-07-01 06:27:48 -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 f94df4f625 port: Make the sync and announce transmit functions public.
These functions will be needed by the new unicast mode.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-07-01 06:27:48 -07:00
Michael Walle 6bc77ccf4b Replace memcmp() with pid_eq() and cid_eq()
Consistenly use the pid_eq() and cid_eq() helper functions. Move the
functions into utils.h (making them inline functions) because they are
used in multiple source files.

Signed-off-by: Michael Walle <michael@walle.cc>
2018-06-21 07:18:24 -07:00
Richard Cochran 96716060b1 e2e_tc: Implement an end to end transparent clock.
The E2E TC forwards Announce, Delay_Req, Delay_Resp, Management,
Signaling, and Sync messages, and drops P2P Delay messages.

This implementation tracks the GM using the BMCA in order
to syntonize (or possibly even synchronize) with it.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-05-01 07:46:43 -07:00
Richard Cochran 6a928ae867 p2p_tc: Implement a peer to peer transparent clock.
The P2P TC forwards Announce, Management, Signaling, and Sync
messages, consumes P2P Delay messages, and drops E2E Delay messages.

This implementation tracks the GM using the BMCA in order
to syntonize (or possibly even synchronize) with it.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-05-01 07:46:43 -07:00
Richard Cochran a13212fcbb tc: Add the transparent clock implementation.
This patch adds code that sends an event messages received on one port out
all the other ports and calculates the residence time.  The correction,
ingress port, and the original message are remembered in a TC transmit
descriptor.  These descriptors are recycled in a memory pool in a similar
way to the message buffers.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-05-01 07:46:43 -07:00
Richard Cochran 4cfbb2627f port: Share more helper functions.
The transparent clock code will want to set qualification timeouts and
perform end to end delay measurements.  This patch exposes the needed
methods.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-05-01 07:46:28 -07:00
Richard Cochran 4d69d48f96 telecom: Introduce the masterOnly option.
When masterOnly is true, the port always returns NULL when computing
its best foreign master.  As a result, the port will never enter the
SLAVE state, and the clock will ignore Announce messages received on
that port.

This attribute is specifically called out in G.8275.1 and G.8275.2,
and it is implied by the "master only" mode G.8265.1.  In addition,
this option will probably appear in the next revision of IEEE 1588.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-04-24 21:50:07 -07:00
Richard Cochran 4545fd1150 telecom: Add a configuration option for G.8275.portDS.localPriority.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-04-24 21:39:14 -07:00
Richard Cochran 6f96ebb7b8 Refactor the data set comparison function variable.
There is no need to keep two copies of the data set comparison
function.  This patch adds a method that allows the port code to
obtain the function from the clock code.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-04-24 21:39:10 -07:00
Richard Cochran 46acbcee42 port: share init code, peer delay code, and helpers
This patch makes a number of subroutines into global functions in order
to share code with the TC implementations to come.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-04-03 09:28:22 -07:00
Richard Cochran d87bb60712 port: export a private interface.
This patch places the internal port data structure into a common header
for use by the original BC and the new TC code.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-04-03 09:28:22 -07:00