From: Phil Sutter <phil@nwl.cc>
To: Xin Long <lucien.xin@gmail.com>
Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
David Miller <davem@davemloft.net>,
network dev <netdev@vger.kernel.org>
Subject: Re: [PATCH 2/3] sctp_diag: export timer value only if it is active
Date: Wed, 3 Aug 2016 21:28:13 +0200 [thread overview]
Message-ID: <20160803192813.GE17974@orbyte.nwl.cc> (raw)
In-Reply-To: <CADvbK_dWaMFz2f8GdavXuhyfiCxRmkT_8n9yHHNwSA3y_73WoA@mail.gmail.com>
Hi,
On Sat, Jul 30, 2016 at 09:25:42PM +0800, Xin Long wrote:
[...]
> Now for the transport's info, we only choose primary_path to dump.
> It means we should fix this by getting the left time to expire from
> primary transport t->T3_rtx_timer. like:
>
> r->idiag_expires = jiffies_to_msecs(
> - asoc->timeouts[SCTP_EVENT_TIMEOUT_T3_RTX] - jiffies);
> + asoc->peer.primary_path->T3_rtx_timer.expires - jiffies);
>
> but yes, need to check with timer_pending firstly.
I have changed the code to this:
| struct timer_list *t3_rtx = &asoc->peer.primary_path->T3_rtx_timer;
|
| [...]
|
| if (timer_pending(t3_rtx)) {
| r->idiag_timer = SCTP_EVENT_TIMEOUT_T3_RTX;
| r->idiag_retrans = asoc->rtx_data_chunks;
| r->idiag_expires = jiffies_to_msecs(t3_rtx->expires - jiffies);
| }
And I'm still getting what appears to be negative values sometimes. Here
are some of the common values in hex when busy looping sctp_diag
requests:
0
7530
1000000
3000000
6000000
14000000
94000000
ed690000
ffffea00
While I wonder a bit about the zero, the last two seem to be unsigned
underruns. Do I still have to check for 't3_rtx->expires > jiffies' or
am I missing something?
Thanks, Phil
next prev parent reply other threads:[~2016-08-03 19:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-29 16:59 [PATCH 0/3] sctp_diag: A bunch of fixes for upcoming 'ss' support Phil Sutter
2016-07-29 16:59 ` [PATCH 1/3] sctp: Export struct sctp_info to userspace Phil Sutter
2016-07-31 21:18 ` Stephen Hemminger
2016-08-01 13:36 ` Phil Sutter
2016-07-29 16:59 ` [PATCH 2/3] sctp_diag: export timer value only if it is active Phil Sutter
2016-07-29 20:51 ` Marcelo Ricardo Leitner
2016-07-30 13:25 ` Xin Long
2016-07-30 13:33 ` Marcelo Ricardo Leitner
2016-07-30 17:59 ` Phil Sutter
2016-07-31 15:57 ` Xin Long
2016-08-03 19:28 ` Phil Sutter [this message]
2016-08-03 19:46 ` Marcelo Ricardo Leitner
2016-08-03 20:15 ` Phil Sutter
2016-07-29 16:59 ` [PATCH 3/3] sctp_diag: Respect ss adding TCPF_CLOSE to idiag_states Phil Sutter
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=20160803192813.GE17974@orbyte.nwl.cc \
--to=phil@nwl.cc \
--cc=davem@davemloft.net \
--cc=lucien.xin@gmail.com \
--cc=marcelo.leitner@gmail.com \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).