• Alexey Dobriyan's avatar
    netlink: smaller nla_attr_minlen table · 32d84cdc
    Alexey Dobriyan authored
    Length of a netlink attribute may be u16 but lengths of basic attributes
    are much smaller, so small we can save 16 bytes of .rodata and pocket
    change inside .text.
    16-bit is worse on x86-64 than 8-bit because of operand size override prefix.
    	add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-19 (-19)
    	function                                     old     new   delta
    	validate_nla                                 418     417      -1
    	nla_policy_len                                66      64      -2
    	nla_attr_minlen                               32      16     -16
    	Total: Before=154865051, After=154865032, chg -0.00%
    Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
nlattr.c 15.7 KB