When started in automatic mode, the phc2sys program first queries the
local clock identification and then the number of ports immediately
afterwords. However, both of those values come from the default data
set. Make code both simpler and more efficient by caching the entire
data set inside of
Prefix the function with the module name and correct the return code
semantics.
The active word in the function's name is "query" rather that "get" in
order to distinguish methods that send and receive over the network
from those that merely return a cached value.
Signed-off-by: Richard Cochran
The number of ports is already available in the cached default data
set. Use it directly.
Signed-off-by: Richard Cochran
---
phc2sys.c | 2 +-
pmc_agent.c | 24
pmc_agent.h | 11 ++-
3 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/phc2sys.c
This patch renames the function to have the module prefix and corrects the
return code semantics.
The active word in the function's name is "query" rather that "get" in
order to distinguish methods that send and receive over the network
from those that merely return a cached value.
This series introduces "query" functions, not to be confused with
"get" methods. The former transmits a request to the ptp4l service,
while the latter simply returns the cached values.
- Patches 1 and 2 are straightforward conversions of the existing API.
- Patches 3-4 combine two queries into
On Sat, Nov 28, 2020 at 12:24:44PM +0200, Vladimir Oltean wrote:
> So we have a pretty large reconvergence time every time there is a leap
> second.
No, the upstream server must set the leap second status flag at least
twelve hours before the end of the UTC day.
The phc2sys program's
On Fri, Nov 27, 2020 at 04:15:29PM -0800, Richard Cochran wrote:
> The UTC offset is not subscribed. It is polled with a request/reply
> once a minute. (Only the port state has a push notification.)
So we have a pretty large reconvergence time every time there is a leap
second.
On Fri, Nov 27, 2020 at 06:30:11PM -0800, Richard Cochran wrote:
> This patch renames the function to have the module prefix and tries to
> put into words what it does.
>
> Signed-off-by: Richard Cochran
> ---
Reviewed-by: Vladimir Oltean
___
On Fri, Nov 27, 2020 at 06:30:09PM -0800, Richard Cochran wrote:
> The monotonic clock can never go backwards. If you take T1 and later T2
> from that clock, then (T2 > T1) is always true.
>
> This patch removes the useless test.
>
> [ This test evolved over the years. Originally the time stamp
On Fri, Nov 27, 2020 at 06:30:10PM -0800, Richard Cochran wrote:
> In the update_pmc_node() method, reduce the expression
> !(x < y) to (x >= y).
>
> While we're at it, clean the coding style as well.
>
> Signed-off-by: Richard Cochran
> ---
Reviewed-by: Vladimir Oltean
On Fri, Nov 27, 2020 at 06:30:08PM -0800, Richard Cochran wrote:
> If the pmc pointer is not set, then there is no need to read the time only
> to later discard the result. This patch simplifies the flow by returning
> early if there is no work to be done.
>
> Signed-off-by: Richard Cochran
>
On Fri, Nov 27, 2020 at 06:30:07PM -0800, Richard Cochran wrote:
> The main method that causes the PMC agent to update its status takes a flag
> that results in different behavior when push notifications are active.
> This patch simplifies the interface by letting the agent remember whether
> or
12 matches
Mail list logo