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>
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>
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>
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>
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>
In order to support future settings which allow for the configuration of
per-port data, this patch modifies the interface name to be a static array
instead of a pointer.
-v2
* Minor edit for merge with previous patch
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
move the dm, timestamping, and transport settings into the cfg_settings, and
treat them as defaults for new ports.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
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>
this patch modifies the ptp4l.c and config settings so that the iface list is
inside the cfg_settings structure
-v2
* Moved "struct interface" into config.h
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
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>
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>
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>