lkml.org 
[lkml]   [2021]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 3/3] can-isotp: Add error message if txqueuelen is too small
Date
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.

Signed-off-by: Patrick Menschel <menschel.p@posteo.de>
---
net/can/isotp.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/can/isotp.c b/net/can/isotp.c
index 2075d8d9e..d08f95bfd 100644
--- a/net/can/isotp.c
+++ b/net/can/isotp.c
@@ -797,10 +797,12 @@ static enum hrtimer_restart isotp_tx_timer_handler(struct hrtimer *hrtimer)
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");
+ }
if (so->tx.idx >= so->tx.len) {
/* we are done */
so->tx.state = ISOTP_IDLE;
--
2.17.1
\
 
 \ /
  Last update: 2021-04-27 07:22    [W:0.053 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site