Skip to content

Commit

Permalink
Release 0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
davidv1992 committed Sep 20, 2024
1 parent 207b15d commit daf0117
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 12 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## [0.2.2] - 2024-20-09

### Added
- Added support for the path trace option
- Added support for disabling synchronization of the system clock, touching only the ptp hardware clocks.

### Changed
- Updated dependencies
- Be less chatty about unexpected PTPv1 messages

### Fixed
- Correctly ignore rogue masters in the PTP network

## [0.2.1] - 2024-06-07

### Added
Expand Down Expand Up @@ -32,6 +45,7 @@
### Fixed
- Fixed race condition during startup

[0.2.2]: https://github.com/pendulum-project/statime/compare/v0.2.2...v0.2.1
[0.2.1]: https://github.com/pendulum-project/statime/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/pendulum-project/statime/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/pendulum-project/statime/releases/tag/v0.1.0
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exclude = [
resolver = "2"

[workspace.package]
version = "0.2.1"
version = "0.2.2"
edition = "2021"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/pendulum-project/statime"
Expand Down Expand Up @@ -53,7 +53,7 @@ timestamped-socket = "0.2.4"

# our own crates used as dependencies, same version as the workspace version
# NOTE: keep this part at the bottom of the file, do not change this line
statime = { version = "0.2.1", path = "./statime" }
statime = { version = "0.2.2", path = "./statime" }

[profile.release]
debug = 2
2 changes: 1 addition & 1 deletion docs/man/statime.8.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- ---
title: STATIME(8) statime 0.2.1 | statime
title: STATIME(8) statime 0.2.2 | statime
--- -->

# NAME
Expand Down
2 changes: 1 addition & 1 deletion docs/man/statime.toml.5.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- ---
title: STATIME.TOML(5) statime 0.2.1 | statime
title: STATIME.TOML(5) statime 0.2.2 | statime
--- -->

# NAME
Expand Down
2 changes: 1 addition & 1 deletion docs/precompiled/man/statime.8
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 3.4
.\"
.TH "STATIME" "8" "" "statime 0.2.1" "statime"
.TH "STATIME" "8" "" "statime 0.2.2" "statime"
.SH NAME
\f[CR]statime\f[R] \- The Statime PTP daemon for linux
.SH SYNOPSIS
Expand Down
11 changes: 8 additions & 3 deletions docs/precompiled/man/statime.toml.5
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 3.4
.\"
.TH "STATIME.TOML" "5" "" "statime 0.2.1" "statime"
.TH "STATIME.TOML" "5" "" "statime 0.2.2" "statime"
.SH NAME
\f[CR]statime.toml\f[R] \- configuration file for the statime
ptp\-daemon
Expand Down Expand Up @@ -36,12 +36,17 @@ Together with the \f[CR]domain\f[R] it identifies a domain.
\f[CR]priority1\f[R] = \f[I]priority\f[R] (\f[B]128\f[R])
A tie breaker for the best master clock algorithm in the range
\f[CR]0..256\f[R].
\f[CR]0\f[R] being highest priority an \f[CR]255\f[R] the lowest.
\f[CR]0\f[R] being the highest priority and \f[CR]255\f[R] the lowest.
.TP
\f[CR]priority2\f[R] = \f[I]priority\f[R] (\f[B]128\f[R])
A tie breaker for the best master clock algorithm in the range
\f[CR]0..256\f[R].
\f[CR]0\f[R] being highest priority an \f[CR]255\f[R] the lowest.
\f[CR]0\f[R] being the highest priority and \f[CR]255\f[R] the lowest.
.TP
\f[CR]path\-trace\f[R] = \f[I]bool\f[R]
The instance uses the path trace option.
This allows detecting clock loops when enabled on all instances in the
network.
.TP
\f[CR]virtual\-system\-clock\f[R] = \f[I]bool\f[R] (\f[B]false\f[R])
Use a virtual overlay clock instead of adjusting the system clock.
Expand Down
5 changes: 3 additions & 2 deletions statime-linux/src/clock/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ impl LinuxClock {
use clock_steering::Clock;

let ts = self.clock.now()?;
if ts.seconds < 0 || ts.seconds > (u64::MAX / 1000000000) as i64 {
#[allow(clippy::unnecessary_cast)]
if ts.seconds < 0 || ts.seconds as i64 > (u64::MAX / 1000000000) as i64 {
self.clock.step_clock(TimeOffset {
seconds: -ts.seconds + 1,
nanos: 0,
Expand Down Expand Up @@ -181,7 +182,7 @@ impl PortTimestampToTime for LinuxClock {
fn port_timestamp_to_time(&self, mut ts: timestamped_socket::socket::Timestamp) -> Time {
// get_tai gives zero if this is a hardware clock, and the needed
// correction when this port uses software timestamping
ts.seconds += self.get_tai_offset().expect("Unable to get tai offset") as libc::time_t;
ts.seconds += self.get_tai_offset().expect("Unable to get tai offset") as i64;
Time::from_fixed_nanos(ts.seconds as i128 * 1_000_000_000i128 + ts.nanos as i128)
}
}
Expand Down

0 comments on commit daf0117

Please sign in to comment.