mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[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>
This commit is contained in:
parent
c6aefafb7e
commit
e898d4db27
14 changed files with 99 additions and 25 deletions
|
@ -39,8 +39,10 @@ static int sockstat6_seq_show(struct seq_file *seq, void *v)
|
|||
sock_prot_inuse_get(&tcpv6_prot));
|
||||
seq_printf(seq, "UDP6: inuse %d\n",
|
||||
sock_prot_inuse_get(&udpv6_prot));
|
||||
#ifdef CONFIG_IP_UDPLITE
|
||||
seq_printf(seq, "UDPLITE6: inuse %d\n",
|
||||
sock_prot_inuse_get(&udplitev6_prot));
|
||||
#endif
|
||||
seq_printf(seq, "RAW6: inuse %d\n",
|
||||
sock_prot_inuse_get(&rawv6_prot));
|
||||
seq_printf(seq, "FRAG6: inuse %d memory %d\n",
|
||||
|
@ -111,6 +113,7 @@ static struct snmp_mib snmp6_udp6_list[] = {
|
|||
SNMP_MIB_SENTINEL
|
||||
};
|
||||
|
||||
#ifdef CONFIG_IP_UDPLITE
|
||||
static struct snmp_mib snmp6_udplite6_list[] = {
|
||||
SNMP_MIB_ITEM("UdpLite6InDatagrams", UDP_MIB_INDATAGRAMS),
|
||||
SNMP_MIB_ITEM("UdpLite6NoPorts", UDP_MIB_NOPORTS),
|
||||
|
@ -118,6 +121,7 @@ static struct snmp_mib snmp6_udplite6_list[] = {
|
|||
SNMP_MIB_ITEM("UdpLite6OutDatagrams", UDP_MIB_OUTDATAGRAMS),
|
||||
SNMP_MIB_SENTINEL
|
||||
};
|
||||
#endif
|
||||
|
||||
static void snmp6_seq_show_icmpv6msg(struct seq_file *seq, void **mib)
|
||||
{
|
||||
|
@ -176,7 +180,9 @@ static int snmp6_seq_show(struct seq_file *seq, void *v)
|
|||
snmp6_seq_show_item(seq, (void **)icmpv6_statistics, snmp6_icmp6_list);
|
||||
snmp6_seq_show_icmpv6msg(seq, (void **)icmpv6msg_statistics);
|
||||
snmp6_seq_show_item(seq, (void **)udp_stats_in6, snmp6_udp6_list);
|
||||
#ifdef CONFIG_IP_UDPLITE
|
||||
snmp6_seq_show_item(seq, (void **)udplite_stats_in6, snmp6_udplite6_list);
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue