Re: [Linuxptp-devel] [PATCH v6 0/2] don't report random errno on timeout

2023-08-18 Thread Jacob Keller
c and ICE) for setting >priority > v3: > - v2 resent by accident > v2: > - added documentation for increasing kthread priority > > --- > This version looks good to me. Reviewed-by: Jacob Keller > Lukasz Plachno (1): > ptp4l man: Add description for s

Re: [Linuxptp-devel] [PATCH 0/2 v4] sk: don't report random errno on timeout

2023-07-21 Thread Jacob Keller
> Przemek Kitszel (1): > sk: don't report random errno on timeout > > ptp4l.8 | 32 > sk.c| 14 +- > 2 files changed, 41 insertions(+), 5 deletions(-) > This version looks good to me. Reviewed-by: Jacob Keller ___

Re: [Linuxptp-devel] [PATCH v1 1/4] phc2sys: Rename phc2sys_private to domain.

2023-07-21 Thread Jacob Keller
On 7/20/2023 7:33 AM, Miroslav Lichvar wrote: > Rename the phc2sys_private structure to domain in preparation for > support of multiple domains. > > While touching the lines of code, also rename master to source clock. > > Signed-off-by: Miroslav Lichvar Reviewe

Re: [Linuxptp-devel] [PATCH v1 2/4] phc2sys: Create pmc agent after processing options.

2023-07-21 Thread Jacob Keller
gt; --- Reviewed-by: Jacob Keller ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Re: [Linuxptp-devel] [PATCH v1 3/4] phc2sys: Shallow do_loop().

2023-07-21 Thread Jacob Keller
On 7/20/2023 7:33 AM, Miroslav Lichvar wrote: > Move the measurements and updates of clocks from do_loop() to separate > function. > > Signed-off-by: Miroslav Lichvar > --- Reviewed-by: Jacob Keller ___ Linuxptp-devel mailin

Re: [Linuxptp-devel] [PATCH] sk: don't report random errno on timeout

2023-07-17 Thread Jacob Keller
On 7/16/2023 1:27 PM, Richard Cochran wrote: > On Fri, Jul 14, 2023 at 08:43:30PM +, Keller, Jacob E wrote: > >>> With this patch applied, one will get proper error in last line, >>> "Timer expired", and more modern suggestion about how to approach fixing it >>> >> >> >> I think changing th

Re: [Linuxptp-devel] [PATCH v2 1/6] Add doubly attached clock support

2023-07-05 Thread Jacob Keller
On 7/4/2023 3:30 AM, Stephan Wurm wrote: > Standard IEC 21439-3:2016 Appendix A extends the PTPv2 standard by the > definition of doubly attached clocks (DAC) via redundant ports (either > connected by HSR or PRP). Therefore, the state machine is extended by > state PASSIVE_SLAVE and transition

Re: [Linuxptp-devel] [PATCH v1] servo: Implement offset statistics

2023-07-05 Thread Jacob Keller
On 7/3/2023 7:18 AM, Maciek Machnikowski wrote: > Currently running servo reports current offsets in numerous tools, but lacks > statistical data. Having the basic statistical data makes it easier to monitor > running servo (especially on long runs) and determine servo performance. > > This pat

Re: [Linuxptp-devel] [PATCH v4 4/4] phc_ctl: add get_pins_cfg command to display pin functions

2023-06-27 Thread Jacob Keller
On 6/26/2023 11:54 PM, Erez wrote: > On Mon, 26 Jun 2023 at 21:04, Jacob Keller wrote: >> +static int do_get_pins_cfg(clockid_t clkid, int cmdc, char *cmdv[]) >> +{ >> + struct ptp_pin_desc pin_desc; >> + unsigned int index; >> + int n_pin

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

2023-06-26 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 v4 4/4] phc_ctl: add get_pins_cfg command to display pin functions

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

[Linuxptp-devel] [PATCH v4 0/4] add get_pins_cfg command to display pin functions

2023-06-26 Thread Jacob Keller
check clkid >= 0 instead of clkid == CLOCK_REALTIME * add a patch to do the same clkid check in do_caps() Jacob Keller (4): phc: always use PTP_PIN_SETFUNC instead of depending on kernel headers phc_ctl: use phc_get_caps instead of direct ioctl invocation phc_ctl: check clkid >= 0 inst

[Linuxptp-devel] [PATCH v4 3/4] phc_ctl: check clkid >= 0 instead of just CLOCK_REALTIME

2023-06-26 Thread Jacob Keller
potential future use of other variations of the system clock. Reported-by: Erez Signed-off-by: Jacob Keller --- phc_ctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phc_ctl.c b/phc_ctl.c index 4344184c364b..d61d27d8f632 100644 --- a/phc_ctl.c +++ b/phc_ctl.c @@ -282,8

[Linuxptp-devel] [PATCH v4 1/4] phc: always use PTP_PIN_SETFUNC instead of depending on kernel headers

2023-06-26 Thread Jacob Keller
n the codebase. This is intentional to ensure that we do not accidentally restore the anti-pattern of falling back at compile time instead of run time if we need PTP_PIN_SETFUNC2 in the future. Signed-off-by: Jacob Keller --- missing.h | 7 ++- phc.c | 7 +++ 2 files changed, 5 insertions(

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

2023-06-23 Thread Jacob Keller
On 6/23/2023 2:08 AM, Erez wrote: > On Fri, 23 Jun 2023 at 09:07, 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,

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

2023-06-23 Thread Jacob Keller
On 6/23/2023 1:44 AM, Erez wrote: > On Fri, 23 Jun 2023 at 09:07, Jacob Keller wrote: > >> The phc library currently selects whether to use PTP_PIN_SETFUNC2 over >> PTP_PIN_SETFUNC based on whether the kernel headers it is compiled against >> have the PTP_PIN_SETF

[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

[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 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 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 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 @@ -

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] 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] 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,

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] 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] 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

[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] [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-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

[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 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

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] 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

[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 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] 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

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 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] 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] 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

[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

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

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 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 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 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-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 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 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

[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

[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 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 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 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 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 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 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 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 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] 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

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

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] [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] [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] 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 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] [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 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/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] [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 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] [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 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] [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] [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] [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] [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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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] 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 4/7] pmc_agent: Simplify logic in update method.

2020-11-11 Thread Jacob Keller
Makes sense. Reviewed-by: Jacob Keller > --- > pmc_agent.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/pmc_agent.c b/pmc_agent.c > index 24587b4..47562bc 100644 > --- a/pmc_agent.c > +++ b/pmc_agent.c > @@ -342,14 +342,16 @@

Re: [Linuxptp-devel] [PATCH 3/7] pmc_agent: Simplify the update method.

2020-11-11 Thread Jacob Keller
On 11/10/2020 2:21 PM, Richard Cochran wrote: > The main method that causes the PMC agent to update its status takes a flag > that results in different behavior when push notifications are active. > This patch simplifies the interface by letting the agent remember whether > or not the caller sub

Re: [Linuxptp-devel] [PATCH 2/7] pmc_agent: Convert the subscribe method into the canonical form.

2020-11-11 Thread Jacob Keller
On 11/10/2020 2:21 PM, Richard Cochran wrote: > This patch renames the function to have the module prefix and corrects the > return code semantics. > > Signed-off-by: Richard Cochran This looks good to me. Reviewed-by: Jacob Keller > --- > phc2sys.c | 4 ++-- &

  1   2   3   >