[Linuxptp-devel] [PATCH v3 02/12] phc2sys.c: Handling of print_level

2018-04-07 Thread Peter Schneider
Replaced usage of variable 'print_level' with struct config item 'logging_level'. Original variable still used for range checking. Signed-off-by: Peter Schneider --- phc2sys.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index dc7cb28..7d5edad 1

[Linuxptp-devel] [PATCH v3 11/12] phc2sys.c: Implement using transportSpecific value

2018-04-07 Thread Peter Schneider
Signed-off-by: Peter Schneider --- phc2sys.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phc2sys.c b/phc2sys.c index 1ea0600..0d69f2b 100644 --- a/phc2sys.c +++ b/phc2sys.c @@ -904,7 +904,8 @@ static int init_pmc(struct config *cfg, struct node *node) snprintf(ud

[Linuxptp-devel] [PATCH v3 08/12] phc2sys.c: Handling of node.sanity_freq_limit

2018-04-07 Thread Peter Schneider
Copy 'node.sanity_freq_limit' to struct config item 'sanity_freq_limit'. Check for 'servo_type' == CLOCK_SERVO_NTPSHM. Signed-off-by: Peter Schneider --- phc2sys.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/phc2sys.c b/phc2sys.c index 0d7a10c..c2e7f70 100644 --- a/ph

[Linuxptp-devel] [PATCH v3 10/12] phc2sys.c: Implement handling of Long options

2018-04-07 Thread Peter Schneider
Signed-off-by: Peter Schneider --- phc2sys.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index d4f7f11..1ea0600 100644 --- a/phc2sys.c +++ b/phc2sys.c @@ -1344,11 +1344,13 @@ int main(int argc, char *argv[]) char *src_name = NUL

[Linuxptp-devel] [PATCH v3 00/12] phc2sys: long-opts/cfg-file/tS

2018-04-07 Thread Peter Schneider
This patch series changes phc2sys. It implements the possibility to use a configuration file, enables the usage of long options and allows configuring the transportSpecific value. In contrast to v2 of this patch series, all (possibly) used options make use of the config API. Peter Schneider (12):

[Linuxptp-devel] [PATCH v3 03/12] phc2sys.c: Handling of message_tag

2018-04-07 Thread Peter Schneider
Replaced usage of variable 'message_tag' with struct config item 'message_tag'. Original variable removed. Signed-off-by: Peter Schneider --- phc2sys.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index 7d5edad..b402575 100644 --- a/phc2sys.c

[Linuxptp-devel] [PATCH v3 09/12] phc2sys.c: Implement configuration file handling

2018-04-07 Thread Peter Schneider
Signed-off-by: Peter Schneider --- phc2sys.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/phc2sys.c b/phc2sys.c index c2e7f70..d4f7f11 100644 --- a/phc2sys.c +++ b/phc2sys.c @@ -1313,6 +1313,7 @@ static void usage(char *progname) " -O [offset]

[Linuxptp-devel] [PATCH v3 04/12] phc2sys.c: Handling of verbose

2018-04-07 Thread Peter Schneider
Replaced usage of variable 'verbose' with struct config item 'verbose'. Original variable removed. Signed-off-by: Peter Schneider --- phc2sys.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index b402575..edbdb85 100644 --- a/phc2sys.c +++ b/ph

[Linuxptp-devel] [PATCH v3 07/12] phc2sys.c: Handling of node.kernel_leap

2018-04-07 Thread Peter Schneider
Use struct config item 'kernel_leap' for parameter handling. Copy this to node.kernel_leap afterwards. Check for 'servo_type' == CLOCK_SERVO_NTPSHM. Signed-off-by: Peter Schneider --- phc2sys.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/phc2sys.c b/phc2sys.c inde

[Linuxptp-devel] [PATCH v3 01/12] phc2sys.c: Handling of domain_number

2018-04-07 Thread Peter Schneider
Replaced usage of variable 'domain_number' with struct config item 'domainNumber'. Original variable still used for range checking. Removed (now obsolete) third parameter of init_pmc(). Signed-off-by: Peter Schneider --- phc2sys.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(

[Linuxptp-devel] [PATCH v3 05/12] phc2sys.c: Handlöing of use_syslog

2018-04-07 Thread Peter Schneider
Replaced usage of variable 'use_syslog' with struct config item 'use_syslog'. Original variable removed. Signed-off-by: Peter Schneider --- phc2sys.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index edbdb85..ad67438 100644 --- a/phc2sys.c ++

[Linuxptp-devel] [PATCH v3 06/12] phc2sys.c: Handling of node.servo_type

2018-04-07 Thread Peter Schneider
Use struct config item 'clock_servo' for parameter handling. Copy this to node.servo_type afterwards. Signed-off-by: Peter Schneider --- phc2sys.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index ad67438..5b244b2 100644 --- a/phc2sys.c ++

[Linuxptp-devel] [PATCH v3 12/12] phc2sys.8: Doc long opts / cfgfile handling

2018-04-07 Thread Peter Schneider
Signed-off-by: Peter Schneider --- phc2sys.8 | 198 +- 1 file changed, 195 insertions(+), 3 deletions(-) diff --git a/phc2sys.8 b/phc2sys.8 index 4fc4fa3..48bac47 100644 --- a/phc2sys.8 +++ b/phc2sys.8 @@ -1,4 +1,4 @@ -.TH PHC2SYS 8 "No

[Linuxptp-devel] [PATCH RFC 4/8] transport: Introduce method for fetching a deferred transmit time stamp.

2018-04-07 Thread Richard Cochran
When a messages is sent with the DEFER_EVENT flag, the lower transport code does not fetch the time stamp right away. This patch introduces a method that allows a second call to retrieve the waiting transmit time stamp. Signed-off-by: Richard Cochran --- transport.c | 11 +++ transport.

[Linuxptp-devel] [PATCH RFC 7/8] clock: Calculate frequency offset even without any delay estimation.

2018-04-07 Thread Richard Cochran
If the "free_running" option is set, the "no adjust" calculates and prints an estimation of the phase and frequency offsets to the remote master. Because the phase estimate requires a delay measurement, this calculation is not performed without having the delay estimate first. However, a typical t

[Linuxptp-devel] [PATCH RFC 5/8] msg: Refactor the finding of the TLV suffix on receive.

2018-04-07 Thread Richard Cochran
Now that we have a helper routine to find the suffix, use that instead of open coding the same logic. This simplifies the code and consolidates the definition of which message types are allowed to carry TLVs. Signed-off-by: Richard Cochran --- msg.c | 13 +++-- 1 file changed, 3 inserti

[Linuxptp-devel] [PATCH RFC 1/8] transport: Use the proper enumerated event code.

2018-04-07 Thread Richard Cochran
Originally the 'event' parameter to transport_send() was a single Boolean flag. Over time, we grew an enumerated list of event flavors, but the function signatures were never updated. This patch changes the methods to use the proper type. Signed-off-by: Richard Cochran --- raw.c

[Linuxptp-devel] [PATCH RFC 6/8] msg: Introduce a method to copy a message.

2018-04-07 Thread Richard Cochran
The transparent clock will want to have two copies of certain messages, one for forwarding and one for internal use (in the BMCA and for syntonization). This patch add a function that duplicates a given message, including all of the attached TLVs. Signed-off-by: Richard Cochran --- msg.c | 34 +

[Linuxptp-devel] [PATCH RFC 8/8] clock: Maintain the master/local rate ratio when free running.

2018-04-07 Thread Richard Cochran
When using long chains of transparent clocks, the recommended practice is to measure the rate ratio without adjusting the local clock. Then the residence times should be corrected to reflect the master's frequency. This patch expands the clock_rate_ratio() method to provide the estimated ratio wh

[Linuxptp-devel] [PATCH RFC 2/8] transport: Fix callers to pass a proper enumeration value.

2018-04-07 Thread Richard Cochran
The majority of the callers of transport_send() use hard coded magic numbers. This patch fixes them to use the corresponding enumerated values instead. Signed-off-by: Richard Cochran --- clock.c | 2 +- nsm.c| 2 +- pmc_common.c | 3 ++- port.c | 19 ++- po

[Linuxptp-devel] [PATCH RFC 0/8] Transparent Clock part II

2018-04-07 Thread Richard Cochran
Here is second batch of background work needed for TC support. After these are merged, then the actual TC code will be ready for posting... Patches 1-5 clean up the transport and message infrastructure. Patch 6 expands the message functionality with a copy method. Patches 7-8 extend the clock cod

[Linuxptp-devel] [PATCH RFC 3/8] transport: Introduce transmit time stamp deferral.

2018-04-07 Thread Richard Cochran
Up until now, the code has always fetched the time stamp immediately after transmitting a message. However, a transparent clock will want to forward a given incoming message out all egress ports with as little delay as possible, in order to minimize the residence time of the message within the swi