On 03/04/2018 12:16 PM, Matthias Schiffer wrote: > I noticed that more than 25% of binary size of libnftnl are made up of > snprintf functions. Having these in a library with the goal to abstract the > netlink interface of nftables seems questionable to me, but I have no idea > if it would be viable to move these functions to nft or to a separate library. As an experiment, I created a reduced version of libnftnl by ripping out all import/export functions and related code like buffer handling. This reduced the size of libnftnl.so from 155KB to 110KB (on x86-64, -Os, stripped, uncompressed), a reduction of roughly 30%. I would like to look into splitting libnftnl into two parts, which could be called libnftnl-core and libnftnl, to make nftables more suited for tiny embedded systems. All basic functions that do not deal with textual representations of rules (i.e. the reduced libnftnl I built) would be moved into libnftnl-core. Does this sound like a good idea, and would such a drastic change be acceptable for upstream inclusion, given the current libnftnl API can be preserved? Kind regards, Matthias
Attachment:
signature.asc
Description: OpenPGP digital signature