1. 20 11月, 2016 4 次提交
    • A
      netlink: smaller nla_attr_minlen table · 32d84cdc
      Alexey Dobriyan 提交于
      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: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      32d84cdc
    • A
      netlink: use "unsigned int" in nla_next() · 3b2c75d3
      Alexey Dobriyan 提交于
      ->nla_len is unsigned entity (it's length after all) and u16,
      thus it can't overflow when being aligned into int/unsigned int.
      
      (nlmsg_next has the same code, but I didn't yet convince myself
      it is correct to do so).
      
      There is pointer arithmetic in this function and offset being
      unsigned is better:
      
      	add/remove: 0/0 grow/shrink: 1/64 up/down: 5/-309 (-304)
      	function                                     old     new   delta
      	nl80211_set_wiphy                           1444    1449      +5
      	team_nl_cmd_options_set                      997     995      -2
      	tcf_em_tree_validate                         872     870      -2
      	switchdev_port_bridge_setlink                352     350      -2
      	switchdev_port_br_afspec                     312     310      -2
      	rtm_to_fib_config                            428     426      -2
      	qla4xxx_sysfs_ddb_set_param                 2193    2191      -2
      	qla4xxx_iface_set_param                     4470    4468      -2
      	ovs_nla_free_flow_actions                    152     150      -2
      	output_userspace                             518     516      -2
      		...
      	nl80211_set_reg                              654     649      -5
      	validate_scan_freqs                          148     142      -6
      	validate_linkmsg                             288     282      -6
      	nl80211_parse_connkeys                       489     483      -6
      	nlattr_set                                   231     224      -7
      	nf_tables_delsetelem                         267     260      -7
      	do_setlink                                  3416    3408      -8
      	netlbl_cipsov4_add_std                      1672    1659     -13
      	nl80211_parse_sched_scan                    2902    2888     -14
      	nl80211_trigger_scan                        1738    1720     -18
      	do_execute_actions                          2821    2738     -83
      	Total: Before=154865355, After=154865051, chg -0.00%
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3b2c75d3
    • A
      net: make struct napi_alloc_cache::skb_count unsigned int · e0d7924a
      Alexey Dobriyan 提交于
      size_t is way too much for an integer not exceeding 64.
      
      Space savings: 10 bytes!
      
      	add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-10 (-10)
      	function                                     old     new   delta
      	napi_consume_skb                             165     163      -2
      	__kfree_skb_flush                             56      53      -3
      	__kfree_skb_defer                             97      92      -5
      	Total: Before=154865639, After=154865629, chg -0.00%
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e0d7924a
    • D
      Merge tag 'batadv-next-for-davem-20161119' of git://git.open-mesh.org/linux-merge · f463c99b
      David S. Miller 提交于
      Simon Wunderlich says:
      
      ====================
      This feature patchset includes the following changes:
      
       - 6 patches adding functionality to detect a WiFi interface under
         other virtual interfaces, like VLANs. They introduce a cache for
         the detected the WiFi configuration to avoid RTNL locking in
         critical sections. Patches have been prepared by Marek Lindner
         and Sven Eckelmann
      
       - Enable automatic module loading for genl requests, by Sven Eckelmann
      
       - Fix a potential race condition on interface removal. This is not
         happening very often in practice, but requires bigger changes to fix,
         so we are sending this to net-next. By Linus Luessing
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f463c99b
  2. 19 11月, 2016 36 次提交