Discussion:
[Linuxptp-devel] [PATCH] sk: update error message for Tx timestamp polling
Jacob Keller
2013-10-28 18:56:27 UTC
Permalink
This patch cleans up the error message for the Tx timestamp polling, and adds a
line which indicates where the bug might have originated. This should help a
user more easily diagnose what went wrong.

Signed-off-by: Jacob Keller <***@intel.com>
---
sk.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sk.c b/sk.c
index fe74164..5c4c585 100644
--- a/sk.c
+++ b/sk.c
@@ -229,11 +229,12 @@ int sk_receive(int fd, void *buf, int buflen,
struct pollfd pfd = { fd, 0, 0 };
res = poll(&pfd, 1, sk_tx_timeout);
if (res < 1) {
- pr_err(res ? "poll tx timestamp failed: %m" :
- "poll tx timestamp timeout");
+ pr_err(res ? "poll for tx timestamp failed: %m" :
+ "timed out while polling for tx timestamp");
+ pr_err("increasing the tx_timestamp_timeout may correct this issue, but it is likely caused by a driver bug");
return res;
} else if (!(pfd.revents & POLLERR)) {
- pr_err("poll tx woke up on non ERR event");
+ pr_err("poll for tx timestamp woke up on non ERR event");
return -1;
}
}
Richard Cochran
2013-10-30 20:40:16 UTC
Permalink
Post by Jacob Keller
This patch cleans up the error message for the Tx timestamp polling, and adds a
line which indicates where the bug might have originated. This should help a
user more easily diagnose what went wrong.
Applied, but I took the liberty of breaking one long line.

Thanks,
Richrd
Keller, Jacob E
2013-10-30 21:22:20 UTC
Permalink
Post by Richard Cochran
Post by Jacob Keller
This patch cleans up the error message for the Tx timestamp polling, and adds a
line which indicates where the bug might have originated. This should help a
user more easily diagnose what went wrong.
Applied, but I took the liberty of breaking one long line.
Thanks,
Richrd
That's fine. I normally go with kernel standard and the long line error
messages I try to keep the message on one line so that it can be grepped
in the log. But I don't really have a p
Richard Cochran
2013-12-02 22:24:00 UTC
Permalink
Post by Jacob Keller
@@ -229,11 +229,12 @@ int sk_receive(int fd, void *buf, int buflen,
struct pollfd pfd = { fd, 0, 0 };
res = poll(&pfd, 1, sk_tx_timeout);
if (res < 1) {
- "poll tx timestamp timeout");
+ "timed out while polling for tx timestamp");
+ pr_err("increasing the tx_timestamp_timeout may correct this issue, but it is likely caused by a driver bug");
I just noticed that this second error message appears after a link
failure (like pulling out the Ethernet cable), and in that case the
message gives the total wrong impression.

I would suggest that we change this pr_err into a pr_debug and then
list all three possibilities as hints:

1. driver need more time
2. driver bug
3. interface or link down

Thanks,
Richard
Keller, Jacob E
2013-12-02 22:41:41 UTC
Permalink
Post by Richard Cochran
Post by Jacob Keller
@@ -229,11 +229,12 @@ int sk_receive(int fd, void *buf, int buflen,
struct pollfd pfd = { fd, 0, 0 };
res = poll(&pfd, 1, sk_tx_timeout);
if (res < 1) {
- "poll tx timestamp timeout");
+ "timed out while polling for tx timestamp");
+ pr_err("increasing the tx_timestamp_timeout may correct this issue, but it is likely caused by a driver bug");
I just noticed that this second error message appears after a link
failure (like pulling out the Ethernet cable), and in that case the
message gives the total wrong impression.
I would suggest that we change this pr_err into a pr_debug and then
1. driver need more time
2. driver bug
3. interface or link down
Thanks,
Richard
Agreed. I am pretty busy with some things, so I won't be able to get a
patch together for this today. If you (or someone else) hasn't gotten to
it sometime in the next day I wi
Richard Cochran
2013-12-03 17:16:23 UTC
Permalink
Post by Keller, Jacob E
Agreed. I am pretty busy with some things, so I won't be able to get a
patch together for this today. If you (or someone else) hasn't gotten to
it sometime in the next day I will try to put a patch together.
There is no rush. I would like to have this fixed before the next
release.

Thanks,
Richard
Arnold kang
2013-12-04 06:35:51 UTC
Permalink
hi all:
thease days, i just built ptp for linux arm, all seems goes right, but
there a bug in sk.c, i cann't create the poll for Tx timestamp polling. i
increase the sk_tx_timeout, but that not work. i'm trying other way, hope
find out...........
Post by Richard Cochran
Post by Keller, Jacob E
Agreed. I am pretty busy with some things, so I won't be able to get a
patch together for this today. If you (or someone else) hasn't gotten to
it sometime in the next day I will try to put a patch together.
There is no rush. I would like to have this fixed before the next
release.
Thanks,
Richard
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Linuxptp-devel mailing list
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel
Richard Cochran
2013-12-04 17:15:32 UTC
Permalink
Post by Arnold kang
thease days, i just built ptp for linux arm, all seems goes right, but
there a bug in sk.c, i cann't create the poll for Tx timestamp polling. i
increase the sk_tx_timeout, but that not work. i'm trying other way, hope
find out...........
We cannot help you unless you provide a bit more information, such as
kernel version, MAC driver, error logs, and so on.

Thanks,
Richard
Arnold kang
2013-12-05 01:38:25 UTC
Permalink
and the ARCH is ARM Cortex A9 ,



thanks,
Arnold
kernel version : 3.0.8
ethernet card : RTL8211EG
MAC driver : not special, just the default in kernel.
debug info: "missing timestamp on transmitted delay request".
and the linux config file upload as attachment.
thanks,
Arnold
Post by Arnold kang
Post by Arnold kang
thease days, i just built ptp for linux arm, all seems goes right, but
there a bug in sk.c, i cann't create the poll for Tx timestamp
polling. i
Post by Arnold kang
increase the sk_tx_timeout, but that not work. i'm trying other way,
hope
Post by Arnold kang
find out...........
We cannot help you unless you provide a bit more information, such as
kernel version, MAC driver, error logs, and so on.
Thanks,
Richard
Arnold kang
2013-12-05 01:46:13 UTC
Permalink
hi all,
i just noticed that the previous can not send correctly, so i past it
again.

Dear Richard:
thanks for your response. here is the detail information:
ARCH : ARM Cortex A9
kernel version : 3.0.8
ethernet card : RTL8211EG
MAC driver : no special, just the default in kernel.
debug info: "missing timestamp on transmitted delay request".






thanks,
Arnold
Post by Arnold kang
and the ARCH is ARM Cortex A9 ,
thanks,
Arnold
kernel version : 3.0.8
ethernet card : RTL8211EG
MAC driver : not special, just the default in kernel.
debug info: "missing timestamp on transmitted delay request".
and the linux config file upload as attachment.
thanks,
Arnold
Post by Arnold kang
Post by Arnold kang
thease days, i just built ptp for linux arm, all seems goes right,
but
Post by Arnold kang
there a bug in sk.c, i cann't create the poll for Tx timestamp
polling. i
Post by Arnold kang
increase the sk_tx_timeout, but that not work. i'm trying other way,
hope
Post by Arnold kang
find out...........
We cannot help you unless you provide a bit more information, such as
kernel version, MAC driver, error logs, and so on.
Thanks,
Richard
Richard Cochran
2013-12-05 06:36:22 UTC
Permalink
Post by Arnold kang
hi all,
i just noticed that the previous can not send correctly, so i past it
again.
ARCH : ARM Cortex A9
kernel version : 3.0.8
ethernet card : RTL8211EG
MAC driver : no special, just the default in kernel.
What Ethernet driver is this using?

Thanks,
Richard
Arnold kang
2013-12-05 09:36:02 UTC
Permalink
maybe stmmc in "drivers/net/stmmac"., but i'm not sure. sorry for i'm not know
well about kernel. but the all config about is " CONFIG_MII=y
CONFIG_PHYLIB=y CONFIG_NET_ETHERNET=y CONFIG_MDIO_BITBANG=y

CONFIG_PHYLIB=y CONFIG_FIXED_PHY=y CONFIG_STMMAC_ETH=m
CONFIG_STMMAC_DUAL_MAC=y ..." . hope this will be useful. and I'm trying to
find out the driver.

thanks so much.
Post by Richard Cochran
Post by Arnold kang
hi all,
i just noticed that the previous can not send correctly, so i past
it
Post by Arnold kang
again.
ARCH : ARM Cortex A9
kernel version : 3.0.8
ethernet card : RTL8211EG
MAC driver : no special, just the default in kernel.
What Ethernet driver is this using?
Thanks,
Richard
Loading...