Re: [Linuxptp-devel] [PATCH] Avoid setting clock frequency when free running.

2020-11-11 Thread Jacob Keller
On 11/9/2020 8:14 AM, Richard Cochran wrote: > On Mon, Nov 09, 2020 at 10:12:58AM +0100, Miroslav Lichvar wrote: >> >> Makes sense to me, but maybe it's time to drop the workaround? Looking >> at the git log, it was added in 2013. Are people still using linuxptp >> on kernels older than that? >

Re: [Linuxptp-devel] [PATCH 1/7] Introduce error codes for the run_pmc method.

2020-11-11 Thread Jacob Keller
On 11/11/2020 10:50 AM, Richard Cochran wrote: > On Wed, Nov 11, 2020 at 10:35:20AM -0800, Jacob Keller wrote: >> Thoughts on making this an enum instead so that it's even more clear >> from the function signatures that this is not an integer return code? >> The run_pm

Re: [Linuxptp-devel] [PATCH 1/4] pmc_agent: Convert the method that queries TAI-UTC offset into the canonical form.

2020-11-30 Thread Jacob Keller
s that send and receive over the network > from those that merely return a cached value. > > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller I appreciate the function rename too, it seems a bit more clear. (Plus, if this were a project with many patches in flight, renaming th

Re: [Linuxptp-devel] [PATCH 2/4] pmc_agent: Convert the method that queries the port properties.

2020-11-30 Thread Jacob Keller
On 11/28/2020 9:08 AM, Richard Cochran wrote: > Prefix the function with the module name and correct the return code > semantics. > > The active word in the function's name is "query" rather that "get" in > order to distinguish methods that send and receive over the network > from those that me

Re: [Linuxptp-devel] [PATCH 4/4] pmc_agent: Simplify the method that gets of the number of local ports.

2020-11-30 Thread Jacob Keller
On 11/28/2020 9:08 AM, Richard Cochran wrote: > The number of ports is already available in the cached default data > set. Use it directly. > > Signed-off-by: Richard Cochran > --- > phc2sys.c | 2 +- > pmc_agent.c | 24 > pmc_agent.h | 11 ++- > 3 files c

Re: [Linuxptp-devel] [PATCH 1/6] phc2sys: Don't duplicate the command line arguments.

2020-11-30 Thread Jacob Keller
nts directly. > > Signed-off-by: Richard Cochran Yep, makes sense. Reviewed-by: Jacob Keller > --- > phc2sys.c | 12 > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/phc2sys.c b/phc2sys.c > index c300984..13cf235 100644 > --- a/phc2sys.c > +

Re: [Linuxptp-devel] [PATCH 2/6] phc2sys: Rename PMC agent pointer from node to agent.

2020-11-30 Thread Jacob Keller
On 11/29/2020 7:50 PM, Richard Cochran wrote: > Node is not a very descriptive name. Rename it. > > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > phc2sys.c | 48 > 1 file changed, 24 insertion

Re: [Linuxptp-devel] [PATCH 3/6] phc2sys: Replace hard coded tests with a readable helper function.

2020-11-30 Thread Jacob Keller
ed-off-by: Richard Cochran Makes sense. Reviewed-by: Jacob Keller > --- > phc2sys.c | 14 ++ > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/phc2sys.c b/phc2sys.c > index e17909f..f28e9be 100644 > --- a/phc2sys.c > +++ b/phc2sys.c > @@ -

Re: [Linuxptp-devel] [PATCH 4/6] phc2sys: Validate the PPS mode right away.

2020-11-30 Thread Jacob Keller
n Makes sense. Reviewed-by: Jacob Keller > --- > phc2sys.c | 17 ++--- > 1 file changed, 10 insertions(+), 7 deletions(-) > > diff --git a/phc2sys.c b/phc2sys.c > index f28e9be..03347f0 100644 > --- a/phc2sys.c > +++ b/phc2sys.c > @@ -1245,6

Re: [Linuxptp-devel] [PATCH 5/6] phc2sys: Expand the validation of the PPS mode.

2020-11-30 Thread Jacob Keller
n Reviewed-by: Jacob Keller > --- > phc2sys.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/phc2sys.c b/phc2sys.c > index 03347f0..e65bdf5 100644 > --- a/phc2sys.c > +++ b/phc2sys.c > @@ -1253,6 +1253,10 @@ int main(int argc, char *argv[]) >

Re: [Linuxptp-devel] [PATCH 6/6] phc2sys: Replace magical test with a proper test.

2020-11-30 Thread Jacob Keller
he code by using a proper test. > > Signed-off-by: Richard Cochran Significant improvement here, it is a bit more clear what's going on here now. Reviewed-by: Jacob Keller Thanks, Jake > --- > phc2sys.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > d

Re: [Linuxptp-devel] [PATCH v2 1/8] phc2sys: Update man page to reflect the new restriction on the PPS mode.

2021-01-07 Thread Jacob Keller
On 1/5/2021 6:42 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran > --- > phc2sys.8 | 16 > 1 file changed, 4 insertions(+), 12 deletions(-) > > diff --git a/phc2sys.8 b/phc2sys.8 > index b3a3de3..66007eb 100644 > --- a/phc2sys.8 > +++ b/phc2sys.8 > @@ -1,4 +1,4 @@

Re: [Linuxptp-devel] [PATCH v2 2/8] phc2sys: Convert man page to source/sink terminology.

2021-01-07 Thread Jacob Keller
On 1/5/2021 6:42 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran > --- Makes sense. I like this direction for the terminology change. Reviewed-by: Jacob Keller > phc2sys.8 | 24 > 1 file changed, 12 insertions(+), 12 deletions(-) >

Re: [Linuxptp-devel] [PATCH v2 3/8] phc2sys: Convert man page to client/server terminology.

2021-01-07 Thread Jacob Keller
On 1/5/2021 6:42 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > phc2sys.8 | 18 +- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/phc2sys.8 b/phc2sys.8 > index 7773fd0..99fc937 100

Re: [Linuxptp-devel] [PATCH v2 4/8] ptp4l: Convert man page to client/server terminology.

2021-01-07 Thread Jacob Keller
On 1/5/2021 6:42 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > ptp4l.8 | 80 + > 1 file changed, 41 insertions(+), 39 deletions(-) > > diff --git a/ptp4l.8 b/ptp4l

Re: [Linuxptp-devel] [PATCH v2 5/8] ts2phc: Convert man page to source/sink terminology.

2021-01-07 Thread Jacob Keller
On 1/5/2021 6:42 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > ts2phc.8 | 20 ++-- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/ts2phc.8 b/ts2phc.8 > index 77f8940..0bd523d 10

Re: [Linuxptp-devel] [PATCH v2 6/8] phc2sys: Convert usage messages to time source/sink terminology.

2021-01-07 Thread Jacob Keller
On 1/5/2021 6:42 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > phc2sys.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/phc2sys.c b/phc2sys.c > index aafff6c..70155f9 100644 >

Re: [Linuxptp-devel] [PATCH v2 7/8] ptp4l: Convert usage messages to client/server terminology.

2021-01-07 Thread Jacob Keller
On 1/5/2021 6:42 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > ptp4l.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ptp4l.c b/ptp4l.c > index 84661c5..ccbaa02 100644 > --- a/ptp4l.c &g

Re: [Linuxptp-devel] [PATCH v2 8/8] ts2phc: Convert usage message to time source/sink terminology.

2021-01-07 Thread Jacob Keller
On 1/5/2021 6:42 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > ts2phc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ts2phc.c b/ts2phc.c > index 2342858..bc41041 100644 > --- a/ts2phc.c >

Re: [Linuxptp-devel] [PATCH v2 0/8] Convert to inclusive terminology, Part I

2021-01-07 Thread Jacob Keller
On 1/5/2021 6:42 AM, Richard Cochran wrote: > * Changed in v2: > - Use client/server terminology in the phc2sys man page. > - Add missing source/sink conversions in the phc2sys man page. > > > There is an industry wide effort underway to replace historically and > culturally loaded terms l

Re: [Linuxptp-devel] [RFC Patch 1/2] port: Add phc_from_cmdline to indicate the phc index was from the command line.

2021-01-07 Thread Jacob Keller
On 1/6/2021 11:39 AM, vincent.cheng...@renesas.com wrote: > From: Vincent Cheng > > Signed-off-by: Vincent Cheng > --- > port_private.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/port_private.h b/port_private.h > index fcabaa6..6e40e15 100644 > --- a/port_private.h > +++ b/por

Re: [Linuxptp-devel] [RFC Patch 2/2] port: Fix link down/up to continue using phc_index set from command line -p option.

2021-01-07 Thread Jacob Keller
On 1/6/2021 11:39 AM, vincent.cheng...@renesas.com wrote: > From: Vincent Cheng > > In the scenario where a port link goes down and up, current code checks > the port's phc_index against the interface's phc_index and if they are > different will set the port phc_index to the interface phc_inde

Re: [Linuxptp-devel] [PATCH v2 0/8] Convert to inclusive terminology, Part I

2021-01-11 Thread Jacob Keller
On 1/11/2021 9:05 AM, Richard Cochran wrote: > On Mon, Jan 11, 2021 at 10:07:41AM +0100, Miroslav Lichvar wrote: >> What will happen with the "grandmaster" term? Does it stay, or should > > No decision yet on that one. > >> it be replaced with something like "Primary time server"? > > That so

Re: [Linuxptp-devel] [PATCH 1/4] Check for deprecated "long" options on the command line.

2021-01-14 Thread Jacob Keller
On 1/14/2021 6:15 AM, Richard Cochran wrote: > The slaveOnly and masterOnly options will be deprecated in favor of > clientOnly and serverOnly, respectively. However, existing user scripts > may very well make use of these options. Apply the deprecated option > check to the long command line o

Re: [Linuxptp-devel] [PATCH 2/4] Deprecate the slaveOnly option in favor of clientOnly.

2021-01-14 Thread Jacob Keller
On 1/14/2021 6:15 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran > --- > clock.c | 4 ++-- > config.c | 5 - > port.c | 2 +- > ptp4l.c | 2 +- > timemaster.c | 2 +- > 5 files changed, 9 insertions(+), 6 deletions(-) > > diff --git a/clock.c b/clock.c > i

Re: [Linuxptp-devel] [RFC PATCH] clock: Add read-only UDS port for monitoring.

2021-01-21 Thread Jacob Keller
On 1/21/2021 12:31 AM, Miroslav Lichvar wrote: > On Wed, Jan 20, 2021 at 10:13:25PM +, Keller, Jacob E wrote: >> It makes sense to remove forwarding, but I am not sure I understand the >> justification for removing access to subscriptions.. if the subscription is >> for read only data, why

Re: [Linuxptp-devel] [PATCH 1/6] port: Don't assume transport from port number.

2021-01-26 Thread Jacob Keller
e clock number is zero. Reviewed-by: Jacob Keller > --- > port.c | 12 +++- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/port.c b/port.c > index 0a93c06..6136153 100644 > --- a/port.c > +++ b/port.c > @@ -3108,23 +3108,25 @@ struct port

Re: [Linuxptp-devel] [PATCH 5/6] clock: Add read-only UDS port for monitoring.

2021-01-26 Thread Jacob Keller
On 1/26/2021 2:00 AM, Miroslav Lichvar wrote: > Add a second UDS port to allow untrusted applications to monitor ptp4l. > On this "read-only" UDS port disable non-GET actions and forwarding. > The path can be configured with the uds_address2 option (default is > /var/run/ptp4lro). > should uds

Re: [Linuxptp-devel] [PATCH 1/1] clock: Introduce step_window to free run x seconds after a clock step.

2021-02-01 Thread Jacob Keller
On 2/1/2021 2:55 PM, vincent.cheng...@renesas.com wrote: > From: Vincent Cheng > > When clock stepping is unable to happen instantaneously the subsequent > timestamps after a clock step does not reflect the step result and > undesired clock freq and step adjustments will occur. > > When using

Re: [Linuxptp-devel] [PATCH 2/2] Clock Class Threshold Feature addition for PTP4L

2021-02-16 Thread Jacob Keller
On 2/14/2021 9:59 PM, Karthikkumar V wrote: > Implemented code review comments. > This code changes brings in the ability to program the acceptable > clockClass threshold beyond which device will move to holdover/free-run. > Default clockClass threshold is 248. > Example Use-Case > This is neede

Re: [Linuxptp-devel] SyncE support

2021-03-30 Thread Jacob Keller
On 3/22/2021 8:40 AM, Miroslav Lichvar wrote: > FWIW, some onboard NICs supported by the e1000e driver can > "cross-timestamp" using the Always Running Timer (ART), which should > avoid the asymmetry of PCIe. I have not seen any detailed description > of how it actually works. > I'm not sure in

Re: [Linuxptp-devel] [PATCH 0/1] Add master only management TLV

2021-04-22 Thread Jacob Keller
On 4/22/2021 8:46 AM, Luigi 'Comio' Mantellini wrote: > Generally speaking and in my opinion should be interesting to have the > following features: >  - asynchronous clock adjust: I2c is a slow bus with unpredictable > access time, especially when you have a lot of devices. this is a true > stor

Re: [Linuxptp-devel] [Linuxptp-users] phc2sys jump into huge value

2021-04-29 Thread Jacob Keller
On 4/29/2021 8:04 AM, ramesh t wrote: > hello Jake, > > Did time profiling using time ticks.  > Under the problem condition, observing clock_gettime of interface > connected to BC is taking more time ticks. This results in phc offset > jumping to 4 digit value momentarily. Also i'm not sure if r

Re: [Linuxptp-devel] Recover a faulty master port

2021-06-09 Thread Jacob Keller
On 6/7/2021 1:19 PM, YENDstudio wrote: > Hello, > > I have configure one of my machines as a unicast BC which is > synchronized to the grandmaster clock via the first of it's two ports. > The second port is used to provide sync to another local machine. This > setup works for a few hours after

Re: [Linuxptp-devel] [PATCH 2/2] Add setting of PTP_TIMESCALE flag

2021-06-14 Thread Jacob Keller
On 6/14/2021 5:03 AM, Miklas, Marcin via Linuxptp-devel wrote: > From: Marcin Miklas > > In gPTP PTP_TIMESCALE flag should be set to 1. It looks like the flags > where not properly set for any of messages used in gPTP. > > Some of the automotive gPTP bridges where rejecting the PDelayReq mess

[Linuxptp-devel] [PATCH] Increase the default tx_timestamp_timeout to 5

2021-07-07 Thread Jacob Keller
most cases, hardware is only capable of a single outstanding timestamp at a time, so we cannot send another packet anyways until the first one has completed. Signed-off-by: Jacob Keller --- config.c| 2 +- configs/default.cfg | 2 +- ptp4l.8 | 2 +- 3 files changed, 3

[Linuxptp-devel] [PATCH v2] Increase the default tx_timestamp_timeout to 10

2021-07-08 Thread Jacob Keller
socket error queue. (On old kernels around the 3.x era the poll will sleep for the full duration before reporting the timestamp, but this is now quite an old kernel release). Signed-off-by: Jacob Keller --- config.c| 2 +- configs/default.cfg | 2 +- ptp4l.8 | 2 +- 3

[Linuxptp-devel] [PATCH 0/2] fix fallback clock_gettime for test_phc

2021-10-22 Thread Jacob Keller
. Move read_phc function into clockadj.c to re-use it. Jacob Keller (2): phc2sys: move read_phc into clock_adj.c phc_ctl: replace calculate_offset with clockadj_compare clockadj.c | 31 +++ clockadj.h | 16 phc2sys.c | 44

[Linuxptp-devel] [PATCH 2/2] phc_ctl: replace calculate_offset with clockadj_compare

2021-10-22 Thread Jacob Keller
atch the behavior of the ioctl based PTP_SYS_OFFSET flows. Signed-off-by: Jacob Keller --- phc_ctl.c | 54 -- 1 file changed, 16 insertions(+), 38 deletions(-) diff --git a/phc_ctl.c b/phc_ctl.c index 673cb37e3583..e975dd803578 100644 -

[Linuxptp-devel] [PATCH 1/2] phc2sys: move read_phc into clock_adj.c

2021-10-22 Thread Jacob Keller
using it in the phc_ctl program in a future change. Signed-off-by: Jacob Keller --- clockadj.c | 31 +++ clockadj.h | 16 phc2sys.c | 44 3 files changed, 55 insertions(+), 36 deletions(-) diff --git a

[Linuxptp-devel] [PATCH v2 2/2] phc_ctl: replace calculate_offset with clockadj_compare

2021-10-22 Thread Jacob Keller
atch the behavior of the ioctl based PTP_SYS_OFFSET flows. Signed-off-by: Jacob Keller --- phc_ctl.c | 54 -- 1 file changed, 16 insertions(+), 38 deletions(-) diff --git a/phc_ctl.c b/phc_ctl.c index 673cb37e3583..e975dd803578 100644 -

[Linuxptp-devel] [PATCH v2 1/2] phc2sys: move read_phc into clock_adj.c

2021-10-22 Thread Jacob Keller
using it in the phc_ctl program in a future change. Notice that read_phc returned 0 on failure and 1 on success. This is fairly non-standard, so lets update clockadj_compare to return 0 on success and -1 on failure. Fix the call sites to check correctly and report an error. Signed-off-by: Jacob

[Linuxptp-devel] [PATCH v2 0/2] fix fallback clock_gettime for test_phc

2021-10-22 Thread Jacob Keller
. Move read_phc function into clockadj.c to re-use it. Changes since v1 * Make clockadj_compare return -1 on failure and 0 on success * Fix callsites in phc2sys to handle this change Jacob Keller (2): phc2sys: move read_phc into clock_adj.c phc_ctl: replace calculate_offset with clockadj_compare

[Linuxptp-devel] [PATCH v3 2/2] phc_ctl: replace calculate_offset with clockadj_compare

2021-11-23 Thread Jacob Keller
atch the behavior of the ioctl based PTP_SYS_OFFSET flows. Signed-off-by: Jacob Keller --- phc_ctl.c | 54 -- 1 file changed, 16 insertions(+), 38 deletions(-) diff --git a/phc_ctl.c b/phc_ctl.c index 673cb37e3583..e975dd803578 100644 -

[Linuxptp-devel] [PATCH v3 0/2] fix fallback clock_gettime for test_phc

2021-11-23 Thread Jacob Keller
callsites in phc2sys to handle this change Jacob Keller (2): phc2sys: move read_phc into clock_adj.c phc_ctl: replace calculate_offset with clockadj_compare clockadj.c | 31 +++ clockadj.h | 18 ++ phc2sys.c | 46

[Linuxptp-devel] [PATCH v3 1/2] phc2sys: move read_phc into clock_adj.c

2021-11-23 Thread Jacob Keller
using it in the phc_ctl program in a future change. Notice that read_phc returned 0 on failure and 1 on success. This is fairly non-standard, so lets update clockadj_compare to return 0 on success and -1 on failure. Fix the call sites to check correctly and report an error. Signed-off-by: Jacob

[Linuxptp-devel] [PATCH] port: don't clear fault if link is down

2022-09-13 Thread Jacob Keller
tead wait until link is restored. Signed-off-by: Jacob Keller --- I brought this up about a year ago at [1], but Richard seemed to think the ASAP behavior was expected. I've had several users get confused and complain when they use ASAP and then see timeouts. I believe we should have the sa

Re: [Linuxptp-devel] [PATCH 1/3] phc2sys: Add clocks after processing configuration.

2022-10-12 Thread Jacob Keller
EALTIME twice. > > Fixes: 33ac7d25cd92 ("phc2sys: Allow multiple sink clocks") > > Signed-off-by: Miroslav Lichvar Looks good to me. Reviewed-by: Jacob Keller > --- > phc2sys.8 | 2 +- > phc2sys.c | 41 +++-- > 2 files ch

Re: [Linuxptp-devel] [PATCH 2/3] Drop support for old kernels returning zero frequency.

2022-10-12 Thread Jacob Keller
On 10/5/2022 11:38 PM, Miroslav Lichvar wrote: > Some ancient kernels had a bug in reading of the clock frequency, which > was worked around by commit da347d7a36f2 ("ptp4l: Set clock frequency on > start"). Is it worth spelling out what kernel version this was fixed in? > > Drop this workarou

Re: [Linuxptp-devel] [PATCH 2/3] Drop support for old kernels returning zero frequency.

2022-10-12 Thread Jacob Keller
On 10/5/2022 11:38 PM, Miroslav Lichvar wrote: > Some ancient kernels had a bug in reading of the clock frequency, which > was worked around by commit da347d7a36f2 ("ptp4l: Set clock frequency on > start"). > > Drop this workaround and support for the old kernels to make > clockadj_get_freq() u

Re: [Linuxptp-devel] [PATCH 3/3] Extend clockcheck to check for changes in frequency.

2022-10-12 Thread Jacob Keller
On 10/5/2022 11:38 PM, Miroslav Lichvar wrote: > Before setting the new frequency offset on a clock update, compare the > current frequency with the value saved from the previous update and > print a warning message if they are different. > > This should detect misconfigurations where multiple

Re: [Linuxptp-devel] [PATCH 2/3] Drop support for old kernels returning zero frequency.

2022-10-13 Thread Jacob Keller
On 10/13/2022 9:04 AM, Miroslav Lichvar wrote: > On Wed, Oct 12, 2022 at 03:23:18PM -0700, Jacob Keller wrote: >> For the record I suspect this is related to Linux kernel commit >> 5c35bad5ffe5 ("ptp: provide the clock's adjusted frequency"). This >> land

Re: [Linuxptp-devel] [PATCH v1 1/3] lstab: Add LSTAB_EXPIRED result

2022-10-19 Thread Jacob Keller
enable > an > override of expired table. > > Signed-off-by: Maciek Machnikowski Reviewed-by: Jacob Keller > --- > lstab.c | 9 + > lstab.h | 6 ++ > ts2phc_nmea_pps_source.c | 7 --- > 3 files changed, 15 insertio

Re: [Linuxptp-devel] [PATCH v1 2/3] lstab: move update_leapsecond_table function to lstab

2022-10-19 Thread Jacob Keller
to > the struct lstab. > > Signed-off-by: Maciek Machnikowski Makes sense. Reviewed-by: Jacob Keller Thanks, Jake > --- > lstab.c | 55 > lstab.h | 8 ++ >

Re: [Linuxptp-devel] [PATCH v1 0/3] Fix TAI offset in generic pps source

2022-10-19 Thread Jacob Keller
alue read from system is > incorrect. > Makes sense and is an improvement over the existing behavior. Reviewed-by: Jacob Keller > Signed-off-by: Maciek Machnikowski > > Maciek Machnikowski (3): > lstab: Add LSTAB_EXPIRED result > lstab: move update_leapsecond_table func

[Linuxptp-devel] [PATCH] config: allow fractional freq_est_interval

2022-10-27 Thread Jacob Keller
ative. Fix the specification in the configuration table to correctly allow such intervals. Fixes: 0513c3b15b8a ("config: Apply more strict input validation to almost all config file options") Signed-off-by: Jacob Keller --- config.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

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

2022-10-27 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] [PATCH] phc_ctl: add pin_cfg command to display pin functions

2022-11-01 Thread Jacob Keller
On 10/31/2022 6:20 AM, Maciek Machnikowski wrote: On Thu, Oct 27, 2022 at 03:32:48AM -0700, Jacob Keller wrote: 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

[Linuxptp-devel] [PATCH v2] phc_ctl: add get_pins_cfg command to display pin functions

2022-11-02 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 --- Changes since v2: * made output a bit less

Re: [Linuxptp-devel] [PATCH 2/4] Add sock servo.

2022-11-10 Thread Jacob Keller
On 11/10/2022 7:19 AM, Miroslav Lichvar wrote: Add a second servo that provides samples to other processes in order to control the clock. The chrony SOCK refclock uses a Unix domain socket instead of a shared memory segment. The main advantage over the NTP SHM refclock is better security as t

[Linuxptp-devel] [PATCH] servo: stop rounding initial frequency to nearest ppb

2022-11-15 Thread Jacob Keller
, discarding the fractional part below a part per billion. Refactor the servo_create API to take a double value instead of an integer value. Fix the clockadj_get_freq and clockadj_set_freq initialization to avoid casting to an integer and thus rounding the value. Signed-off-by: Jacob Keller

[Linuxptp-devel] [PATCH 2/2] phc_ctl: use PTP_CLOCK_GETCAPS2 ioctl if available

2022-11-15 Thread Jacob Keller
PTP_CLOCK_GETCAPS always zeroed the caps structure. However, it is good practice to use the newer version consistently. Signed-off-by: Jacob Keller --- Technically this is identical in current kernels, both ioctls return exactly the same conent.. I still think its better to use the '2' v

[Linuxptp-devel] [PATCH 1/2] phc_ctl: explicitly check for adjust_phase definition

2022-11-15 Thread Jacob Keller
pport. Use this new flag instead of PTP_CLOCK_GETCAPS2. Signed-off-by: Jacob Keller --- Checking against PTP_CLOCK_GETCAPS2 is wrong because this is not when the adjust_phase was actually introduced. A direct check against whats in the header is more accurate. incdefs.sh | 5 + phc_ctl.c

[Linuxptp-devel] [PATCH] remove C99 style loop variable declarations

2022-11-16 Thread Jacob Keller
statements which declare the variables in loops already have suitable iterator variables bound at the top of the function. For the iterator in pmc_show, we need to add the declaration at the top of the function. Reported-by: Jakub Raczyński Signed-off-by: Jacob Keller --- pmc.c | 4 ++-- tlv.c

Re: [Linuxptp-devel] [PATCH 2/2] phc_ctl: use PTP_CLOCK_GETCAPS2 ioctl if available

2022-11-17 Thread Jacob Keller
] phc_ctl: use PTP_CLOCK_GETCAPS2 ioctl if available On Tue, 2022-11-15 at 16:43 -0800, Jacob Keller wrote: The PTP_CLOCK_GETCAPS2 ioctl is provided by kernel as a replacement for the original PTP_CLOCK_GETCAPS ioctl. This was done in order to provide ioctls which guarantee reserved fields are properly

[Linuxptp-devel] [PATCH v2] servo: stop rounding initial frequency to nearest ppb

2022-11-28 Thread Jacob Keller
, discarding the fractional part below a part per billion. Refactor the servo_create API to take a double value instead of an integer value. Fix the clockadj_get_freq and clockadj_set_freq initialization to avoid casting to an integer and thus rounding the value. Signed-off-by: Jacob Keller

[Linuxptp-devel] [PATCH] hwtstamp_ctl: add support for SIOCGHWTSTAMP

2014-05-14 Thread Jacob Keller
This patch adds support to hwtstamp_ctl for obtaining the current settings of the device, if the feature is supported. This can be useful for debugging what mode the device/driver thinks its in. Signed-off-by: Jacob Keller --- hwstamp_ctl.c | 8 ++-- 1 file changed, 6 insertions(+), 2

[Linuxptp-devel] [PATCH] hwtstamp_ctl: add support for SIOCGHWTSTAMP

2014-05-23 Thread Jacob Keller
This patch adds support to hwtstamp_ctl for obtaining the current settings of the device, if the feature is supported. This can be useful for debugging what mode the device/driver thinks its in. - v2 * order options alphabetically * print correct ioctl name in error message Signed-off-by: Jacob

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

2014-05-27 Thread Jacob Keller
ng an additional option flag. Signed-off-by: Jacob Keller --- hwstamp_ctl.8 | 12 ++-- hwstamp_ctl.c | 45 ++--- 2 files changed, 48 insertions(+), 9 deletions(-) diff --git a/hwstamp_ctl.8 b/hwstamp_ctl.8 index cece74f61866..7bfdf4451839 100644

[Linuxptp-devel] [PATCH 1/2] missing: add SIOCGHWTSTAMP to missing.h

2014-05-27 Thread Jacob Keller
In order to allow hwtstamp_ctl to use the non-destructive SIOCGHWTSTAMP ioctl, we need to add it to missing.h, in order to prevent build failure on older kernels which don't have this support. Signed-off-by: Jacob Keller --- missing.h | 4 1 file changed, 4 insertions(+) diff --

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

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

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

2014-06-03 Thread Jacob Keller
ng an additional option flag. Signed-off-by: Jacob Keller --- hwstamp_ctl.8 | 11 ++- hwstamp_ctl.c | 56 +--- 2 files changed, 59 insertions(+), 8 deletions(-) diff --git a/hwstamp_ctl.8 b/hwstamp_ctl.8 index cece74f61866..0ae4c4a6a456 100644

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

2014-06-03 Thread Jacob Keller
ng 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 --- hwstamp_ctl.8 | 11 ++- hwstamp_ctl.c | 55 --- 2

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

2014-06-24 Thread Jacob Keller
order to reduce duplication. Hopefully this is of some use to everyone. Signed-off-by: Jacob Keller --- makefile | 4 +- phc_ctl.c | 536 ++ 2 files changed, 539 insertions(+), 1 deletion(-) create mode 100644 phc_ctl.c diff --git a

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

2014-06-27 Thread Jacob Keller
order to reduce duplication. Hopefully this is of some use to everyone. Signed-off-by: Jacob Keller --- makefile | 4 +- phc_ctl.8 | 106 phc_ctl.c | 561 ++ 3 files changed, 670 insertions(+), 1 deletion(-) create mode

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

2014-06-30 Thread Jacob Keller
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 --- makefile | 4 +- phc_ctl.8 | 106 phc_c

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

2014-07-10 Thread Jacob Keller
order to reduce duplication. Hopefully this is of some use to everyone. Signed-off-by: Jacob Keller --- - 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 --- .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 -- 2.0.1.475.g9b8d714

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

2014-07-18 Thread Jacob Keller
order to reduce duplication. Hopefully this is of some use to everyone. Signed-off-by: Jacob Keller --- 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 .gitignore | 1 + mak

[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 --- config.c | 65 util.c | 60 +++ util.h | 42 + 3 files changed, 102 insertions(+), 65 deletions

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

2015-01-09 Thread Jacob Keller
tions 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 sh

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

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

[Linuxptp-devel] [PATCH 2/5] config: add phc2sys section ignored by ptp4l

2015-01-09 Thread Jacob Keller
ible for a network device name to match a subsection name. This is not a large problem at present, however. Signed-off-by: Jacob Keller --- config.c | 2 ++ util.c | 2 ++ util.h | 1 + 3 files changed, 5 insertions(+) diff --git a/config.c b/config.c index 7e783f3f7f88..74c9e5fbccda 10

[Linuxptp-devel] [PATCH 5/5] phc2sys: support reading the configuration file

2015-01-09 Thread Jacob Keller
more generic, so there is some level of duplicated code. I couldn't find an easy way to make the whole config process more generic without much more re-writing. Signed-off-by: Jacob Keller --- makefile | 2 +- phc2sys.8 | 174 +++- phc2sys.c

[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 --- 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 +++ b/ptp4l.8 @@ -94,22

[Linuxptp-devel] bugs when reading ptp4l configuration files

2023-03-29 Thread Jacob Keller
Hi, I recently discovered a couple of bugs with ptp4l's config reading code: First, the default configuration specifies values for two of the power profile options which are out of INT_MAX range: power_profile.2011.grandmasterTimeInaccuracy and power_profile.2017.totalTimeInaccuracy On systems

[Linuxptp-devel] [PATCH] Fix power profile config option range to UINT32_MAX

2023-03-29 Thread Jacob Keller
of 32 bits. Correct the configuration specification to allow the true maximum of an unsigned 32 bit integer. Signed-off-by: Jacob Keller --- I'm not sure if there is a simpler or better way to fix this. We could just update the range of CFG_TYPE_INT to be long (or long long) instead, which

Re: [Linuxptp-devel] [PATCH] Fix power profile config option range to UINT32_MAX

2023-04-13 Thread Jacob Keller
On 3/29/2023 1:42 PM, Erez wrote: > On Wed, 29 Mar 2023 at 20:36, Jacob Keller wrote: > >> The power profile configuration options added in commit 7059a05a3fb2 >> ("Introduce the power profile.") specify their maximum range as INT_MAX. >> The values are st

[Linuxptp-devel] [PATCH] Fix power profile config option range to UINT32_MAX

2023-04-24 Thread Jacob Keller
ation code properly as unsigned values. Signed-off-by: Jacob Keller --- config.c | 40 +++- config.h | 3 +++ port.c | 6 +++--- util.c | 15 +++ util.h | 16 5 files changed, 68 insertions(+), 12 deletions(-) diff --git a/

Re: [Linuxptp-devel] Is intel i350 ptp driver broken?

2023-05-26 Thread Jacob Keller
On 5/26/2023 7:36 AM, egg car wrote: > Dear Richard, > > Ah yes I have figured out that the problem is not ts2phc, it should be > fixed in igb_extts() at igb_main.c > > if (hw->mac .type > == e1000_82580

Re: [Linuxptp-devel] [PATCH] Resolve false hybrid_e2e warning

2023-06-20 Thread Jacob Keller
> for hybrid_e2e and generate a false warning of: "hybrid_e2e only > works with E2E". > > Update the check so it would only cover non-UDS ports. > > Signed-off-by: Eyal Itkin > Reviewed-by: Rahul Rameshbabu I saw this recently too, and I think the fix is good.

Re: [Linuxptp-devel] [PATCH] remove C99 style loop variable declarations

2023-06-22 Thread Jacob Keller
On 12/7/2022 6:43 AM, Richard Cochran wrote: > On Wed, Nov 16, 2022 at 11:48:32AM -0800, Jacob Keller wrote: >> When building the tlv.c file, the following warning may occur when >> operating in C89 mode: > > Jacob, this patch doesn't apply any more. Can you reb

Re: [Linuxptp-devel] [PATCH] remove C99 style loop variable declarations

2023-06-22 Thread Jacob Keller
On 6/22/2023 8:49 PM, Richard Cochran wrote: > On Mon, Jun 12, 2023 at 10:18:07AM +0200, Jakub Raczyński wrote: >> In master version and 4.0 this patch was not applied. Please apply this when >> possible. > > That patch does not apply (as I said back on 07 Dec 2022) > > If you want to have it,

[Linuxptp-devel] [PATCH v2] remove C99 style loop variable declarations

2023-06-22 Thread Jacob Keller
statements which declare the variables in loops already have suitable iterator variables bound at the top of the function. For the iterator in pmc_show, we need to add the declaration at the top of the function. Reported-by: Jakub Raczyński Signed-off-by: Jacob Keller --- pmc.c | 4 ++-- tlv.c

Re: [Linuxptp-devel] [PATCH 2/2] phc_ctl: use PTP_CLOCK_GETCAPS2 ioctl if available

2023-06-22 Thread Jacob Keller
On 12/8/2022 1:20 PM, Geva, Erez wrote: > On Wed, 2022-12-07 at 06:59 -0800, Richard Cochran wrote: >> On Thu, Nov 17, 2022 at 02:15:23PM -0800, Jacob Keller wrote: >>> On 11/17/2022 1:34 PM, Geva, Erez wrote: >> >>>> The problem is the fallback works only on

[Linuxptp-devel] [PATCH v2] phc_ctl: explicitly check for adjust_phase definition

2023-06-22 Thread Jacob Keller
pport. Use this new flag instead of PTP_CLOCK_GETCAPS2. Signed-off-by: Jacob Keller --- incdefs.sh | 5 + phc_ctl.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/incdefs.sh b/incdefs.sh index 21333e5109e9..a9e94f777f6b 100755 --- a/incdefs.sh +++ b/incdefs.sh @@ -

[Linuxptp-devel] [PATCH v3 3/3] phc_ctl: add get_pins_cfg command to display pin functions

2023-06-23 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 --- missing.h | 5 + phc.c | 10

[Linuxptp-devel] [PATCH v3 0/3] add get_pins_cfg command to display pin functions

2023-06-23 Thread Jacob Keller
. Jacob Keller (3): phc: dynamically try PTP_PIN_SETFUNC2 and fallback to PTP_PIN_SETFUNC phc_ctl: use phc_get_caps instead of direct ioctl invocation phc_ctl: add get_pins_cfg command to display pin functions missing.h | 12 ++ phc.c | 21 - phc.h | 24

[Linuxptp-devel] [PATCH v3 2/3] phc_ctl: use phc_get_caps instead of direct ioctl invocation

2023-06-23 Thread Jacob Keller
The phc.c file already has phc_get_caps to obtain the capabilities for a PHC clock. Expose this and use it in phc_ctl.c instead of re-implementing it. Signed-off-by: Jacob Keller --- phc.c | 4 +--- phc.h | 11 +++ phc_ctl.c | 3 +-- 3 files changed, 13 insertions(+), 5

[Linuxptp-devel] [PATCH v3 1/3] phc: dynamically try PTP_PIN_SETFUNC2 and fallback to PTP_PIN_SETFUNC

2023-06-23 Thread Jacob Keller
d-off-by: Jacob Keller --- missing.h | 7 ++- phc.c | 7 --- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/missing.h b/missing.h index 79a87d425993..9b37dc258c0f 100644 --- a/missing.h +++ b/missing.h @@ -244,11 +244,8 @@ struct ptp_pin_desc { #endif /*!PTP_PIN_SE

<    1   2   3   >