summaryrefslogtreecommitdiff
path: root/net/can
diff options
context:
space:
mode:
authorPatrick Menschel <menschel.p@posteo.de>2021-04-27 05:21:49 +0000
committerMarc Kleine-Budde <mkl@pengutronix.de>2021-05-27 09:42:21 +0200
commitc69d190f7bb9a03cf5237d45a457993730d01605 (patch)
tree71912bcd9e92c8b33a23082396058d157609fb3b /net/can
parent6a5ddae578842652719fb926b22f1d510fe50bee (diff)
can: isotp: Add error message if txqueuelen is too small
This patch adds an additional error message in case that txqueuelen is set too small and advices the user to increase txqueuelen. This is likely to happen even with small transfers if txqueuelen is at default value 10 frames. Link: https://lore.kernel.org/r/20210427052150.2308-4-menschel.p@posteo.de Signed-off-by: Patrick Menschel <menschel.p@posteo.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'net/can')
-rw-r--r--net/can/isotp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/can/isotp.c b/net/can/isotp.c
index 2075d8d9e6b6..5ff11aaf0a79 100644
--- a/net/can/isotp.c
+++ b/net/can/isotp.c
@@ -797,10 +797,12 @@ isotp_tx_burst:
can_skb_set_owner(skb, sk);
can_send_ret = can_send(skb, 1);
- if (can_send_ret)
+ if (can_send_ret) {
pr_notice_once("can-isotp: %s: can_send_ret %pe\n",
__func__, ERR_PTR(can_send_ret));
-
+ if (can_send_ret == -ENOBUFS)
+ pr_notice_once("can-isotp: tx queue is full, increasing txqueuelen may prevent this error\n");
+ }
if (so->tx.idx >= so->tx.len) {
/* we are done */
so->tx.state = ISOTP_IDLE;