On Sun, Nov 20, 2016 at 04:38:47PM +0000, Anders K. Pedersen | Cohaesio wrote: > From: Anders K. Pedersen <akp@xxxxxxxxxxxx> > > As Liping Zhang reports, after commit a8b1e36d0d1d ("netfilter: nft_dynset: > fix element timeout for HZ != 1000"), priv->timeout was stored in jiffies, > while set->timeout was stored in milliseconds. This is inconsistent and > incorrect. > > Firstly, we already call msecs_to_jiffies in nft_set_elem_init, so > priv->timeout will be converted to jiffies twice. > > Secondly, if the user did not specify the NFTA_DYNSET_TIMEOUT attr, > set->timeout will be used, but we forget to call msecs_to_jiffies > when do update elements. > > Fix this by using jiffies internally for traditional sets and doing the > conversions to/from msec when interacting with userspace - as dynset > already does. > > This is preferable to doing the conversions, when elements are inserted or > updated, because this can happen very frequently on busy dynsets. Applied, thanks! -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html