[Linuxptp-devel] [PATCH v2] hwtstamp_ctl: use SIOCGHWTSTAMP ioctl before destructively setting policy

2014-06-03 Thread Jacob Keller
an additional option flag. - v2 * Fix line lengths, and a few other minor changes Signed-off-by: Jacob Keller jacob.e.kel...@intel.com --- hwstamp_ctl.8 | 11 ++- hwstamp_ctl.c | 56 +--- 2 files changed, 59 insertions(+), 8 deletions(-) diff

[Linuxptp-devel] [PATCH v4] hwtstamp_ctl: use SIOCGHWTSTAMP ioctl before destructively setting policy

2014-06-03 Thread Jacob Keller
an additional option flag. - v4 * only display results if command succeeds, as the contents are otherwise expected to be identical to what we passed in. Signed-off-by: Jacob Keller jacob.e.kel...@intel.com --- hwstamp_ctl.8 | 11 ++- hwstamp_ctl.c | 55

[Linuxptp-devel] [PATCH v3] linuxptp: add phc_ctl program to help debug PHC devices

2014-06-30 Thread Jacob Keller
, in order to reduce duplication. Hopefully this is of some use to everyone. -v2 * Add manpage * remove need for ';' command -v3 * fix copyright header Signed-off-by: Jacob Keller jacob.e.kel...@intel.com --- makefile | 4 +- phc_ctl.8 | 106 phc_ctl.c | 561

[Linuxptp-devel] [PATCH v4] linuxptp: add phc_ctl program to help debug PHC devices

2014-07-10 Thread Jacob Keller
, in order to reduce duplication. Hopefully this is of some use to everyone. Signed-off-by: Jacob Keller jacob.e.kel...@intel.com --- - v4 * Fix manpage * add phc_ctl to gitignore .gitignore | 1 + makefile | 4 +- phc_ctl.8 | 108 phc_ctl.c | 561

[Linuxptp-devel] [PATCH] gitignore: add .version as this is generated during a make

2014-07-10 Thread Jacob Keller
Signed-off-by: Jacob Keller jacob.e.kel...@intel.com --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e0710ad5b294..098dcdfe1ea7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /*.d /*.o +/.version /hwstamp_ctl /phc2sys /pmc

[Linuxptp-devel] [PATCH v5] linuxptp: add phc_ctl program to help debug PHC devices

2014-07-18 Thread Jacob Keller
, in order to reduce duplication. Hopefully this is of some use to everyone. Signed-off-by: Jacob Keller jacob.e.kel...@intel.com --- This version fixes several issues, * make clean wasn't removing phc_ctl.o * manpage used 1% instead of 10% clock adjustment * default command was not properly added

[Linuxptp-devel] [PATCH 1/5] util: move some config code into util for sharing

2015-01-09 Thread Jacob Keller
. Signed-off-by: Jacob Keller jacob.e.kel...@intel.com --- config.c | 65 util.c | 60 +++ util.h | 42 + 3 files changed, 102

[Linuxptp-devel] [PATCH 0/5] Add configuration file support to phc2sys

2015-01-09 Thread Jacob Keller
which are no longer necessary (similar to ptp4l which has many config options but few command line parameters). In addition this opens the door to bring several settings from ptp4l into phc2sys (like the PI servo settings). Jacob Keller (5): util: move some config code into util for sharing

[Linuxptp-devel] [PATCH 4/5] config: add global options check function

2015-01-09 Thread Jacob Keller
. Add an array of known strings which all future global options must be added to. Signed-off-by: Jacob Keller jacob.e.kel...@intel.com --- config.c | 90 config.h | 2 ++ 2 files changed, 92 insertions(+) diff --git a/config.c b

[Linuxptp-devel] [PATCH 3/5] ptpl4.8: update ptp4l man page to indicate the phc2sys section

2015-01-09 Thread Jacob Keller
is to make it possible to share the configuration file if desired. Signed-off-by: Jacob Keller jacob.e.kel...@intel.com --- ptp4l.8 | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/ptp4l.8 b/ptp4l.8 index 0d01f29f4bda..fd5b1274bece 100644 --- a/ptp4l.8

[Linuxptp-devel] [PATCH] phc2sys: fix manpage documentation for -F

2018-05-08 Thread Jacob Keller
. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- phc2sys.8 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phc2sys.8 b/phc2sys.8 index 3a8683e6933a..45cb0e320fc3 100644 --- a/phc2sys.8 +++ b/phc2sys.8 @@ -154,9 +154,9 @@ after the start. The default is 0.0

[Linuxptp-devel] [PATCH] differ message printed when local clock is best master

2018-03-15 Thread Jacob Keller
Make the log output a bit more clear by changing how we inform the user when the local clock is the best master clock. This allows easier parsing of the log and identifying when the local clock is being selected as the best clock. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --

[Linuxptp-devel] [PATCH 1/2] phc_ctl: display all capability information

2019-09-26 Thread Jacob Keller
The capability command for phc_ctl does not display the number of pins or the cross timestamping support. Add this as output so that the user can see the complete device capabilities. Signed-off-by: Jacob Keller --- phc_ctl.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff

[Linuxptp-devel] [PATCH 0/2] additions to phc_ctl

2019-09-26 Thread Jacob Keller
on for all of the supported pins. Suggestions on how to format this this output is appreciated. I would almost think it's better to combine the printing into a single pr_* buffer.. but the only way I can think to do that would be using a local buffer to build up the longer string. Jacob Keller (2): phc_ctl: d

[Linuxptp-devel] [PATCH 2/2] phc_ctl: add pin_cfg command to display pin functions

2019-09-26 Thread Jacob Keller
Add a new function to phc_ctl to display the devices pin configuration data. First, obtain the device capabilities to determine the number of pins. Then, for each pin, print the name, function, and channel information. Signed-off-by: Jacob Keller --- phc_ctl.c | 73

Re: [Linuxptp-devel] More fun with i210 EXTTS: measure some PPS against a reference PPS

2020-03-05 Thread Jacob Keller
On 3/5/2020 1:11 AM, Frantisek Rysanek wrote: > And another sideways question is: in the i210 hardware, there's a > register called SYSTIMR, supposedly holding the fraction of a > nanosecond (= sub-nanosecond resolution). And this register is > ignored by the igb driver in Linux - first and

Re: [Linuxptp-devel] [PATCH RFC 06/30] interface: Introduce an access method for the name field.

2020-03-05 Thread Jacob Keller
On 3/4/2020 8:56 AM, Richard Cochran wrote: > On Tue, Feb 18, 2020 at 11:33:32AM -0800, Jacob Keller wrote: >> So the interface.o isn't being added to something like $(CONFIG)? > > I like the idea, but I'll leave that as a follow-on task. > > Thanks, > Richard > Y

Re: [Linuxptp-devel] [PATCH RFC 07/30] Convert call sites to the proper method for getting interface names.

2020-03-05 Thread Jacob Keller
On 3/4/2020 8:59 AM, Richard Cochran wrote: > On Tue, Feb 18, 2020 at 11:38:43AM -0800, Jacob Keller wrote: >> >> Is there a way to generate the network of how interconnected the various >> object files are? > > The .d files have the includes. I once wrote a sc

Re: [Linuxptp-devel] More fun with i210 EXTTS: measure some PPS against a reference PPS

2020-03-05 Thread Jacob Keller
On 3/5/2020 8:19 AM, Frantisek Rysanek wrote: > during the initial settling of the PHC frequency / servo loop, > I can see offsets in low units of ns, not aligned in any way. > But: once the PHC settles to offset==0 && ppb==0, > any measured edges captured via EXTTS channel 0 or 1 > will be

Re: [Linuxptp-devel] [PATCH RFC 28/30] interface: Hide the implementation details.

2020-03-05 Thread Jacob Keller
On 3/4/2020 9:24 AM, Richard Cochran wrote: > On Tue, Feb 18, 2020 at 01:32:01PM -0800, Jacob Keller wrote: >> I'd appreciate if there was some way to ensure we catch the interface >> structure layout changing such that the definitions in clock.c and >> config.c aren't compat

Re: [Linuxptp-devel] [PATCH RFC 20/30] interface: Introduce a method to test the time stamping information validity.

2020-03-05 Thread Jacob Keller
On 3/4/2020 9:13 AM, Richard Cochran wrote: > On Tue, Feb 18, 2020 at 01:19:09PM -0800, Jacob Keller wrote: >>> +bool interface_tsinfo_valid(struct interface *iface) >>> +{ >>> + return iface->ts_info.valid ? true : false; >>> +} >> >

Re: [Linuxptp-devel] [PATCH RFC 24/30] interface: Introduce methods to create and destroy instances.

2020-03-05 Thread Jacob Keller
On 3/4/2020 9:19 AM, Richard Cochran wrote: > On Tue, Feb 18, 2020 at 01:25:00PM -0800, Jacob Keller wrote: >> >> I still think it would be good to have the functions guarantee the NULL >> by manually assigning or using one of the string copy implementations >> that

Re: [Linuxptp-devel] [PATCH RFC 14/30] interface: Introduce a method to set the name.

2020-03-05 Thread Jacob Keller
On 3/4/2020 9:06 AM, Richard Cochran wrote: > On Tue, Feb 18, 2020 at 01:07:52PM -0800, Jacob Keller wrote: >> >> Good, the name is marked as constant. Side note, for those interface_* >> functions that don't modify the interface, does it make sense to mark >> them

Re: [Linuxptp-devel] [PATCH 1/3] clock: reset master/local rr when best clock id changes

2020-02-04 Thread Jacob Keller
On 2/4/2020 2:34 PM, Erik Hons wrote: > This fixes an issue with free running clocks. When the master clock id > changes the measured master/local ratio should be reset. If it isn't, > and the local clock becomes master, then the last measured ratio to > the old master continues to be used in peer

Re: [Linuxptp-devel] [PATCH RFC 01/30] Group related objects together within the makefile.

2020-02-18 Thread Jacob Keller
ith that. This makes sense and helps prevent possible bugs in the future. Additionally, adding more groups can be done over time in case new modules have similar coupling in the future. Reviewed-by: Jacob Keller > --- > makefile | 32 +--- > 1 file changed,

Re: [Linuxptp-devel] [PATCH RFC 05/30] Move the network interface into its own header file.

2020-02-18 Thread Jacob Keller
ed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > config.h| 15 +-- > interface.h | 28 > 2 files changed, 29 insertions(+), 14 deletions(-) > create mode 100644 interface.h > > diff --git a/config.h b/config.h > inde

Re: [Linuxptp-devel] [PATCH RFC 10/30] interface: Introduce a method to get the time stamping information.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > In order to prevent users from open coding this logic, this patch > provides a method that populates the time stamping information from > the interface label. > > Signed-off-by: Richard Cochran Makes sense. Reviewed-b

Re: [Linuxptp-devel] [PATCH RFC 13/30] Convert call sites to the proper method for initializing the time stamping label.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran > --- > clock.c | 12 +--- > nsm.c| 4 +--- > pmc_common.c | 4 +--- > 3 files changed, 3 insertions(+), 17 deletions(-) > Reviewed-by: Jacob Keller > diff -

Re: [Linuxptp-devel] [PATCH RFC 21/30] Convert call sites to the proper method for testing time stamp info validity.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Straight forward. Reviewed-by: Jacob Keller > --- > clock.c | 4 ++-- > port.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/clock.c b/clock.c > index

Re: [Linuxptp-devel] [PATCH RFC 07/30] Convert call sites to the proper method for getting interface names.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:03 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran > --- > clock.c| 21 +++-- > config.c | 12 +++- > makefile | 10 +- > nsm.c | 9 + > pmc_common.c | 2 +- > port.c | 19

Re: [Linuxptp-devel] [PATCH RFC 08/30] interface: Introduce an access method for the time stamping label.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:03 AM, Richard Cochran wrote: > Many of the users only require a read only reference to the time > stamping label of the interface. This patch adds an appropriate > method. > > Signed-off-by: Richard Cochran Reviewed-b

Re: [Linuxptp-devel] [PATCH RFC 17/30] Convert call sites to the proper method for setting the time stamping label.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran > --- > clock.c | 6 -- > nsm.c | 5 - > port.c | 2 +- > rtnl.c | 2 +- > rtnl.h | 4 +++- > 5 files changed, 13 insertions(+), 6 deletions(-) > > diff --git a/clock.c b/clock.c > index

Re: [Linuxptp-devel] [PATCH RFC 18/30] interface: Introduce a method to get the PHC index.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > interface.c | 5 + > interface.h | 7 +++ > 2 files changed, 12 insertions(+) > > diff --git a/interface.c b/interface.c > index

Re: [Linuxptp-devel] [PATCH RFC 08/30] interface: Introduce an access method for the time stamping label.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:03 AM, Richard Cochran wrote: > Many of the users only require a read only reference to the time > stamping label of the interface. This patch adds an appropriate > method. > > Signed-off-by: Richard Cochran Makes sense. > --- > interface.c | 5 + > interface.h | 9

Re: [Linuxptp-devel] [PATCH RFC 20/30] interface: Introduce a method to test the time stamping information validity.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > interface.c | 5 + > interface.h | 8 > 2 files changed, 13 insertions(+) > > diff --git a/interface.c b/interface.c > index

Re: [Linuxptp-devel] [PATCH RFC 19/30] Convert call sites to the proper method for getting the PHC index.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > clock.c | 2 +- > port.c | 17 ++--- > 2 files changed, 11 insertions(+), 8 deletions(-) > > diff --git a/clock.c b/clock.c > index

Re: [Linuxptp-devel] [PATCH RFC 18/30] interface: Introduce a method to get the PHC index.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran > --- > interface.c | 5 + > interface.h | 7 +++ > 2 files changed, 12 insertions(+) > > diff --git a/interface.c b/interface.c > index d7eeb41..02f63a0 100644 > --- a/interface.c > +++ b/interface.c > @@

Re: [Linuxptp-devel] [PATCH RFC 26/30] config: Use the proper create/destroy API for network interfaces.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > config.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/config.c b/config.c > index 717ee65..e033842 100644 > --- a/c

Re: [Linuxptp-devel] [PATCH RFC 25/30] clock: Use the proper create/destroy API for network interfaces.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > clock.c | 17 + > 1 file changed, 9 insertions(+), 8 deletions(-) > > diff --git a/clock.c b/clock.c > index 71b5795..e5f104e 100644 > --- a

Re: [Linuxptp-devel] [PATCH RFC 11/30] Convert call sites to the proper method for getting time stamp information.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > clock.c | 2 +- > port.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/clock.c b/clock.c > index 66c6bc1..f987965 100644

Re: [Linuxptp-devel] [PATCH RFC 14/30] interface: Introduce a method to set the name.

2020-02-18 Thread Jacob Keller
hran Reviewed-by: Jacob Keller > --- > interface.c | 5 + > interface.h | 8 +++- > 2 files changed, 12 insertions(+), 1 deletion(-) > > diff --git a/interface.c b/interface.c > index 662552d..3811679 100644 > --- a/interface.c > +++ b/interface.c > @@ -27

Re: [Linuxptp-devel] [PATCH RFC 12/30] interface: Introduce a method to initialize the time stamping label.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > In many cases, the time stamping label will be the same as the name of > the interface. In order to prevent users from open coding the logic that > initializes the label from the interface name, this patch add an > appropriate method. > >

Re: [Linuxptp-devel] [PATCH RFC 24/30] interface: Introduce methods to create and destroy instances.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > In order to eventually hide the implementation details of the interface, > users will need to be able to create and destroy instances thereof. This > patch adds the needed methods. > > Signed-off-by: Richard Cochran Reviewed-b

Re: [Linuxptp-devel] [PATCH RFC 09/30] Convert call sites to the proper method for getting interface labels.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:03 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Straight forward. Besides wondering about the object groups in the makefile, Reviewed-by: Jacob Keller > --- > clock.c | 2 +- > port.c | 17 ++--- > raw.c | 5 +++-- > udp.c

Re: [Linuxptp-devel] [PATCH RFC 12/30] interface: Introduce a method to initialize the time stamping label.

2020-02-18 Thread Jacob Keller
; > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > interface.c | 7 +++ > interface.h | 6 ++ > 2 files changed, 13 insertions(+) > > diff --git a/interface.c b/interface.c > index 460ceb8..662552d 100644 > --- a/interface.c > +++ b/inte

Re: [Linuxptp-devel] [PATCH RFC 22/30] interface: Introduce a method to test supported time stamping modes.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > interface.c | 8 > interface.h | 8 > 2 files changed, 16 insertions(+) > > diff --git a/interface.c b/interface.c > index

Re: [Linuxptp-devel] [PATCH RFC 23/30] Convert call sites to the proper method for testing time stamping modes.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > clock.c | 2 +- > port.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/clock.c b/clock.c > index 845e27a..71b5795 100644

Re: [Linuxptp-devel] [PATCH RFC 29/30] interface: Silence warning from gcc version 8.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > When compiling with gcc8 and -O2, the clever compiler complains: > >interface.c: In function ‘interface_ensure_tslabel’: >interface.c:38:3: error: ‘strncpy’ output may be truncated copying 108 > bytes from a string of length 108

Re: [Linuxptp-devel] [PATCH RFC 02/30] config: Constify the public interface.

2020-02-18 Thread Jacob Keller
at! It helps make behavior explicit. > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > config.c | 4 ++-- > config.h | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/config.c b/config.c > index 12eb1f9..65afa70 100644 > ---

Re: [Linuxptp-devel] [PATCH RFC 03/30] rtnl: Constify the public interface.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:03 AM, Richard Cochran wrote: > Three of the rtnl methods never modify the strings passed in. This > patch adds the const keyword to ensure these functions stay that way. > > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > rtnl.c | 6 ++

Re: [Linuxptp-devel] [PATCH RFC 04/30] utils: Constify the posix clock interface.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:03 AM, Richard Cochran wrote: > The function to open a posix clock never modifies the passed in > string. This patch adds the const keyword to ensure this function > stays that way. > > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller >

Re: [Linuxptp-devel] [PATCH RFC 06/30] interface: Introduce an access method for the name field.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:03 AM, Richard Cochran wrote: > Many of the users only require a read only reference to the interface name. > This patch adds an appropriate method. > Right. > Signed-off-by: Richard Cochran --- > interface.c | 12 > interface.h | 7 +++ > makefile| 8

Re: [Linuxptp-devel] [PATCH RFC 15/30] Convert call sites to the proper method for setting the name.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > clock.c | 5 +++-- > config.c | 2 +- > pmc_common.c | 2 +- > 3 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/clock.c b

Re: [Linuxptp-devel] [PATCH RFC 16/30] interface: Introduce a method to set the time stamping label.

2020-02-18 Thread Jacob Keller
hran Reviewed-by: Jacob Keller > --- > interface.c | 5 + > interface.h | 7 +++ > 2 files changed, 12 insertions(+) > > diff --git a/interface.c b/interface.c > index 3811679..d7eeb41 100644 > --- a/interface.c > +++ b/interface.c > @@ -28,6 +28,11 @@ const

Re: [Linuxptp-devel] [PATCH RFC 27/30] pmc: Use the proper create/destroy API for network interfaces.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > pmc_common.c | 19 --- > 1 file changed, 12 insertions(+), 7 deletions(-) > > diff --git a/pmc_common.c b/pmc_common.c > index 41

Re: [Linuxptp-devel] [PATCH RFC 00/30] Convert open coded interface into proper module.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:03 AM, Richard Cochran wrote: > Using gcc8 and -O2, the compiler emits an annoying false positive > warning. Since I want to have -Werror, I went about fixing it. Start > pulling on a thread, and ... > Excellent goal! > The 'struct interface' is wide open to its users, and each

Re: [Linuxptp-devel] [PATCH V2 4/6] Add definitions for PTP pin ioctls for backwards kernel compatibility.

2020-03-11 Thread Jacob Keller
On 3/11/2020 11:24 AM, Richard Cochran wrote: > Upcoming functionality will need to configure the input and output pins of > PHC devices. However, this requires fairly recent kernel support. This > patch adds the needed definitions for compiling with older kernel headers. > > In addition,

Re: [Linuxptp-devel] [PATCH V2 2/6] Remove the unfinished SNMP code.

2020-03-11 Thread Jacob Keller
potentially misleading end users about the > scope and completeness of the features. > > Signed-off-by: Richard Cochran Makes sense. It can always be revived. Reviewed-by: Jacob Keller > --- > makefile| 14 > snmp4lptp.8 | 119 -

Re: [Linuxptp-devel] [PATCH V2 1/6] clock: Safely remove event subscribers from list.

2020-03-11 Thread Jacob Keller
priate macro. > > Fixes: 5104e3e56b59 ("Event subscribing") > Signed-off-by: Richard Cochran > Reported-by: Michael Walle Straight forward conversion. Reviewed-by: Jacob Keller > --- > clock.c | 9 - > 1 file changed, 4 insertions(+), 5 deletions(-)

Re: [Linuxptp-devel] [PATCH V1 RFC 0/5] GPS based Grand Master Support

2020-05-01 Thread Jacob Keller
On 5/1/2020 12:05 PM, Richard Cochran wrote: > This series adds support for substantial new features. > > 1. Using a 1-PPS signal from a GPS in order to become a Grand Master >from a high quality, globally traceable time source. > > 2. Using a heterogeneous group of PHC cards wired

Re: [Linuxptp-devel] [PATCH 07/11] port: Convey targeted forwarding errors to the caller.

2020-05-18 Thread Jacob Keller
Reviewed-by: Jacob Keller On 5/16/2020 8:03 AM, Richard Cochran wrote: > The port_forward_to() method clobbers the specific error code returned > by the transport layer with -1. This patch lets the code preserve the > specific error in question. > > Signed-off-by:

Re: [Linuxptp-devel] [PATCH 08/11] util: Mark port identity comparisons as const.

2020-05-18 Thread Jacob Keller
Reviewed-by: Jacob Keller On 5/16/2020 8:03 AM, Richard Cochran wrote: > The utility function to compare port IDs takes pointers, but it only needs > to read the referenced data. This patch marks the parameters as const, > allowing passing constants in the future. > > Signed-

Re: [Linuxptp-devel] [PATCH 06/11] sk: Convey transmit path errors to the caller.

2020-05-18 Thread Jacob Keller
Reviewed-by: Jacob Keller On 5/16/2020 8:03 AM, Richard Cochran wrote: > The transport layer's functional interface foresees having error codes > percolate back up to the caller. However, up until now, the sk module > simply returned -1 for any error. This patch lets the co

Re: [Linuxptp-devel] [PATCH V1 1/2] Decouple servo state from automotive profile.

2020-05-18 Thread Jacob Keller
On 5/16/2020 7:42 AM, Richard Cochran wrote: > From: Vincent Cheng > > The logic for the Automotive Profile added a message interval update > mechanism that triggers whenever the servo enters the "stable locked" > state. This SERVO_LOCKED_STABLE state is active when the > configuration

Re: [Linuxptp-devel] [RFC PATCH 3/3] phc2pwm: Introduce an utility to sync pwm with PTP clock

2020-05-18 Thread Jacob Keller
On 5/16/2020 11:22 AM, Lokesh Vutla via Linuxptp-devel wrote: > Hi Richard, > > On 16/05/20 10:44 PM, Richard Cochran wrote: >> On Sat, May 16, 2020 at 10:35:33PM +0530, Lokesh Vutla wrote: >>> Hi Richard, >>> >>> On 16/05/20 10:24 PM, Richard Cochran wrote: On Fri, Apr 17, 2020 at

Re: [Linuxptp-devel] [PATCH 04/11] uds: Convey transmit path errors to the caller.

2020-05-18 Thread Jacob Keller
On 5/18/2020 4:24 PM, Richard Cochran wrote: > On Mon, May 18, 2020 at 04:17:34PM -0700, Jacob Keller wrote: >>> @@ -119,8 +119,8 @@ static int uds_send(struct transport *t, struct fdarray >>> *fda, >>> addr = >address; >>> >>>

Re: [Linuxptp-devel] [PATCH 09/11] port: Export the value of the wildcard port identity.

2020-05-18 Thread Jacob Keller
Reviewed-by: Jacob Keller On 5/16/2020 8:03 AM, Richard Cochran wrote: > Code in other modules will need this special port ID value. This patch > makes it available through the port header file. > > Signed-off-by: Richard Cochran > --- > port.h | 3 +++ >

Re: [Linuxptp-devel] [PATCH 10/11] port: Publish the method for creating signaling messages.

2020-05-18 Thread Jacob Keller
Reviewed-by: Jacob Keller On 5/16/2020 8:03 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran > --- > port.h | 3 +++ > port_signaling.c | 4 ++-- > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/port.h b/port.h > index

Re: [Linuxptp-devel] [PATCH 03/11] udp6: Convey transmit path errors to the caller.

2020-05-18 Thread Jacob Keller
Reviewed-by: Jacob Keller On 5/16/2020 8:03 AM, Richard Cochran wrote: > The transport layer's functional interface foresees having error codes > percolate back up to the caller. However, up until now, the udp6 module > simply returned -1 for any error. This patch lets the co

Re: [Linuxptp-devel] [PATCH 01/11] transport: Correct grammar in the doxygen comments.

2020-05-18 Thread Jacob Keller
Reviewed-by: Jacob Keller On 5/16/2020 8:03 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran > --- > transport.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/transport.h b/transport.h > index 5b8c413..7a7f87b 100644 > -

Re: [Linuxptp-devel] [PATCH 02/11] udp: Convey transmit path errors to the caller.

2020-05-18 Thread Jacob Keller
Reviewed-by: Jacob Keller On 5/16/2020 8:03 AM, Richard Cochran wrote: > The transport layer's functional interface foresees having error codes > percolate back up to the caller. However, up until now, the udp module > simply returned -1 for any error. This patch lets the co

Re: [Linuxptp-devel] [PATCH 11/11] Reject path trace TLVs with excessive elements.

2020-05-18 Thread Jacob Keller
Reviewed-by: Jacob Keller On 5/16/2020 8:03 AM, Richard Cochran wrote: > The current code truncates the size of path trace TLVs which exceed the > expected maximum based on the largest possible message size. However if > another TLV follows, then a gap would appear, that is

Re: [Linuxptp-devel] [PATCH 04/11] uds: Convey transmit path errors to the caller.

2020-05-18 Thread Jacob Keller
Reviewed-by: Jacob Keller On 5/16/2020 8:03 AM, Richard Cochran wrote: > The transport layer's functional interface foresees having error codes > percolate back up to the caller. However, up until now, the uds module > simply returned -1 for any error. This patch lets the co

Re: [Linuxptp-devel] [PATCH 05/11] raw: Convey transmit path errors to the caller.

2020-05-18 Thread Jacob Keller
Reviewed-by: Jacob Keller This one is even easier to tell it is correct. On 5/16/2020 8:03 AM, Richard Cochran wrote: > The transport layer's functional interface foresees having error codes > percolate back up to the caller. However, up until now, the raw module > simply returned -

Re: [Linuxptp-devel] PPS generation on BeagleBoneBlack

2020-03-18 Thread Jacob Keller
On 3/16/2020 1:58 PM, Grygorii Strashko via Linuxptp-devel wrote: >> This is the userspace program I have worked on to get the synchronization >> working. Currently the servo part of the tool is in very hacky shape. Before >> cleanup I wanted to get more inputs on where it can be integrated.

Re: [Linuxptp-devel] [PATCH V3 0/6] Clean up in preparation for GrandMaster support.

2020-03-23 Thread Jacob Keller
On 3/21/2020 4:57 AM, Richard Cochran wrote: > I have been preparing Balint Ferencz's ts2phc program for review on > this list. The present series presents a mixture of fixes and new > code in support of the upcoming GrandMaster features. > > Patches 1-3 are random fixes found along the way.

Re: [Linuxptp-devel] [PATCH 5/6] Add PHC methods for querying and configuring the pin functionality.

2020-03-09 Thread Jacob Keller
On 3/9/2020 7:27 AM, Jiri Benc wrote: > On Mon, 9 Mar 2020 07:16:23 -0700, Richard Cochran wrote: >> But maybe that wouldn't be worst thing in the world. There is a trade >> off between maintaining parallel copies of ptp_clock_caps and the >> convenience of compiling the stack just once with the

Re: [Linuxptp-devel] [RFC PATCH 01/15] posix_clock_open: derive PHC index from device name if possible

2020-08-17 Thread Jacob Keller
[RFC PATCH 01/15] posix_clock_open: derive PHC >> index from device name if possible >> >> On Wed, Aug 05, 2020 at 04:12:02PM -0700, Jacob Keller wrote: >>> Here, we are making the implicit assumption that all ptp clock devices >>> will always have /dev

Re: [Linuxptp-devel] [PATCH RFC 0/1] Introduce inclusive terminology

2020-08-18 Thread Jacob Keller
On 8/18/2020 1:43 PM, Richard Cochran wrote: > There is an industry wide effort underway to replace historically and > culturally loaded terms like master/slave with neutral alternatives. > The IEEE 1588 committee will most likely amend the standard, but so > far no consensus on the new

Re: [Linuxptp-devel] [PATCH RFC 0/1] Introduce inclusive terminology

2020-08-20 Thread Jacob Keller
On 8/20/2020 2:16 PM, Vladimir Oltean wrote: > On Thu, Aug 20, 2020 at 11:07:09AM -0700, Richard Cochran wrote: >> On Thu, Aug 20, 2020 at 06:45:37PM +0300, Vladimir Oltean wrote: >> >>> What if the terms on which IEEE 1588 settles are not the terms in your >>> mind ("source"/"sink")? >> >>

Re: [Linuxptp-devel] [PATCH 4/8] ts2phc: nmea: Add a configuration option for the current leap seconds file.

2020-09-21 Thread Jacob Keller
On 9/21/2020 11:58 AM, Richard Cochran wrote: > The PTP time scale is TAI, and a PTP GM needs to provide it. However, most > GPS devices only provide UTC time of day information, and they do not, in > general, offer any kind of reliable, standardized leap seconds data. After > all, this

Re: [Linuxptp-devel] [RFC PATCH 01/15] posix_clock_open: derive PHC index from device name if possible

2020-10-02 Thread Jacob Keller
01/15] posix_clock_open: derive PHC >> index from device name if possible >> >> On Wed, Aug 05, 2020 at 04:12:02PM -0700, Jacob Keller wrote: >>> Here, we are making the implicit assumption that all ptp clock devices >>> will always have /dev/ptpX format. I don't th

Re: [Linuxptp-devel] [PATCH RFC 0/1] Introduce inclusive terminology

2020-10-27 Thread Jacob Keller
On 10/27/2020 4:26 PM, Richard Cochran wrote: > On Mon, Aug 24, 2020 at 09:41:06AM +0200, Miroslav Lichvar wrote: >> It seems you are set on this terminology. I think it would work for >> me, although in my head I mostly see the packets on the network >> instead of a time signal. Have you

[Linuxptp-devel] [PATCH] phc_ctl: display all capability information

2020-08-05 Thread Jacob Keller
The capability command for phc_ctl does not display the number of pins or the cross timestamping support. Add this as output so that the user can see the complete device capabilities. Signed-off-by: Jacob Keller --- phc_ctl.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff

Re: [Linuxptp-devel] [RFC PATCH 01/15] posix_clock_open: derive PHC index from device name if possible

2020-08-05 Thread Jacob Keller
On 8/1/2020 10:46 AM, Vladimir Oltean wrote: > Currently the PHC index is retrieved only through an ethtool ioctl if > the PHC is specified as an Ethernet interface. If it's a char device > such as /dev/ptp5, the phc_index will remain unpopulated. Try to infer > it from the char device's path.

Re: [Linuxptp-devel] [RFC PATCH 04/15] pmc_common: fix potential memory leak in run_pmc_events()

2020-08-05 Thread Jacob Keller
The subject says "potential" leak, but in fact it looks like we leaked every single time we succeeded. On 8/1/2020 10:46 AM, Vladimir Oltean wrote: > The convention in all other parts of the code that call run_pmc() is to > free the management PTP message if an error code was returned, or pass >

Re: [Linuxptp-devel] [RFC PATCH 05/15] ts2phc: create a private data structure

2020-08-05 Thread Jacob Keller
ce. Hoever, I think it's a significant improvement on the current state of things, and trying to do this transition piece-meal would be difficult. Avoiding global variables here is definitely an improvement, as it makes it easier to think about who has access to what data. Reviewed-by: Jacob Keller >

Re: [Linuxptp-devel] [RFC PATCH 07/15] ts2phc: instantiate a full clock structure for every PHC master

2020-08-05 Thread Jacob Keller
On 8/1/2020 10:46 AM, Vladimir Oltean wrote: > This propagates the use of "struct ts2phc_private" all the way into the > master API, in preparation of a new use case that will be supported > soon: some PPS masters (to be precise, the "PHC" kind) instantiate a > struct clock which could be

Re: [Linuxptp-devel] [RFC PATCH 07/15] ts2phc: instantiate a full clock structure for every PHC master

2020-08-05 Thread Jacob Keller
On 8/1/2020 10:46 AM, Vladimir Oltean wrote: > This is particularly useful when using the "automatic" mode of ts2phc, > and the PPS distribution tree is fixed in hardware (as opposed to port > states). > This refers to work not yet implemented by any of its parent commits. It might make sense

Re: [Linuxptp-devel] [RFC PATCH 02/15] phc2sys: rename struct node to struct phc2sys_private

2020-08-05 Thread Jacob Keller
ke node might be too generic. But the change to phc2sys_private seems reasonable. The patch is noisy, but I checked using word-diff and it only changes the name. Reviewed-by: Jacob Keller > > Signed-off-by: Vladimir Oltean > --- > phc2sys.c | 433

Re: [Linuxptp-devel] [RFC PATCH 03/15] phc2sys: break out pmc code into pmc_common.c

2020-08-05 Thread Jacob Keller
can be reused by other > modules. Ah, perfect: pmc_node is not too generic, so this is great. I looked this over using git diff with the moved lines coloring options, and the only places where the new code differs is in name change from priv to pmc_node. Makes sense. Reviewed-by: Jacob Kell

Re: [Linuxptp-devel] [RFC PATCH 06/15] ts2phc: instantiate a full clock structure for every slave PHC

2020-08-05 Thread Jacob Keller
On 8/1/2020 10:46 AM, Vladimir Oltean wrote: > Slaves in ts2phc are PHC devices that implement the extts kernel API. > They are slaves just in the sense that they timestamp a pulse emitted by > somebody else. > > Currently in ts2phc, PPS slaves are also the only candidates for the > clocks

Re: [Linuxptp-devel] [RFC PATCH 08/15] ts2phc: instantiate a pmc node

2020-08-05 Thread Jacob Keller
On 8/1/2020 10:46 AM, Vladimir Oltean wrote: > This introduces the '-a' option in ts2phc, an option inspired from > phc2sys that puts the clocks in "automatic" mode. In this mode, ts2phc > listens, as a PMC, to port state change events from ptp4l, and detects > which port state machine, if any,

Re: [Linuxptp-devel] [RFC PATCH 09/15] ts2phc_slave: print master offset

2020-08-05 Thread Jacob Keller
On 8/1/2020 10:46 AM, Vladimir Oltean wrote: > Make this information more visible by default, since it is the key > output of this program. > > Signed-off-by: Vladimir Oltean Yep. Reviewed-by: Jacob Keller > --- > ts2phc_slave.c | 4 ++-- > 1 file changed, 2 inser

Re: [Linuxptp-devel] [RFC PATCH 15/15] ts2phc_phc_master: make use of new kernel API for perout waveform

2020-08-05 Thread Jacob Keller
On 8/1/2020 10:46 AM, Vladimir Oltean wrote: > This API was introduced for 2 reasons: > > 1. Some hardware can emit PPS signals but not starting from arbitrary >absolute times, but rather phase-aligned to the beginning of a >second. We _could_ patch ts2phc to always specify a start

Re: [Linuxptp-devel] [PATCH] ts2phc_phc_master: specify start time to PPS master as 0.000000000

2020-07-06 Thread Jacob Keller
On 6/26/2020 5:55 AM, Richard Cochran wrote: > On Fri, Jun 26, 2020 at 01:15:11PM +0300, Vladimir Oltean wrote: > >> So, to your point: I didn't see any driver that _rejects_ time in the >> past. If it works, I don't know. If it doesn't work, I would do the >> time fixup at driver level, so in

Re: [Linuxptp-devel] [PATCH] ts2phc_phc_master: specify start time to PPS master as 0.000000000

2020-07-06 Thread Jacob Keller
On 6/26/2020 3:15 AM, Vladimir Oltean wrote: > *Although clock stepping makes that challenging. But I don't know how > many drivers still treat perout correctly after a clock step, and I'm > not even sure what the correct treatment would be. > The way I've seen this done in the past is to

Re: [Linuxptp-devel] [PATCH v2 1/3] ptp4l: call recvmsg() with the MSG_DONTWAIT flag

2020-06-18 Thread Jacob Keller
On 6/15/2020 8:23 AM, Vladimir Oltean wrote: > The application's main event loop (clock_poll) is woken up by poll() and > dispatches the socket receive queue events to the corresponding ports as > needed. > > So it is a bug if poll() wakes up the process for data availability on a > socket's

Re: [Linuxptp-devel] [PATCH v2 2/3] clock: dump unexpected packets received on the error queues of sockets

2020-06-18 Thread Jacob Keller
On 6/15/2020 8:23 AM, Vladimir Oltean wrote: > In the current design of the SO_SELECT_ERR_QUEUE socket option (which is > enabled by sk_timestamping_init on the event fd), it is a bug to only > check revents & POLLIN, but not also POLLERR. > > Normally the error queue events that the

Re: [Linuxptp-devel] [PATCH v2 2/3] clock: dump unexpected packets received on the error queues of sockets

2020-06-18 Thread Jacob Keller
On 6/18/2020 12:56 PM, Vladimir Oltean wrote: >> Could this use the pr facility, so that it honors the printing options >> to log to syslog and manages the level? >> >> I'm not sure what I would mark these as: debug because they no longer >> impact the syncing process, or true error because

  1   2   >