This patch moves the call to read the configuration file until just after
the options have finished parsing. This is for future patches that will allow
configuration file to enable ports with specific settings
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>
The current code for the timestamping mode does not allow interfaces to have
separate timestamping modes. This is (probably) due to hardware timestamping
mode being required on all ports to work properly.
This patch removes the timestamping field in the struct iface, and makes it a
clock variable which is really what the mode does anyways. Ports get passed
the timestamping mode but no longer appear as though they are separate.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
this patch updates the global set functions to allow the user to set the
proper value instead of only being allowed to enable (or disable) a particular
feature. The new patch allows the function to specify exactly what they want
the value to be.
This patch also clarifies what -q and -v do by removing mention of quiet mode
and verbose mode. It is easy for a user to confuse and assume that -q disables
-v when this is not true.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
modify the command line options to make better sense of what each one does.
Ignore previous restriction on disallowing different options on the same
letter with different case.
the purpose of this patch is to simplify the meaning of some very confusing
options (-z for legacy, -r for hardware timestamps, -m for slave)
While there are legacy issues involved with changing options around, it is
important for the user to be able to quickly understand and make fewer
mistakes regarding the various command line options
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>
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>
If the new ethtool operation is supported, then use it to verify that the PHC
selected by the user is correct. If the user doesn't specify a PHC and ethtool
is supported then automatically select the PHC device.
If the user specifies a PHC device, and the ethtool operation is suppported,
automatically confirm that the PHC device requested is correct. This check is
performed for all ports, in order to verify that a boundary clock setup is
valid.
The check for PHC device validity is not done in the transport because the
only thing necessary for performing the check is the port name. Handled this
in the port_open code instead.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.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>
Now that we have the master code in place, there is no longer any need
to restrict ourselves.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>