Re: [PATCH 2/3] sctp_diag: export timer value only if it is active

2016-08-03 Thread Phil Sutter
On Wed, Aug 03, 2016 at 04:46:52PM -0300, Marcelo Ricardo Leitner wrote: > On Wed, Aug 03, 2016 at 09:28:13PM +0200, Phil Sutter wrote: > > 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. > >

Re: [PATCH 2/3] sctp_diag: export timer value only if it is active

2016-08-03 Thread Marcelo Ricardo Leitner
On Wed, Aug 03, 2016 at 09:28:13PM +0200, Phil Sutter wrote: > 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

Re: [PATCH 2/3] sctp_diag: export timer value only if it is active

2016-08-03 Thread Phil Sutter
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 =

Re: [PATCH 2/3] sctp_diag: export timer value only if it is active

2016-07-31 Thread Xin Long
> > I'll look into this next week. One early question: Does the above mean > we are printing the primary path's timer value for every assoc? If so, > shouldn't we do that for just the EP or the primary path's assoc even? > Nope, we can't say "the primary path's assoc". Every assoc has their own

Re: [PATCH 2/3] sctp_diag: export timer value only if it is active

2016-07-30 Thread Phil Sutter
On Sat, Jul 30, 2016 at 10:33:48AM -0300, Marcelo Ricardo Leitner wrote: > > > Em 30-07-2016 10:25, Xin Long escreveu: > >>> diff --git a/net/sctp/sctp_diag.c b/net/sctp/sctp_diag.c > >>> index f69edcf219e51..0ad6033a7330c 100644 > >>> --- a/net/sctp/sctp_diag.c > >>> +++ b/net/sctp/sctp_diag.c

Re: [PATCH 2/3] sctp_diag: export timer value only if it is active

2016-07-30 Thread Marcelo Ricardo Leitner
Em 30-07-2016 10:25, Xin Long escreveu: diff --git a/net/sctp/sctp_diag.c b/net/sctp/sctp_diag.c index f69edcf219e51..0ad6033a7330c 100644 --- a/net/sctp/sctp_diag.c +++ b/net/sctp/sctp_diag.c @@ -40,10 +40,12 @@ static void inet_diag_msg_sctpasoc_fill(struct inet_diag_msg *r, }

Re: [PATCH 2/3] sctp_diag: export timer value only if it is active

2016-07-30 Thread Xin Long
>> diff --git a/net/sctp/sctp_diag.c b/net/sctp/sctp_diag.c >> index f69edcf219e51..0ad6033a7330c 100644 >> --- a/net/sctp/sctp_diag.c >> +++ b/net/sctp/sctp_diag.c >> @@ -40,10 +40,12 @@ static void inet_diag_msg_sctpasoc_fill(struct >> inet_diag_msg *r, >> } >> >> r->idiag_state =

Re: [PATCH 2/3] sctp_diag: export timer value only if it is active

2016-07-29 Thread Marcelo Ricardo Leitner
On Fri, Jul 29, 2016 at 06:59:39PM +0200, Phil Sutter wrote: > Since it is exported as unsigned value, userspace has no way detecting > whether it is negative or just very large. Therefore do this in kernel > space where it is a simple comparison. > > Signed-off-by: Phil Sutter >

[PATCH 2/3] sctp_diag: export timer value only if it is active

2016-07-29 Thread Phil Sutter
Since it is exported as unsigned value, userspace has no way detecting whether it is negative or just very large. Therefore do this in kernel space where it is a simple comparison. Signed-off-by: Phil Sutter --- net/sctp/sctp_diag.c | 10 ++ 1 file changed, 6 insertions(+),