Re: [PATCH nf-next] netfilter: nf_tables: support timeouts larger than 23 days

2018-04-26 Thread Pablo Neira Ayuso
On Mon, Apr 16, 2018 at 06:04:49PM +0200, Florian Westphal wrote: > Marco De Benedetto says: > I would like to use a timeout of 30 days for elements in a set but it > seems there is a some kind of problem above 24d20h31m23s. > > Fix this by using 'jiffies64' for timeout handling to get same beha

Re: [PATCH nf-next] netfilter: nf_tables: support timeouts larger than 23 days

2018-04-16 Thread kbuild test robot
Hi Florian, I love your patch! Perhaps something to improve: [auto build test WARNING on nf-next/master] url: https://github.com/0day-ci/linux/commits/Florian-Westphal/netfilter-nf_tables-support-timeouts-larger-than-23-days/20180417-032146 base: https://git.kernel.org/pub/scm/linux/kernel

Re: [PATCH nf-next] netfilter: nf_tables: support timeouts larger than 23 days

2018-04-16 Thread Florian Westphal
Jan Engelhardt wrote: > > On Monday 2018-04-16 18:04, Florian Westphal wrote: > >+u64 max = (u64)(~((u64)0)); > >+max = div_u64(max, NSEC_PER_MSEC); > >+if (ms >= max) > > Why opencode, is there a problem with UINT64_MAX? There is no UINT64_MAX in kernel (some private defines, but n

Re: [PATCH nf-next] netfilter: nf_tables: support timeouts larger than 23 days

2018-04-16 Thread Jan Engelhardt
On Monday 2018-04-16 18:04, Florian Westphal wrote: >+ u64 max = (u64)(~((u64)0)); >+ max = div_u64(max, NSEC_PER_MSEC); >+ if (ms >= max) Why opencode, is there a problem with UINT64_MAX? Just this: u64 max = div_u64(UINT64_MAX, NSEC_PER_MSEC); -- To unsubscribe from this