Jacob Keller
2013-10-28 18:56:27 UTC
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;
}
}
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;
}
}