git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tcp: Fix tcp_mark_head_lost() with packets == 0
[safe/jmp/linux-2.6]
/
net
/
ipv4
/
protocol.c
diff --git
a/net/ipv4/protocol.c
b/net/ipv4/protocol.c
index
05f5114
..
542f22f
100644
(file)
--- a/
net/ipv4/protocol.c
+++ b/
net/ipv4/protocol.c
@@
-5,8
+5,6
@@
*
* INET protocol dispatch tables.
*
*
* INET protocol dispatch tables.
*
- * Version: $Id: protocol.c,v 1.14 2001/05/18 02:25:49 davem Exp $
- *
* Authors: Ross Biro
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
*
* Authors: Ross Biro
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
*
@@
-24,36
+22,20
@@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
-
-#include <asm/uaccess.h>
-#include <asm/system.h>
+#include <linux/cache.h>
#include <linux/module.h>
#include <linux/module.h>
-#include <linux/types.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/string.h>
-#include <linux/socket.h>
-#include <linux/in.h>
-#include <linux/inet.h>
#include <linux/netdevice.h>
#include <linux/netdevice.h>
-#include <linux/timer.h>
-#include <net/ip.h>
+#include <linux/spinlock.h>
#include <net/protocol.h>
#include <net/protocol.h>
-#include <linux/skbuff.h>
-#include <net/sock.h>
-#include <net/icmp.h>
-#include <net/udp.h>
-#include <net/ipip.h>
-#include <linux/igmp.h>
-
struct net_protocol *inet_protos[MAX_INET_PROTOS]
;
+
const struct net_protocol *inet_protos[MAX_INET_PROTOS] ____cacheline_aligned_in_smp
;
static DEFINE_SPINLOCK(inet_proto_lock);
/*
* Add a protocol handler to the hash tables
*/
static DEFINE_SPINLOCK(inet_proto_lock);
/*
* Add a protocol handler to the hash tables
*/
-int inet_add_protocol(struct net_protocol *prot, unsigned char protocol)
+int inet_add_protocol(
const
struct net_protocol *prot, unsigned char protocol)
{
int hash, ret;
{
int hash, ret;
@@
-74,8
+56,8
@@
int inet_add_protocol(struct net_protocol *prot, unsigned char protocol)
/*
* Remove a protocol from the hash tables.
*/
/*
* Remove a protocol from the hash tables.
*/
-
-int inet_del_protocol(struct net_protocol *prot, unsigned char protocol)
+
+int inet_del_protocol(
const
struct net_protocol *prot, unsigned char protocol)
{
int hash, ret;
{
int hash, ret;