[IPV4]: Use the {DEFINE|REF}_PROTO_INUSE infrastructure
Trivial patch to make "tcp,udp,udplite,raw" protocols uses the fast "inuse sockets" infrastructure Each protocol use then a static percpu var, instead of a dynamic one. This saves some ram and some cpu cycles Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
286ab3d460
commit
47a31a6ffc
@ -44,6 +44,8 @@ static struct net_protocol udplite_protocol = {
|
||||
.no_policy = 1,
|
||||
};
|
||||
|
||||
DEFINE_PROTO_INUSE(udplite)
|
||||
|
||||
struct proto udplite_prot = {
|
||||
.name = "UDP-Lite",
|
||||
.owner = THIS_MODULE,
|
||||
@ -67,6 +69,7 @@ struct proto udplite_prot = {
|
||||
.compat_setsockopt = compat_udp_setsockopt,
|
||||
.compat_getsockopt = compat_udp_getsockopt,
|
||||
#endif
|
||||
REF_PROTO_INUSE(udplite)
|
||||
};
|
||||
|
||||
static struct inet_protosw udplite4_protosw = {
|
||||
|
Reference in New Issue
Block a user