Commit Graph

76 Commits (bb88fb11175f377196231d637f5ef346e351fa64)

Author SHA1 Message Date
Jacob Keller b8160f2760 ptp4l: add maximum offset to pi servo
this patch modifies the pi servo to add a configurable max offset (default
infinity). When ever the detected offset is larger than this value, the clock
will jump and reset the servo state. The value of this feature is for decreasing
time to stabalize when clock is off by a large ammount during late running. This
can occur when the upstream master changes, or when the clock is reset due to
outside forces. The method used to reset clock is simply to reset the pi servo
to the unlocked state.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2012-09-29 06:24:44 +02:00
Jacob Keller 3464c9cfb4 ptp4l: add servo selection to the configuration file
this patch adds the servo selection to the configuration file

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2012-09-29 06:24:43 +02:00
Richard Cochran f86997185e Give the frequency estimation interval to the port as well.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-09-02 14:40:07 +02:00
Richard Cochran 1925f07b3f Fix copy-pasto in config file parsing of the logging level.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-08-31 17:28:14 +02:00
Richard Cochran 75cdd1fe15 Add an option to dial the frequency estimation interval.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-08-21 19:54:46 +02:00
Richard Cochran 1bb4ef4e34 Add an option to configure a free running local clock.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-08-21 18:26:00 +02:00
Richard Cochran 07b016cd44 Restore reading of the configuration file on stdin.
This feature is was dropped by accident in commit e1d3dc56.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-08-21 18:26:00 +02:00
Jacob Keller 06756e29d2 ptp4l: per-port configure settings
this patch enables the configuration file to define per-port specific
configuration options via the use of simple INI style syntax with headings for
each port created via [device_name] syntax

[ RC - correct scanning of the port string
     - remove '=' from scan format string ]

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-08-21 14:30:55 +02:00
Jacob Keller e1d3dc560b ptp4l: create [global] INI style config header
This patch creates a global heading for an INI style configuration file. The
parser allows the default state to be global without the header as well as to
use global. A future patch will enable per-port configuration settings.

-v2
* Forgot a "\n" in the string comparison so that global mode wasn't recognized

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2012-08-21 14:30:55 +02:00
Jacob Keller 6157db9ac4 ptp4l: add pod parser to separate logic from scan_line
this patch extracts the pod parser from the scan_line function in order to
simplify the code for future patches

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2012-08-21 14:30:54 +02:00
Jacob Keller 11a334b93e ptp4l: add override flag in cfg_settings to apply cmdline options
This patch adds a flag field for setting overflag flags so that command line
options override any value in the configuration file. This will be done by
ensuring the flags set whether the config parser accepts the values specified.
This patch also streamlines the handling for the slave only command line
option, as it no longer needs special treatment.

-v2
* Minor change to fix merge with previous patch

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2012-08-21 14:30:54 +02:00
Jacob Keller fcdc675f99 ptp4l: add missing options to config file
This patch adds support to the configuration file for all of the options
specified on the command line.

-v2
* Fix string length to account for null byte
* Add PRINT_LEVEL_MIN/MAX defines

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2012-08-21 14:30:54 +02:00
Jacob Keller 7a69db2379 ptp4l: Allow per-port customized port defaults
this patch allows each port to maintain its own pod structure since it is only
used in ports. This will allow the user to configure any special settings per
port. It takes a copy of the default pod, and a future patch will allow the
configuration file to set per-port specific changes

-v2
* Minor change to fix merge with previous patch

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2012-08-21 14:30:54 +02:00
Jacob Keller 733d4ccf9e ptp4l: new config_create_interface function
this patch adds a support function that creates a new port based on the
current default settings and adds it to the iface list. The function returns
the index into the cfg where the port was created. If a port is attempted to
be created multiple times, future attempts just return the index

-v2
* Move assignment of pointer into array after bounds check

[ RC - fix off by one return code from config_create_interface ]

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-08-21 14:30:00 +02:00
Jacob Keller 8250e80581 ptp4l: make ds and pod part of cfg_settings
make ds and pod static inside cfg_settings instead of created via pointers.
Also statically initialize the defaults.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2012-08-21 07:28:14 +02:00
Richard Cochran 00b232477d Add a configuration option to control the follow up info TLV.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-08-10 20:31:24 +02:00
Richard Cochran 269f9873f1 Add a configuration option to control the path trace mechanism.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-08-10 07:40:21 +02:00
Richard Cochran eed8ed05c8 Add an option to assume two step messaging.
Some commercial 802.1AS switches do not feel obliged to set the two step
flag. When we try to synchronize to their apparent one step sync messages,
nothing good happens. This commit adds a global option to work around the
issue.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-07-28 06:29:15 +02:00
Richard Cochran 4b0f4fda42 Replace hard coded logMinPdelayReqInterval with configuration option.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-07-28 06:29:15 +02:00
Richard Cochran e757b7a9d4 Add a configuration option to support 802.1AS only hardware.
Some of the time stamping hardware out there only recognizes layer 2
packets, and these do not work without changing the receive filter in
the SIOCSHWTSTAMP request.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-07-28 06:29:15 +02:00
Richard Cochran 7460d2756a Add a configuration option to specify the L2 MAC addresses.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-07-27 22:41:00 +02:00
Delio Brignoli 9bdf92a7cf Add transmit support for the transportSpecific field
Add transportSpecific parameter to config file parser
Set transportSpecific field in message headers as using the configuration (default to 0)

[ RC - reduced this patch to just the addition of the field ]

Signed-off-by: Delio Brignoli <dbrignoli@audioscience.com>
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-07-27 13:15:56 +02:00
Richard Cochran f2aae280b3 Make the PI constants configurable.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-05-03 11:17:34 +02:00
Richard Cochran 3ff62648fa Make the number of transmit time stamp retries configurable.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-03-20 20:19:25 +01:00
Richard Cochran da69203517 Rework the configuration file interface.
This change will make it easier to extend the configuration file contents
to include arbitrary new data structures.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-03-20 20:09:40 +01:00
Richard Cochran ec5e783e84 Add code to read a configuration file.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-01-07 08:07:55 +01:00