linux/net/netfilter
Ilpo Järvinen bb5cf80e94 [NETFILTER]: Kill some supper dupper bloatry
/me awards the bloatiest-of-all-net/-.c-code award to
nf_conntrack_netlink.c, congratulations to all the authors :-/!

Hall of (unquestionable) fame (measured per inline, top 10 under
net/):
  -4496 ctnetlink_parse_tuple        netfilter/nf_conntrack_netlink.c
  -2165 ctnetlink_dump_tuples        netfilter/nf_conntrack_netlink.c
  -2115 __ip_vs_get_out_rt           ipv4/ipvs/ip_vs_xmit.c
  -1924 xfrm_audit_helper_pktinfo    xfrm/xfrm_state.c
  -1799 ctnetlink_parse_tuple_proto  netfilter/nf_conntrack_netlink.c
  -1268 ctnetlink_parse_tuple_ip     netfilter/nf_conntrack_netlink.c
  -1093 ctnetlink_exp_dump_expect    netfilter/nf_conntrack_netlink.c
  -1060 void ccid3_update_send_interval  dccp/ccids/ccid3.c
  -983  ctnetlink_dump_tuples_proto  netfilter/nf_conntrack_netlink.c
  -827  ctnetlink_exp_dump_tuple     netfilter/nf_conntrack_netlink.c

  (i386 / gcc (GCC) 4.1.2 20070626 (Red Hat 4.1.2-13) /
   allyesconfig except CONFIG_FORCED_INLINING)

...and I left < 200 byte gains as future work item.

After iterative inline removal, I finally have this:

net/netfilter/nf_conntrack_netlink.c:
  ctnetlink_exp_fill_info   | -1104
  ctnetlink_new_expect      | -1572
  ctnetlink_fill_info       | -1303
  ctnetlink_new_conntrack   | -2230
  ctnetlink_get_expect      | -341
  ctnetlink_del_expect      | -352
  ctnetlink_expect_event    | -1110
  ctnetlink_conntrack_event | -1548
  ctnetlink_del_conntrack   | -729
  ctnetlink_get_conntrack   | -728
 10 functions changed, 11017 bytes removed, diff: -11017

net/netfilter/nf_conntrack_netlink.c:
  ctnetlink_parse_tuple     | +419
  dump_nat_seq_adj          | +183
  ctnetlink_dump_counters   | +166
  ctnetlink_dump_tuples     | +261
  ctnetlink_exp_dump_expect | +633
  ctnetlink_change_status   | +460
 6 functions changed, 2122 bytes added, diff: +2122

net/netfilter/nf_conntrack_netlink.o:
 16 functions changed, 2122 bytes added, 11017 bytes removed, diff: -8895

Without a number of CONFIG.*DEBUGs, I got this:
net/netfilter/nf_conntrack_netlink.o:
 16 functions changed, 2122 bytes added, 11029 bytes removed, diff: -8907

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:00:41 -08:00
..
Kconfig [NETFILTER]: Add CONFIG_NETFILTER_ADVANCED option 2008-01-28 14:59:12 -08:00
Makefile [NETFILTER]: x_tables: add rateest match 2008-01-28 14:56:03 -08:00
core.c [NETFILTER]: constify nf_afinfo 2008-01-28 14:59:05 -08:00
nf_conntrack_amanda.c [NETFILTER]: Replace sk_buff ** with sk_buff * 2007-10-15 12:26:29 -07:00
nf_conntrack_core.c [NETFILTER]: non-power-of-two jhash optimizations 2008-01-28 14:59:11 -08:00
nf_conntrack_ecache.c [NETFILTER]: nf_conntrack_expect: function naming unification 2007-07-10 22:17:53 -07:00
nf_conntrack_expect.c [NETFILTER]: non-power-of-two jhash optimizations 2008-01-28 14:59:11 -08:00
nf_conntrack_extend.c [NETFILTER]: Fix NULL pointer dereference in nf_nat_move_storage() 2007-11-15 15:52:32 -08:00
nf_conntrack_ftp.c [NETFILTER]: Introduce nf_inet_address 2008-01-28 14:59:07 -08:00
nf_conntrack_h323_asn1.c [NETFILTER]: Parenthesize macro parameters 2008-01-28 14:59:08 -08:00
nf_conntrack_h323_main.c [NETFILTER]: Introduce nf_inet_address 2008-01-28 14:59:07 -08:00
nf_conntrack_h323_types.c [NETFILTER]: nf_conntrack_h323: fix ASN.1 types 2007-05-24 16:42:26 -07:00
nf_conntrack_helper.c netfilter endian regressions 2007-07-26 11:11:56 -07:00
nf_conntrack_irc.c [NETFILTER]: Replace sk_buff ** with sk_buff * 2007-10-15 12:26:29 -07:00
nf_conntrack_l3proto_generic.c [NETFILTER]: nf_conntrack: mark protocols __read_mostly 2007-07-14 20:48:19 -07:00
nf_conntrack_netbios_ns.c [NETFILTER]: Replace sk_buff ** with sk_buff * 2007-10-15 12:26:29 -07:00
nf_conntrack_netlink.c [NETFILTER]: Kill some supper dupper bloatry 2008-01-28 15:00:41 -08:00
nf_conntrack_pptp.c [NETFILTER]: Replace sk_buff ** with sk_buff * 2007-10-15 12:26:29 -07:00
nf_conntrack_proto.c [NETLINK]: Possible cleanups. 2007-04-26 00:57:41 -07:00
nf_conntrack_proto_generic.c sysctl: remove broken netfilter binary sysctls 2007-10-18 14:37:23 -07:00
nf_conntrack_proto_gre.c [NETFILTER]: ctnetlink: use netlink policy 2007-10-10 16:53:35 -07:00
nf_conntrack_proto_sctp.c [NETFILTER]: Parenthesize macro parameters 2008-01-28 14:59:08 -08:00
nf_conntrack_proto_tcp.c [NETFILTER]: nf_log: move logging stuff to seperate header 2008-01-28 14:58:58 -08:00
nf_conntrack_proto_udp.c [NETFILTER]: nf_log: move logging stuff to seperate header 2008-01-28 14:58:58 -08:00
nf_conntrack_proto_udplite.c [NETFILTER]: nf_log: move logging stuff to seperate header 2008-01-28 14:58:58 -08:00
nf_conntrack_sane.c [NETFILTER]: Replace sk_buff ** with sk_buff * 2007-10-15 12:26:29 -07:00
nf_conntrack_sip.c [NETFILTER]: Introduce nf_inet_address 2008-01-28 14:59:07 -08:00
nf_conntrack_standalone.c [NETFILTER]: Make netfilter code use the seq_open_private 2007-10-10 16:55:34 -07:00
nf_conntrack_tftp.c [NETFILTER]: Replace sk_buff ** with sk_buff * 2007-10-15 12:26:29 -07:00
nf_internals.h [NETFILTER]: Replace sk_buff ** with sk_buff * 2007-10-15 12:26:29 -07:00
nf_log.c [NETFILTER]: nf_log: remove incomprehensible comment 2008-01-28 14:59:00 -08:00
nf_queue.c [NETFILTER]: constify nf_afinfo 2008-01-28 14:59:05 -08:00
nf_sockopt.c [NETFILTER]: fix compat_nf_sockopt typo 2007-11-15 14:29:21 -08:00
nf_sysctl.c [PATCH] sysctl: remove insert_at_head from register_sysctl 2007-02-14 08:09:59 -08:00
nfnetlink.c [NET]: make netlink user -> kernel interface synchronious 2007-10-10 21:15:29 -07:00
nfnetlink_log.c [NETFILTER]: nfnetlink_log: include GID in netlink message 2008-01-28 14:59:04 -08:00
nfnetlink_queue.c [NETFILTER]: nfnetlink_{queue,log}: return proper error codes in instance_create 2008-01-28 14:59:02 -08:00
x_tables.c [NETFILTER]: ip_tables: move compat offset calculation to x_tables 2008-01-28 14:58:31 -08:00
xt_CLASSIFY.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00
xt_CONNMARK.c [NETFILTER]: x_tables: use %u format specifiers 2008-01-28 14:59:07 -08:00
xt_CONNSECMARK.c [NETFILTER]: x_tables: use %u format specifiers 2008-01-28 14:59:07 -08:00
xt_DSCP.c [NETFILTER]: IPv6 capable xt_TOS v1 target 2008-01-28 14:56:00 -08:00
xt_MARK.c [NETFILTER]: xt_MARK: add compat support for revision 0 2008-01-28 14:58:38 -08:00
xt_NFLOG.c [NETFILTER]: nf_log: move logging stuff to seperate header 2008-01-28 14:58:58 -08:00
xt_NFQUEUE.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00
xt_NOTRACK.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00
xt_RATEEST.c [NETFILTER]: x_tables: add RATEEST target 2008-01-28 14:56:02 -08:00
xt_SECMARK.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00
xt_TCPMSS.c [NETFILTER]: xt_TCPMSS: don't allow netfilter --setmss to increase mss 2008-01-28 14:58:50 -08:00
xt_TCPOPTSTRIP.c [NETFILTER]: x_tables: add TCPOPTSTRIP target 2008-01-28 14:55:51 -08:00
xt_TRACE.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00
xt_comment.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00
xt_connbytes.c [NETFILTER]: x_tables: use %u format specifiers 2008-01-28 14:59:07 -08:00
xt_connlimit.c [NETFILTER]: xt_connlimit: use the new union nf_inet_addr 2008-01-28 14:59:09 -08:00
xt_connmark.c [NETFILTER]: x_tables: use %u format specifiers 2008-01-28 14:59:07 -08:00
xt_conntrack.c [NETFILTER]: Parenthesize macro parameters 2008-01-28 14:59:08 -08:00
xt_dccp.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00
xt_dscp.c [NETFILTER]: IPv6 capable xt_tos v1 match 2008-01-28 14:56:00 -08:00
xt_esp.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00
xt_hashlimit.c [NETFILTER]: xt_hashlimit: reduce overhead without IPv6 2008-01-28 14:59:11 -08:00
xt_helper.c [NETFILTER]: x_tables: use %u format specifiers 2008-01-28 14:59:07 -08:00
xt_length.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00
xt_limit.c [NETFILTER]: x_tables: enable compat translation for IPv6 matches/targets 2008-01-28 14:58:37 -08:00
xt_mac.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00
xt_mark.c [NETFILTER]: x_tables: enable compat translation for IPv6 matches/targets 2008-01-28 14:58:37 -08:00
xt_multiport.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00
xt_owner.c [NETFILTER]: merge ipt_owner/ip6t_owner in xt_owner 2008-01-28 14:55:55 -08:00
xt_physdev.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00
xt_pkttype.c [IPV4] net/netfilter: Use ipv4_is_<type> 2008-01-28 14:58:16 -08:00
xt_policy.c [NETFILTER]: Parenthesize macro parameters 2008-01-28 14:59:08 -08:00
xt_quota.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00
xt_rateest.c [NETFILTER]: x_tables: add rateest match 2008-01-28 14:56:03 -08:00
xt_realm.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00
xt_sctp.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00
xt_state.c [NETFILTER]: x_tables: use %u format specifiers 2008-01-28 14:59:07 -08:00
xt_statistic.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00
xt_string.c [NETFILTER]: Parenthesize macro parameters 2008-01-28 14:59:08 -08:00
xt_tcpmss.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00
xt_tcpudp.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00
xt_time.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00
xt_u32.c [NETFILTER]: x_tables: consistent and unique symbol names 2008-01-28 14:55:53 -08:00