Richard Cochran
2015-08-16 20:14:57 UTC
Changes in V3:
- Reduced interface to two types, double and int
(enums are accessed like ints)
- Converted almost everything
Changes in V2:
- API is much simpler to use
- numerous details in the implementation have been improved
- half dozen legacy options converted
The diffstat over the entire series is just short of breaking even WRT
lines of code:
26 files changed, 984 insertions(+), 924 deletions(-)
But starting from the hash table patch, the trend is definitely
slimming down the code:
19 files changed, 760 insertions(+), 905 deletions(-)
So in the long run this basis will help us keep the configuration
stuff under control. I have done lots of build testing and minimal
run time testing. Since this series rather large, I pushed the branch
to github in the hopes that people will pull and test it.
repo: ***@github.com:richardcochran/linuxptp-as.git
branch: config-v3
Patches 1-4 and 12 provide changes allowing passing of the configuration.
Patches 5 and 6 add a simple hash table.
Patch 7 adds the bulk of the new implementation.
Patch 8 lets the UDP transport use the new TTL option.
Patch 13 adds a way to "lock" options from the command line.
Patch 37 cleans up a useless variable.
Patch 54 removes a now empty structure.
Patch 62 adds enumerated types.
Patch 69 tweaks ptp4l's logging configuration.
All the *other* patches convert individual options.
Review and comments are most welcome.
Thanks,
Richard
Richard Cochran (69):
clock: store the configuration in the clock data structure.
clock: add a method to obtain the configuration.
pmc: require a configuration for creating a PMC instance.
transport: store the configuration in the transport data structure.
Introduce a simple hash table implementation.
config: Add a hash table into the data structure.
config: introduce a new API for reading configuration settings.
udp: configure the socket with the TTL option.
config: convert the 'assume_two_step' option to the new scheme.
config: convert 'tx_timestamp_timeout' to the new scheme.
config: convert the 'check_fup_sync' option to the new scheme.
servo: store the configuration in the servo data structure.
config: add methods to set values taken from the command line.
config: convert the 'step_threshold' option to the new scheme.
config: convert the 'first_step_threshold' option to the new scheme.
config: convert the 'max_frequency' option to the new scheme.
config: convert 'logging_level' to the new scheme.
config: convert 'use_syslog' to the new scheme.
config: convert 'verbose' to the new scheme.
config: convert 'pi_proportional_const' to the new scheme.
config: convert 'pi_integral_const' to the new scheme.
config: convert 'pi_proportional_scale' to the new scheme.
config: convert 'pi_proportional_exponent' to the new scheme.
config: convert 'pi_proportional_norm_max' to the new scheme.
config: convert 'pi_integral_scale' to the new scheme.
config: convert 'pi_integral_exponent' to the new scheme.
config: convert 'pi_integral_norm_max' to the new scheme.
config: convert 'ntpshm_segment' to the new scheme.
config: port: convert 'delayAsymmetry' to the new scheme.
config: port: convert 'logAnnounceInterval' to the new scheme.
config: port: convert 'logSyncInterval' to the new scheme.
config: port: convert 'logMinDelayReqInterval' to the new scheme.
config: port: convert 'logMinPdelayReqInterval' to the new scheme.
config: port: convert 'announceReceiptTimeout' to the new scheme.
config: port: convert 'syncReceiptTimeout' to the new scheme.
config: prot: convert 'transportSpecific' to the new scheme.
port: change 'announce_span' into a macro.
config: port: convert 'path_trace_enabled' to the new scheme.
config: port: convert 'follow_up_info' to the new scheme.
config: clock, port: convert 'freq_est_interval' to the new scheme.
config: port: convert 'neighborPropDelayThresh' to new scheme.
config: port: convert 'min_neighbor_prop_delay' to the new scheme.
config: port: convert 'egressLatency' to the new scheme.
config: port: convert 'ingressLatency' to the new scheme.
config: port: convert 'delay_filter_length' to the new scheme.
config: clock, port: convert 'boundary_clock_jbod' to the new scheme.
config: convert 'free_running' to the new scheme.
config: convert 'gmCapable' to the new scheme.
config: convert 'summary_interval' to the new scheme.
config: convert 'kernel_leap' to the new scheme.
config: convert 'sanity_freq_limit' to the new scheme.
config: convert 'timeSource' to the new scheme.
config: convert the fault interval options to the new scheme.
config: remove the 'port_defaults' structure.
config: convert 'udp6_scope' to the new scheme.
config: convert 'slaveOnly' and 'twoStepFlag' to the new scheme.
config: convert 'priority1' and 'priority2' to the new scheme.
config: convert 'clockClass' to the new scheme.
config: convert 'clockAccuracy' to the new scheme.
config: convert 'offsetScaledLogVariance' to the new scheme.
config: convert 'domainNumber' to the new scheme.
config: add support for enumerated types with string labels.
config: convert 'network_transport' to the new scheme.
config: convert 'delay_mechanism' to the new scheme.
config: convert 'tsproc_mode' to the new scheme.
config: convert 'delay_filter' to the new scheme.
config: convert 'time_stamping' to the new scheme.
config: convert 'clock_servo' to the new scheme.
ptp4l: set print levels earlier.
clock.c | 52 ++-
clock.h | 16 +-
config.c | 956 +++++++++++++++++++++++++---------------------------
config.h | 71 ++--
ds.h | 31 --
hash.c | 113 +++++++
hash.h | 59 ++++
makefile | 12 +-
ntpshm.c | 9 +-
ntpshm.h | 7 +-
phc2sys.c | 48 ++-
pi.c | 61 ++--
pi.h | 58 +---
pmc.c | 7 +-
pmc_common.c | 9 +-
pmc_common.h | 8 +-
port.c | 105 ++++--
ptp4l.c | 199 +++++------
servo.c | 20 +-
servo.h | 27 +-
transport.c | 7 +-
transport.h | 6 +-
transport_private.h | 1 +
udp.c | 15 +-
udp6.c | 5 +-
udp6.h | 6 -
26 files changed, 984 insertions(+), 924 deletions(-)
create mode 100644 hash.c
create mode 100644 hash.h
- Reduced interface to two types, double and int
(enums are accessed like ints)
- Converted almost everything
Changes in V2:
- API is much simpler to use
- numerous details in the implementation have been improved
- half dozen legacy options converted
The diffstat over the entire series is just short of breaking even WRT
lines of code:
26 files changed, 984 insertions(+), 924 deletions(-)
But starting from the hash table patch, the trend is definitely
slimming down the code:
19 files changed, 760 insertions(+), 905 deletions(-)
So in the long run this basis will help us keep the configuration
stuff under control. I have done lots of build testing and minimal
run time testing. Since this series rather large, I pushed the branch
to github in the hopes that people will pull and test it.
repo: ***@github.com:richardcochran/linuxptp-as.git
branch: config-v3
Patches 1-4 and 12 provide changes allowing passing of the configuration.
Patches 5 and 6 add a simple hash table.
Patch 7 adds the bulk of the new implementation.
Patch 8 lets the UDP transport use the new TTL option.
Patch 13 adds a way to "lock" options from the command line.
Patch 37 cleans up a useless variable.
Patch 54 removes a now empty structure.
Patch 62 adds enumerated types.
Patch 69 tweaks ptp4l's logging configuration.
All the *other* patches convert individual options.
Review and comments are most welcome.
Thanks,
Richard
Richard Cochran (69):
clock: store the configuration in the clock data structure.
clock: add a method to obtain the configuration.
pmc: require a configuration for creating a PMC instance.
transport: store the configuration in the transport data structure.
Introduce a simple hash table implementation.
config: Add a hash table into the data structure.
config: introduce a new API for reading configuration settings.
udp: configure the socket with the TTL option.
config: convert the 'assume_two_step' option to the new scheme.
config: convert 'tx_timestamp_timeout' to the new scheme.
config: convert the 'check_fup_sync' option to the new scheme.
servo: store the configuration in the servo data structure.
config: add methods to set values taken from the command line.
config: convert the 'step_threshold' option to the new scheme.
config: convert the 'first_step_threshold' option to the new scheme.
config: convert the 'max_frequency' option to the new scheme.
config: convert 'logging_level' to the new scheme.
config: convert 'use_syslog' to the new scheme.
config: convert 'verbose' to the new scheme.
config: convert 'pi_proportional_const' to the new scheme.
config: convert 'pi_integral_const' to the new scheme.
config: convert 'pi_proportional_scale' to the new scheme.
config: convert 'pi_proportional_exponent' to the new scheme.
config: convert 'pi_proportional_norm_max' to the new scheme.
config: convert 'pi_integral_scale' to the new scheme.
config: convert 'pi_integral_exponent' to the new scheme.
config: convert 'pi_integral_norm_max' to the new scheme.
config: convert 'ntpshm_segment' to the new scheme.
config: port: convert 'delayAsymmetry' to the new scheme.
config: port: convert 'logAnnounceInterval' to the new scheme.
config: port: convert 'logSyncInterval' to the new scheme.
config: port: convert 'logMinDelayReqInterval' to the new scheme.
config: port: convert 'logMinPdelayReqInterval' to the new scheme.
config: port: convert 'announceReceiptTimeout' to the new scheme.
config: port: convert 'syncReceiptTimeout' to the new scheme.
config: prot: convert 'transportSpecific' to the new scheme.
port: change 'announce_span' into a macro.
config: port: convert 'path_trace_enabled' to the new scheme.
config: port: convert 'follow_up_info' to the new scheme.
config: clock, port: convert 'freq_est_interval' to the new scheme.
config: port: convert 'neighborPropDelayThresh' to new scheme.
config: port: convert 'min_neighbor_prop_delay' to the new scheme.
config: port: convert 'egressLatency' to the new scheme.
config: port: convert 'ingressLatency' to the new scheme.
config: port: convert 'delay_filter_length' to the new scheme.
config: clock, port: convert 'boundary_clock_jbod' to the new scheme.
config: convert 'free_running' to the new scheme.
config: convert 'gmCapable' to the new scheme.
config: convert 'summary_interval' to the new scheme.
config: convert 'kernel_leap' to the new scheme.
config: convert 'sanity_freq_limit' to the new scheme.
config: convert 'timeSource' to the new scheme.
config: convert the fault interval options to the new scheme.
config: remove the 'port_defaults' structure.
config: convert 'udp6_scope' to the new scheme.
config: convert 'slaveOnly' and 'twoStepFlag' to the new scheme.
config: convert 'priority1' and 'priority2' to the new scheme.
config: convert 'clockClass' to the new scheme.
config: convert 'clockAccuracy' to the new scheme.
config: convert 'offsetScaledLogVariance' to the new scheme.
config: convert 'domainNumber' to the new scheme.
config: add support for enumerated types with string labels.
config: convert 'network_transport' to the new scheme.
config: convert 'delay_mechanism' to the new scheme.
config: convert 'tsproc_mode' to the new scheme.
config: convert 'delay_filter' to the new scheme.
config: convert 'time_stamping' to the new scheme.
config: convert 'clock_servo' to the new scheme.
ptp4l: set print levels earlier.
clock.c | 52 ++-
clock.h | 16 +-
config.c | 956 +++++++++++++++++++++++++---------------------------
config.h | 71 ++--
ds.h | 31 --
hash.c | 113 +++++++
hash.h | 59 ++++
makefile | 12 +-
ntpshm.c | 9 +-
ntpshm.h | 7 +-
phc2sys.c | 48 ++-
pi.c | 61 ++--
pi.h | 58 +---
pmc.c | 7 +-
pmc_common.c | 9 +-
pmc_common.h | 8 +-
port.c | 105 ++++--
ptp4l.c | 199 +++++------
servo.c | 20 +-
servo.h | 27 +-
transport.c | 7 +-
transport.h | 6 +-
transport_private.h | 1 +
udp.c | 15 +-
udp6.c | 5 +-
udp6.h | 6 -
26 files changed, 984 insertions(+), 924 deletions(-)
create mode 100644 hash.c
create mode 100644 hash.h
--
2.1.4
------------------------------------------------------------------------------
2.1.4
------------------------------------------------------------------------------