diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-02-29 11:06:47 -0500 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-03-04 01:18:22 -0500 |
commit | e898d4db2749c6052072e9bc4448e396cbdeb06a (patch) | |
tree | 2b8673d85210a23e67d0817b18f401411e8936f3 /net/ipv4/proc.c | |
parent | c6aefafb7ec620911d46174eed514f9df639e5a4 (diff) |
[UDP]: Allow users to configure UDP-Lite.
Let's give users an option for disabling UDP-Lite (~4K).
old:
| text data bss dec hex filename
| 286498 12432 6072 305002 4a76a net/ipv4/built-in.o
| 193830 8192 3204 205226 321aa net/ipv6/ipv6.o
new (without UDP-Lite):
| text data bss dec hex filename
| 284086 12136 5432 301654 49a56 net/ipv4/built-in.o
| 191835 7832 3076 202743 317f7 net/ipv6/ipv6.o
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/ipv4/proc.c')
-rw-r--r-- | net/ipv4/proc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c index d63474c6b400..d75ddb7fa4b8 100644 --- a/net/ipv4/proc.c +++ b/net/ipv4/proc.c | |||
@@ -59,7 +59,9 @@ static int sockstat_seq_show(struct seq_file *seq, void *v) | |||
59 | atomic_read(&tcp_memory_allocated)); | 59 | atomic_read(&tcp_memory_allocated)); |
60 | seq_printf(seq, "UDP: inuse %d mem %d\n", sock_prot_inuse_get(&udp_prot), | 60 | seq_printf(seq, "UDP: inuse %d mem %d\n", sock_prot_inuse_get(&udp_prot), |
61 | atomic_read(&udp_memory_allocated)); | 61 | atomic_read(&udp_memory_allocated)); |
62 | #ifdef CONFIG_IP_UDPLITE | ||
62 | seq_printf(seq, "UDPLITE: inuse %d\n", sock_prot_inuse_get(&udplite_prot)); | 63 | seq_printf(seq, "UDPLITE: inuse %d\n", sock_prot_inuse_get(&udplite_prot)); |
64 | #endif | ||
63 | seq_printf(seq, "RAW: inuse %d\n", sock_prot_inuse_get(&raw_prot)); | 65 | seq_printf(seq, "RAW: inuse %d\n", sock_prot_inuse_get(&raw_prot)); |
64 | seq_printf(seq, "FRAG: inuse %d memory %d\n", | 66 | seq_printf(seq, "FRAG: inuse %d memory %d\n", |
65 | ip_frag_nqueues(&init_net), ip_frag_mem(&init_net)); | 67 | ip_frag_nqueues(&init_net), ip_frag_mem(&init_net)); |
@@ -349,6 +351,7 @@ static int snmp_seq_show(struct seq_file *seq, void *v) | |||
349 | snmp_fold_field((void **)udp_statistics, | 351 | snmp_fold_field((void **)udp_statistics, |
350 | snmp4_udp_list[i].entry)); | 352 | snmp4_udp_list[i].entry)); |
351 | 353 | ||
354 | #ifdef CONFIG_IP_UDPLITE | ||
352 | /* the UDP and UDP-Lite MIBs are the same */ | 355 | /* the UDP and UDP-Lite MIBs are the same */ |
353 | seq_puts(seq, "\nUdpLite:"); | 356 | seq_puts(seq, "\nUdpLite:"); |
354 | for (i = 0; snmp4_udp_list[i].name != NULL; i++) | 357 | for (i = 0; snmp4_udp_list[i].name != NULL; i++) |
@@ -359,7 +362,7 @@ static int snmp_seq_show(struct seq_file *seq, void *v) | |||
359 | seq_printf(seq, " %lu", | 362 | seq_printf(seq, " %lu", |
360 | snmp_fold_field((void **)udplite_statistics, | 363 | snmp_fold_field((void **)udplite_statistics, |
361 | snmp4_udp_list[i].entry)); | 364 | snmp4_udp_list[i].entry)); |
362 | 365 | #endif | |
363 | seq_putc(seq, '\n'); | 366 | seq_putc(seq, '\n'); |
364 | return 0; | 367 | return 0; |
365 | } | 368 | } |