aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2008-01-06 02:11:31 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:00:41 -0500
commitbb5cf80e94ad9650c4bd39e92fb917af8e87fa43 (patch)
tree57dbbb350d7c6893bde1cc9c46265e629fa43d19 /net
parent2a75de0c1de2dde9ef41aeb45a21048681421b8a (diff)
[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>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_conntrack_netlink.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index d93d58d688b9..38141f104db7 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -95,7 +95,7 @@ nla_put_failure:
95 return -1; 95 return -1;
96} 96}
97 97
98static inline int 98static int
99ctnetlink_dump_tuples(struct sk_buff *skb, 99ctnetlink_dump_tuples(struct sk_buff *skb,
100 const struct nf_conntrack_tuple *tuple) 100 const struct nf_conntrack_tuple *tuple)
101{ 101{
@@ -205,7 +205,7 @@ nla_put_failure:
205} 205}
206 206
207#ifdef CONFIG_NF_CT_ACCT 207#ifdef CONFIG_NF_CT_ACCT
208static inline int 208static int
209ctnetlink_dump_counters(struct sk_buff *skb, const struct nf_conn *ct, 209ctnetlink_dump_counters(struct sk_buff *skb, const struct nf_conn *ct,
210 enum ip_conntrack_dir dir) 210 enum ip_conntrack_dir dir)
211{ 211{
@@ -284,7 +284,7 @@ nla_put_failure:
284} 284}
285 285
286#ifdef CONFIG_NF_NAT_NEEDED 286#ifdef CONFIG_NF_NAT_NEEDED
287static inline int 287static int
288dump_nat_seq_adj(struct sk_buff *skb, const struct nf_nat_seq *natseq, int type) 288dump_nat_seq_adj(struct sk_buff *skb, const struct nf_nat_seq *natseq, int type)
289{ 289{
290 struct nlattr *nest_parms; 290 struct nlattr *nest_parms;
@@ -648,7 +648,7 @@ ctnetlink_parse_tuple_proto(struct nlattr *attr,
648 return ret; 648 return ret;
649} 649}
650 650
651static inline int 651static int
652ctnetlink_parse_tuple(struct nlattr *cda[], struct nf_conntrack_tuple *tuple, 652ctnetlink_parse_tuple(struct nlattr *cda[], struct nf_conntrack_tuple *tuple,
653 enum ctattr_tuple type, u_int8_t l3num) 653 enum ctattr_tuple type, u_int8_t l3num)
654{ 654{
@@ -888,7 +888,7 @@ out:
888 return err; 888 return err;
889} 889}
890 890
891static inline int 891static int
892ctnetlink_change_status(struct nf_conn *ct, struct nlattr *cda[]) 892ctnetlink_change_status(struct nf_conn *ct, struct nlattr *cda[])
893{ 893{
894 unsigned long d; 894 unsigned long d;
@@ -1349,7 +1349,7 @@ nla_put_failure:
1349 return -1; 1349 return -1;
1350} 1350}
1351 1351
1352static inline int 1352static int
1353ctnetlink_exp_dump_expect(struct sk_buff *skb, 1353ctnetlink_exp_dump_expect(struct sk_buff *skb,
1354 const struct nf_conntrack_expect *exp) 1354 const struct nf_conntrack_expect *exp)
1355{ 1355{