Commit Graph

6 Commits (6325880094f86867dd7a6f41e5df4fd43c02789d)

Author SHA1 Message Date
Christian Eggers 7de73fefc3 Fix printf if time_t is long long
On some platforms, time_t has recently switched from "long" to "long
long" [1]. For these platforms it is necessary to use "%lld" as printf
format specifier because the ABI differs between "long" and "long long".

I found no way for creating something similar to PRId64 for time_t. No
idea how to determine whether it's "long" or "long long". So I cast
everything to "long long" instead.

[1] https://git.musl-libc.org/cgit/musl/commit/?id=38143339646a4ccce8afe298c34467767c899f51

Signed-off-by: Christian Eggers <ceggers@arri.de>
2020-06-02 07:36:21 -07:00
Miroslav Lichvar ee6930a884 unicast: Enable sharing master tables between ports.
Don't require each port to have its own master table specified in the
config. Instead of ports claming configured tables, clone the table in
each port, so different ports don't interfere with each other.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2020-02-09 04:20:08 -08:00
Vedang Patel 888afcdbae port: Add logPdelayReqInterval.
It will be used to store the current value of Pdelay Request Interval.
It will be represented as power of two in seconds.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
2019-05-08 21:29:29 -07:00
Vedang Patel 43085ab741 port: Separate unicast specific code from port_signaling_construct()
Make port_signaling_construct() to create a generic signaling
ptp_message. Move the unicast specific code to
port_signaling_uc_construct().

This is done to support the creation of Message Interval Request TLV (as
defined in 802.1AS Section 10.5.4.3). This TLV can be used to request
change in Announce Interval, Sync Interval or Link Delay Interval on a
remote system.

[ RC - fix trivial rebase conflict on top of targetPortIdentity check. ]

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2019-05-08 21:28:56 -07:00
Richard Cochran b59a739d0f Ignore signaling messages on target port mismatch.
IEEE 1588 specifies dropping signaling messages if the
targetPortIdentity does not match the receiving port.  Up until now
the unicast code did check that field, but only for the unicast
transmission request and cancel operations.

This patch moves the target port identity check so that it applies to
each and every received signaling message.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2019-05-08 21:21:24 -07:00
Richard Cochran faf0e0a025 Introduce unicast client logic.
This patch adds new code that runs the state machine and handles the
TLVs for requesting unicast service from a remote master.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-07-01 22:10:06 -07:00