Re: [PATCH nft 1/2] src: sort set elements in netlink_get_setelems()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 06, 2017 at 07:43:32PM -0200, Elise Lennion wrote:
> So users can better track their ruleset via git.
>
> Without sorting, the elements can be listed in a different order
> every time the set is created, generating unnecessary git changes.
>
> Mergesort is used. Doesn't sort sets with 'flags interval' set on.

Applied, thanks Elise! I'm appending this to your description BTW:

Currently these interval set elements are dumped in order. We'll
likely get new representations soon that may not guarantee this
anymore, so let's revisit this later in case we need it.

Without this patch, nft list ruleset with a set containing 40000
elements takes on my laptop:

        real    0m2.742s
        user    0m0.112s
        sys     0m0.280s

With this patch:

        real    0m2.846s
        user    0m0.180s
        sys     0m0.284s

Difference is small, so don't get nft more complicated with yet
another getopt() option, enable this by default.
--
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



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux