The actual ptp4l implementation rearms timers after the expiration. This
approach doesn't permit to have a precise TX SYNC message scheduling.
During my test the TX SYNC frequency is slightly lower the expectation (eg
15.99Hz vs 16Hz).
The following patchset uses non blocking timers and only for
During a timer handling we should avoid to call timerfd_settime() on a
different timer because this call will invalidate the file descriptor,
resulting in a EGAIN when the other timer code will performe the read().
The ANNOUNCE and RX SYNC timer code just doesn't follow this rule. The
solution is
This change ensure that all timers timeouts are handled just before the
PTP message handling.
The PTP message hanlding code can performe timerfd_settime() calls that
invalidate the status of timer descriptors. This side effect is not
noticed until now because we never read from the timer descriptor
Change fd[0] with FD_EVENT and fd[1] with FD_GENERAL.
Signed-off-by: Luigi Mantellini
---
raw.c | 4 ++--
udp.c | 4 ++--
udp6.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/raw.c b/raw.c
index a76fab6..f73e895 100644
--- a/raw.c
+++ b/raw.c
@@ -193,8 +193,8 @@ stat
This patch avoid to block on a timer fd read. We already protect with
poll().
Signed-off-by: Luigi Mantellini
---
port.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/port.c b/port.c
index 7609f2c..03f388b 100644
--- a/port.c
+++ b/port.c
@@ -1939,7 +1939,7 @@ int port_
After the timer expiration, just after the poll(), we can read fron the
timer file descriptor a 64bit value that represents the number of
expirations that have occured. This value is useful for debug. In
addition, when we use a periodic timer the timer will be locked until
the read of this value.
In order to obtain a precise TX SYNC frequency we need to use a periodic
timer facility instead to reconfigure the timer on every expiration.
The solution consists to configure the it_interval field of the
itimerspec structure (see timerfd_create(2) man page) only when the port
goes into Master ro
On Thu, Mar 30, 2023 at 03:03:44AM +0200, Martin Pecka wrote:
> I have a suspicion regarding the code in sk.c:
>
> ```c++
> cfg.flags = HWTSTAMP_FLAG_BONDED_PHC_INDEX;
> /* Fall back without flag if user run new build on old kernel */
> if (ioctl(fd, SIOCGHWTSTAMP, &ifreq) == -EINVAL)
The kernel is 1 year and 3 month old, it should work.
You mean this device: https://developer.nvidia.com/embedded/jetson-tx2
Yes. NVidia Jetson TX2.
The device's NIC uses eqos driver and reports all the timestamping
capabilities required for ptp4l:
I do not find any 'eqos' driver i
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 stored in UInteger32 values, and the default 0x is
> outside the range of a
The power profile configuration options added in commit 7059a05a3fb2
("Introduce the power profile.") specify their maximum range as INT_MAX.
The values are stored in UInteger32 values, and the default 0x is
outside the range of a 32-bit integer. Because of this, on platforms which
have 32-
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
Thanks... i will produce a v3 after some feedback
> Sorry I forgot another hint. Please use the 'git format-patch' with the patch
> seria iteration flag '-v '. So we can differentiate the mails as newer :-)
> This will change the subject to something like "Subject: [PATCH v2 0/6] "
___
Sorry I forgot another hint.
Please use the 'git format-patch' with the patch seria iteration flag '-v
'.
So we can differentiate the mails as newer :-)
This will change the subject to something like "Subject: [PATCH *v2* 0/6]
"
Erez
On Wed, 29 Mar 2023 at 17:17, Erez wrote:
> You add a
You add a nice cover letter and good explanations on your patches.
Now we wait for other developers' feedback.
Just one last hint.
We usually check the patch format with the kernel check patch tool.
https://docs.kernel.org/dev-tools/checkpatch.html
But you can do that after you get more feedbacks
On Wed, 29 Mar 2023 at 14:37, Luigi 'Comio' Mantellini <
luigi.mantell...@gmail.com> wrote:
> Hi Erez,
>
> sorry, I usually use pull requests.
>
Me too :-)
But using patch seria is cool too.
>
>
> Il giorno mer 29 mar 2023 alle ore 14:29 Erez ha
> scritto:
>
>>
>>
>> On Wed, 29 Mar 2023 at 11:
This change ensure that all timers timeouts are handled just before the
PTP message handling.
The PTP message hanlding code can performe timerfd_settime() calls that
invalidate the status of timer descriptors. This side effect is not
noticed until now because we never read from the timer descriptor
During a timer handling we should avoid to call timerfd_settime() on a
different timer because this call will invalidate the file descriptor,
resulting in a EGAIN when the other timer code will performe the read().
The ANNOUNCE and RX SYNC timer code just doesn't follow this rule. The
solution is
---
raw.c | 4 ++--
udp.c | 4 ++--
udp6.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/raw.c b/raw.c
index a76fab6..f73e895 100644
--- a/raw.c
+++ b/raw.c
@@ -193,8 +193,8 @@ static int raw_configure(int fd, int event, int index,
static int raw_close(struct transp
In order to obtain a precise TX SYNC frequency we need to use a periodic
timer facility instead to reconfigure the timer on every expiration.
The solution consists to configure the it_interval field of the
itimerspec structure (see timerfd_create(2) man page) only when the port
goes into Master ro
In order to obtain a precise TX SYNC frequency we need to use a periodic
timer facility instead to reconfigure the timer on every expiration.
The solution consists to configure the it_interval field of the
itimerspec structure (see timerfd_create(2) man page) only when the port
goes into Master ro
The actual ptp4l implementation rearms timers after the expiration. This
approach doesn't permit to have a precise TX SYNC message scheduling.
During my test the TX SYNC frequency is slightly lower the expectation (eg
15.99Hz vs 16Hz).
The following patchset uses non blocking timers and only for
During a timer handling we should avoid to call timerfd_settime() on a
different timer because this call will invalidate the file descriptor,
resulting in a EGAIN when the other timer code will performe the read().
The ANNOUNCE and RX SYNC timer code just doesn't follow this rule. The
solution is
---
raw.c | 4 ++--
udp.c | 4 ++--
udp6.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/raw.c b/raw.c
index a76fab6..f73e895 100644
--- a/raw.c
+++ b/raw.c
@@ -193,8 +193,8 @@ static int raw_configure(int fd, int event, int index,
static int raw_close(struct transp
This patch avoid to block on a timer fd read. We already protect with
poll().
---
port.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/port.c b/port.c
index cc558eb..29b6870 100644
--- a/port.c
+++ b/port.c
@@ -1939,7 +1939,7 @@ int port_initialize(struct port *p)
This change ensure that all timers timeouts are handled just before the
PTP message handling.
The PTP message hanlding code can performe timerfd_settime() calls that
invalidate the status of timer descriptors. This side effect is not
noticed until now because we never read from the timer descriptor
After the timer expiration, just after the poll(), we can read fron the
timer file descriptor a 64bit value that represents the number of
expirations that have occured. This value is useful for debug. In
addition, when we use a periodic timer the timer will be locked until
the read of this value.
-
This patch avoid to block on a timer fd read. We already protect with
poll().
---
port.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/port.c b/port.c
index cc558eb..29b6870 100644
--- a/port.c
+++ b/port.c
@@ -1939,7 +1939,7 @@ int port_initialize(struct port *p)
After the timer expiration, just after the poll(), we can read fron the
timer file descriptor a 64bit value that represents the number of
expirations that have occured. This value is useful for debug. In
addition, when we use a periodic timer the timer will be locked until
the read of this value.
-
Hi Erez,
sorry, I usually use pull requests.
Il giorno mer 29 mar 2023 alle ore 14:29 Erez ha
scritto:
>
>
> On Wed, 29 Mar 2023 at 11:28, Luigi Mantellini
> wrote:
>
>> The actual ptp4l implementation rearms timers on timeut. This doesn't
>> permit to have a precise TX SYNC
>
>
> Did you mis
On Wed, 29 Mar 2023 at 11:28, Luigi Mantellini
wrote:
> The actual ptp4l implementation rearms timers on timeut. This doesn't
> permit to have a precise TX SYNC
Did you misspell "timeout"?
> message scheduling.
> The following patchset uses non blocking timers and only for TX SYNC timer
> a p
On Wed, 29 Mar 2023 at 11:27, Martin Pecka wrote:
> Hello,
>
> I'm using linuxptp from master branch on a Jetson TX2 device, where
> unfortunately only kernel 4.9.299 is available from the manufacturer.
>
commit 224d99f50f25ec3234b99556c0076a7130e230c6 (tag: v4.9.299)
Author: Greg Kroah-Hartman
---
e2e_tc.c | 4
p2p_tc.c | 4
port.c | 25 +
port.h | 10 ++
4 files changed, 43 insertions(+)
diff --git a/e2e_tc.c b/e2e_tc.c
index 2f8e821..43c69e9 100644
--- a/e2e_tc.c
+++ b/e2e_tc.c
@@ -85,6 +85,7 @@ enum fsm_event e2e_event(struct port *p,
---
e2e_tc.c | 26
p2p_tc.c | 26
port.c | 60
3 files changed, 70 insertions(+), 42 deletions(-)
diff --git a/e2e_tc.c b/e2e_tc.c
index 43c69e9..c7cfd9e 100644
--- a/e2e_tc.c
+++ b/e2e_tc
---
port.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/port.c b/port.c
index cc558eb..29b6870 100644
--- a/port.c
+++ b/port.c
@@ -1939,7 +1939,7 @@ int port_initialize(struct port *p)
fd[i] = -1;
}
for (i = 0; i < N_TIMER_FDS; i++) {
-
The actual ptp4l implementation rearms timers on timeut. This doesn't permit to
have a precise TX SYNC message scheduling.
The following patchset uses non blocking timers and only for TX SYNC timer a
periodic timer is used.
In addition, a periodic timer requires to read (and flush) the file descr
---
fd.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fd.h b/fd.h
index 16420d7..038d156 100644
--- a/fd.h
+++ b/fd.h
@@ -29,8 +29,6 @@
* same call to poll().
*/
enum {
- FD_EVENT,
- FD_GENERAL,
FD_DELAY_TIMER,
FD_ANNOUNCE_TIMER,
---
raw.c | 4 ++--
udp.c | 4 ++--
udp6.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/raw.c b/raw.c
index a76fab6..f73e895 100644
--- a/raw.c
+++ b/raw.c
@@ -193,8 +193,8 @@ static int raw_configure(int fd, int event, int index,
static int raw_close(struct transp
---
port.c | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/port.c b/port.c
index 29b6870..3c7df6b 100644
--- a/port.c
+++ b/port.c
@@ -231,7 +231,7 @@ struct fdarray *port_fda(struct port *port)
return &port->fda;
}
-int set_tmo_log(int fd, unsigned
Hello,
I'm using linuxptp from master branch on a Jetson TX2 device, where
unfortunately only kernel 4.9.299 is available from the manufacturer.
The device's NIC uses eqos driver and reports all the timestamping
capabilities required for ptp4l:
$ ethtool -T eth0
Time stamping parameters for
40 matches
Mail list logo