Re: [PATCH next 1/2] sctp: fix the handling of SACK Gap Ack blocks

2016-09-21 Thread 'Marcelo Ricardo Leitner'
On Wed, Sep 21, 2016 at 10:21:43AM +, David Laight wrote: > From: Marcelo Ricardo Leitner > > Sent: 20 September 2016 22:19 > > sctp_acked() is using 32bit arithmetics on 16bits vars, via TSN_lte() > > macros, which is weird and confusing. > > > > Once the offset to ctsn is calculated, all wra

RE: [PATCH next 1/2] sctp: fix the handling of SACK Gap Ack blocks

2016-09-21 Thread David Laight
From: Marcelo Ricardo Leitner > Sent: 20 September 2016 22:19 > sctp_acked() is using 32bit arithmetics on 16bits vars, via TSN_lte() > macros, which is weird and confusing. > > Once the offset to ctsn is calculated, all wrapping is already handled > and thus to verify the Gap Ack blocks we can ju

[PATCH next 1/2] sctp: fix the handling of SACK Gap Ack blocks

2016-09-20 Thread Marcelo Ricardo Leitner
sctp_acked() is using 32bit arithmetics on 16bits vars, via TSN_lte() macros, which is weird and confusing. Once the offset to ctsn is calculated, all wrapping is already handled and thus to verify the Gap Ack blocks we can just use pure less/big-or-equal than checks. Also, rename gap variable to