Re: [nf-next PATCH 0/5] nf_tables: nft_rule_dump_ctx fits into netlink_callback

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


Phil Sutter <phil@xxxxxx> wrote:
> Struct netlink_callback has a 48byte scratch area for use by dump
> callbacks to keep personal stuff.
> In rule dumps set up by nf_tables_getrule(), this is used only to store
> a cursor into the list of rules being dumped. Other data is allocated
> and the pointer value assigned to struct netlink_callback::data.
> Since the allocated data structure is small and fits into the scratch
> area even after adding some more fields, move it there.
> Patch 1 "simplifies" nf_tables_dump_rules_start() a bit, but actually
> exists only to reduce patch 5's size.
> Patch 2 is more or less fallout: The memset would mess things up after
> this series, but it was pointless in the first place.
> Patches 3 and 4 extend struct nft_rule_dump_ctx and make
> struct netlink_callback's scratch area unused.
> Patch 5 then finally eliminates the allocation.
> All this is early preparation for reset command locking but unrelated
> enough to go alone.

LGTM, I've applied this to nf-next:testing to have the buildbots
check it out.

[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux