[cc Vishwanath Pai]
On 27.09.2016 11:42, Maciej Żenczykowski wrote:
>> Please just use do_div here and go back to the first version of the
>> patch. Variable names could be more aligned with the RFC maybe?
>
> So I tried:
>
> static inline s32 rfc3315_s14_backoff_init(s32 irt)
> {
>/* m
On 27.09.2016 11:42, Maciej Żenczykowski wrote:
>> Please just use do_div here and go back to the first version of the
>> patch. Variable names could be more aligned with the RFC maybe?
>
> So I tried:
>
> static inline s32 rfc3315_s14_backoff_init(s32 irt)
> {
>/* multiply 'initial retr
> Please just use do_div here and go back to the first version of the
> patch. Variable names could be more aligned with the RFC maybe?
So I tried:
static inline s32 rfc3315_s14_backoff_init(s32 irt)
{
/* multiply 'initial retransmission time' by 0.9 .. 1.1 */
u64 tmp = (90 + p
On 25.09.2016 13:03, Maciej Żenczykowski wrote:
> +static inline s32 rfc3315_s14_backoff_init(s32 initial)
> +{
> + u32 r = (9 << 20) / 10 + (prandom_u32() % ((2 << 20) / 10 + 1));
^
> + s32 v = initial * (u64)r >> 20; /* ~ multiply by 0.9 .. 1.1 */
> + return v;
> +}
> +
> +sta
From: Maciej Żenczykowski
This implements:
https://tools.ietf.org/html/rfc7559
Backoff is performed according to RFC3315 section 14:
https://tools.ietf.org/html/rfc3315#section-14
Signed-off-by: Maciej Żenczykowski
---
include/net/if_inet6.h | 1 +
net/ipv6/addrconf.c| 31 +++