From: Bernard f6bvp <f6bvp@free.fr>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: Eric Dumazet <edumazet@google.com>,
linux-hams@vger.kernel.org,
Thomas Osterried DL9SAU <thomas@x-berg.in-berlin.de>,
netdev@vger.kernel.org
Subject: Re: rose timer t error displayed in /proc/net/rose
Date: Mon, 1 Aug 2022 10:54:10 +0200 [thread overview]
Message-ID: <d94a6cbd-b729-1221-82be-107b5cc57482@free.fr> (raw)
In-Reply-To: <YucgpeXpqwZuievg@electric-eye.fr.zoreil.com>
After applying patch rose->timer displays still t underflow value
dest_addr dest_call src_addr src_call dev lci neigh st vs vr va
t t1 t2 t3 hb idle Snd-Q Rcv-Q inode
2080175524 WP-0 2080175524 NODE-0 rose0 002 00001 1 0 0 0 122
200 180 180 5 0/000 0 0 37356
* * 2080175524 ROUTE-0 rose0 000 00000 0 0 0 0 0
200 180 180 5 0/000 0 0 35195
* * 2080175524 F6BVP-15 rose0 000 00000 0 0 0 0 0
200 180 180 5 0/000 0 0 35194
2080835201 WP-0 2080175524 WP-0 rose0 032 00002 1 0 0 0 1
200 180 180 5 0/000 0 0 41389
2080175520 WP-0 2080175524 WP-0 rose0 032 00003 1 0 0 0 1
200 180 180 5 0/000 0 0 41388
2080175527 WP-0 2080175524 WP-0 rose0 032 00004 1 0 0 0 1
200 180 180 5 0/000 0 0 41387
* * 2080175524 WP-0 rose0 000 00000 0 0 0 0 0
200 180 180 5 0/000 0 0 36456
2080175524 WP-0 2080175524 FPAD-0 rose0 001 00001 1 0 0 0
73786976294838206 200 180 180 5 0/000 0 0 36437
* * 2080175524 ??????-? rose0 000 00000 0 0 0 0 0
200 180 180 5 0/000 0 0 36436
root@ubuntu-f6bvp:/home/bernard# cat /proc/net/rose
dest_addr dest_call src_addr src_call dev lci neigh st vs vr va
t t1 t2 t3 hb idle Snd-Q Rcv-Q inode
2080175524 WP-0 2080175524 NODE-0 rose0 002 00001 1 0 0 0 115
200 180 180 5 0/000 0 0 37356
* * 2080175524 ROUTE-0 rose0 000 00000 0 0 0 0 0
200 180 180 5 0/000 0 0 35195
* * 2080175524 F6BVP-15 rose0 000 00000 0 0 0 0 0
200 180 180 5 0/000 0 0 35194
2080835201 WP-0 2080175524 WP-0 rose0 032 00002 2 0 0 0 178
200 180 180 5 0/000 0 0 41389
2080175520 WP-0 2080175524 WP-0 rose0 032 00003 2 0 0 0 178
200 180 180 5 0/000 0 0 41388
2080175527 WP-0 2080175524 WP-0 rose0 032 00004 2 0 0 0 178
200 180 180 5 0/000 0 0 41387
* * 2080175524 WP-0 rose0 000 00000 0 0 0 0 0
200 180 180 5 0/000 0 0 36456
2080175524 WP-0 2080175524 FPAD-0 rose0 001 00001 2 0 0 0 178
200 180 180 5 0/000 0 0 36437
* * 2080175524 ??????-? rose0 000 00000 0 0 0 0 0
200 180 180 5 0/000 0 0 36436
Le 01/08/2022 à 02:39, Francois Romieu a écrit :
> Bernard f6bvp <f6bvp@free.fr> :
>> Rose proc timer t error
>>
>> Timer t is decremented one by one during normal operations.
>>
>> When decreasing from 1 to 0 it displays a very large number until next clock
>> tic as demonstrated below.
>>
>> t1, t2 and t3 are correctly handled.
> "t" is ax25_display_timer(&rose->timer) / HZ whereas "tX" are rose->tX / HZ.
>
> ax25_display_timer() does not like jiffies > timer->expires (and it should
> probably return plain seconds btw).
>
> You may try the hack below.
>
> diff --git a/net/ax25/ax25_timer.c b/net/ax25/ax25_timer.c
> index 85865ebfdfa2..b77433fff0c9 100644
> --- a/net/ax25/ax25_timer.c
> +++ b/net/ax25/ax25_timer.c
> @@ -108,10 +108,9 @@ int ax25_t1timer_running(ax25_cb *ax25)
>
> unsigned long ax25_display_timer(struct timer_list *timer)
> {
> - if (!timer_pending(timer))
> - return 0;
> + long delta = timer->expires - jiffies;
>
> - return timer->expires - jiffies;
> + return jiffies_delta_to_clock_t(delta) * HZ;
> }
>
> EXPORT_SYMBOL(ax25_display_timer);
next prev parent reply other threads:[~2022-08-01 8:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-30 15:08 rose timer t error displayed in /proc/net/rose Bernard f6bvp
2022-08-01 0:39 ` Francois Romieu
2022-08-01 8:06 ` Thomas Osterried
2022-08-01 9:19 ` Bernard f6bvp
2022-08-01 15:44 ` Francois Romieu
2022-08-01 19:06 ` Thomas Osterried
2022-08-01 19:33 ` Bernard f6bvp
2022-08-07 18:04 ` [PATCH] AX25 rose_call - replacing carriage return by newlines f6bvp
2022-08-07 18:21 ` Resend : " f6bvp
[not found] ` <ABFC096C-8F65-49C9-8BB9-7B75B3CE30B7@osterried.de>
2022-08-08 12:31 ` f6bvp
2022-08-01 8:54 ` Bernard f6bvp [this message]
2022-08-01 10:43 ` rose timer t error displayed in /proc/net/rose Bernard f6bvp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d94a6cbd-b729-1221-82be-107b5cc57482@free.fr \
--to=f6bvp@free.fr \
--cc=edumazet@google.com \
--cc=linux-hams@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.com \
--cc=thomas@x-berg.in-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.