Changes in V5:
- Add a string type
- Convert every last option
- Lightly refactor the pasring code

Changes in V4:
- Added missing calls to config_get_double() for:
  "pi_integral_exponent"
  "pi_integral_norm_max"
  "pi_integral_scale"
  "pi_proportional_exponent"
  "pi_proportional_norm_max"

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

This series passes the linuxptp-testsuite.  I pushed the branch to
github in the hopes that people will pull and test it.

  repo:    g...@github.com:richardcochran/linuxptp-as.git
  branch:  config-v5

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.
Patches 71 and 76 add string parsing utilities.
Patches 81 and 82 refactor config.c a bit.
Patch 83 finally changes config_init() into config_create().

All the *other* patches convert individual options.

Review and comments are most welcome.

Thanks,
Richard


Richard Cochran (83):
  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.
  config: introduce a string type.
  util: add a helper function to scan a MAC address.
  config: convert 'ptp_dst_mac', letting it be a per-port option.
  config: convert 'p2p_dst_mac', letting it be a per-port option.
  config: convert 'uds_address' to the new scheme.
  util: provide the 'count_char' helper function.
  config: convert 'productDescription' to the new scheme.
  config: convert 'revisionData' to the new scheme.
  config: convert 'userDescription' to the new scheme.
  config: convert 'manufacturerIdentity' to the new scheme.
  config: remove the last remaining legacy item.
  config: save a block from falling off the RHS of the page.
  config: refactor the parsing code.
  config: introduce a proper creation method.

 clock.c             |   55 ++-
 clock.h             |   16 +-
 config.c            | 1168 +++++++++++++++++++++++++--------------------------
 config.h            |   81 ++--
 ds.h                |   31 --
 ether.h             |    2 -
 hash.c              |  113 +++++
 hash.h              |   59 +++
 makefile            |   12 +-
 ntpshm.c            |    9 +-
 ntpshm.h            |    7 +-
 phc2sys.c           |   90 ++--
 pi.c                |   73 ++--
 pi.h                |   58 +--
 pmc.c               |   21 +-
 pmc_common.c        |    9 +-
 pmc_common.h        |    8 +-
 port.c              |  105 +++--
 ptp4l.8             |   16 +-
 ptp4l.c             |  306 ++++++--------
 raw.c               |   25 +-
 raw.h               |   10 -
 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 -
 uds.c               |    3 +-
 uds.h               |    5 -
 util.c              |   24 ++
 util.h              |   18 +
 34 files changed, 1269 insertions(+), 1142 deletions(-)
 create mode 100644 hash.c
 create mode 100644 hash.h

-- 
2.1.4


------------------------------------------------------------------------------
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to