Discussion:
[Linuxptp-devel] [PATCH] port: sequence of nrate and peer_delay calculation
Burkhard Ilsen
2017-04-06 10:30:39 UTC
Permalink
2.
The nrate ratio should be calculated before the delay,
I can't see any reason not to put port_nrate_calculate() first.
Alright then, I fixed it.

But I am not sure about the "if (p->follow_up_info)" filtering the
nrate calculation.
Can't this be left out?

Burkhard
Richard Cochran
2017-04-06 15:32:19 UTC
Permalink
Post by Burkhard Ilsen
Alright then, I fixed it.
We want to review your patches, and for that we need to also quote
them in replies. Can you please teach your mailer to send plain text,
or use a different mailer?

Once, when I was forced to use Outlook/Exchange at work, I started
using Gmail to send out kernel patches. Using Gmail via imaps works
well enough, but the Gmail web interface doesn't work for patches.

I use mutt as the reader and can share config options if you want.

For posting patches, you can use git send-mail directly, for example:

git format-patch \
--subject-prefix="PATCH" \
--output-directory ./patches/myseries \
--numbered \
--thread=shallow \
--cover-letter \
master..

git send-email \
--to="<linuxptp-***@lists.sourceforge.net>" \
--cc="<***@host.de>" \
--suppress-cc=self \
--smtp-server=smtp.gmail.com --smtp-server-port=587 --smtp-encryption=tls \
--smtp-user=richardcochran --smtp-pass=xxxxxxxx \
--no-thread --no-format-patch \
--dry-run \
./patches/myseries

(I always do --dry-run first in order to check the subject and the CC fields.)

Thanks,
Richard
Burkhard Ilsen
2017-04-07 18:11:24 UTC
Permalink
Hi Richard
Post by Richard Cochran
We want to review your patches, and for that we need to also quote
them in replies. Can you please teach your mailer to send plain text,
or use a different mailer?
Yes, these web mailers are a real pain. Sending plain-text did not help at all.
I tried git send-email very hard and it failed the authentication
process after submitting the login in the popup window.
Thanks to your post I tried giving the password in the --smtp-pass and
it worked.
Now shall I resend the patch?

Burkhard
Richard Cochran
2017-04-07 20:22:50 UTC
Permalink
Post by Burkhard Ilsen
Now shall I resend the patch?
Yes, please.

Thanks,
Richard
Burkhard Ilsen
2017-04-07 22:31:30 UTC
Permalink
The sequence of port_nrate_calculate() and tsproc_update_delay()
in port_peer_delay() is mixed up.
The peer delay depends on the nrate ratio so the nrate ratio
shall be updated before peer delay is calculated.

Signed-off-by: Burkhard Ilsen <***@gmail.com>
---
port.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/port.c b/port.c
index 0f99b1b..2febe67 100644
--- a/port.c
+++ b/port.c
@@ -1892,6 +1892,9 @@ static void port_peer_delay(struct port *p)
c2 = correction_to_tmv(fup->header.correction);
calc:
t3c = tmv_add(t3, tmv_add(c1, c2));
+
+ if (p->follow_up_info)
+ port_nrate_calculate(p, t3c, t4);
tsproc_set_clock_rate_ratio(p->tsproc, p->nrate.ratio *
clock_rate_ratio(p->clock));
tsproc_up_ts(p->tsproc, t1, t2);
@@ -1901,9 +1904,6 @@ calc:

p->peerMeanPathDelay = tmv_to_TimeInterval(p->peer_delay);

- if (p->follow_up_info)
- port_nrate_calculate(p, t3c, t4);
-
if (p->state == PS_UNCALIBRATED || p->state == PS_SLAVE) {
clock_peer_delay(p->clock, p->peer_delay, t1, t2,
p->nrate.ratio);
--
2.12.2.windows.1
Richard Cochran
2017-04-08 19:08:43 UTC
Permalink
Post by Burkhard Ilsen
The sequence of port_nrate_calculate() and tsproc_update_delay()
in port_peer_delay() is mixed up.
The peer delay depends on the nrate ratio so the nrate ratio
shall be updated before peer delay is calculated.
Applied (with one extra newline for clarity).

Thanks,
Richard
Keller, Jacob E
2017-04-10 21:49:51 UTC
Permalink
-----Original Message-----
Sent: Friday, April 07, 2017 3:32 PM
Subject: [Linuxptp-devel] [PATCH] port: sequence of nrate and peer_delay
calculation
The sequence of port_nrate_calculate() and tsproc_update_delay()
in port_peer_delay() is mixed up.
The peer delay depends on the nrate ratio so the nrate ratio
shall be updated before peer delay is calculated.
---
port.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/port.c b/port.c
index 0f99b1b..2febe67 100644
--- a/port.c
+++ b/port.c
@@ -1892,6 +1892,9 @@ static void port_peer_delay(struct port *p)
c2 = correction_to_tmv(fup->header.correction);
t3c = tmv_add(t3, tmv_add(c1, c2));
+
+ if (p->follow_up_info)
+ port_nrate_calculate(p, t3c, t4);
tsproc_set_clock_rate_ratio(p->tsproc, p->nrate.ratio *
clock_rate_ratio(p->clock));
tsproc_up_ts(p->tsproc, t1, t2);
p->peerMeanPathDelay = tmv_to_TimeInterval(p->peer_delay);
- if (p->follow_up_info)
- port_nrate_calculate(p, t3c, t4);
-
if (p->state == PS_UNCALIBRATED || p->state == PS_SLAVE) {
clock_peer_delay(p->clock, p->peer_delay, t1, t2,
p->nrate.ratio);
--
This one looks straight forward and correct to me.

Thanks,
Jake
2.12.2.windows.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel
Loading...