I noticed that some of 'struct proto_ops' used in the kernel may share a cache line used by locks or other heavily modified data. (default linker alignement is 32 bytes, and L1_CACHE_LINE is 64 or 128 at least)

This patch makes sure a 'struct proto_ops' can be declared as const, so that all cpus can share all parts of it without false sharing.

This is not mandatory : a driver can still use a read/write structure if it needs to (and eventually a __read_mostly)

I made a global stubstitute to change all existing occurences to make them 
const.

This should reduce the possibility of false sharing on SMP, and speedup some socket system calls.

Signed-off-by: Eric Dumazet <[EMAIL PROTECTED]>
--- linux-2.6.15-rc5/include/net/protocol.h     2005-12-04 06:10:42.000000000 
+0100
+++ linux-2.6.15-rc5-ed/include/net/protocol.h  2005-12-17 11:21:22.000000000 
+0100
@@ -65,7 +65,7 @@
        int              protocol; /* This is the L4 protocol number.  */
 
        struct proto     *prot;
-       struct proto_ops *ops;
+       const struct proto_ops *ops;
   
        int              capability; /* Which (if any) capability do
                                      * we need to use this socket
--- linux-2.6.15-rc5/include/linux/net.h        2005-12-04 06:10:42.000000000 
+0100
+++ linux-2.6.15-rc5-ed/include/linux/net.h     2005-12-17 11:23:53.000000000 
+0100
@@ -107,7 +107,7 @@
 struct socket {
        socket_state            state;
        unsigned long           flags;
-       struct proto_ops        *ops;
+       const struct proto_ops  *ops;
        struct fasync_struct    *fasync_list;
        struct file             *file;
        struct sock             *sk;
@@ -260,7 +260,7 @@
 SOCKCALL_WRAP(name, mmap, (struct file *file, struct socket *sock, struct 
vm_area_struct *vma), \
              (file, sock, vma)) \
              \
-static struct proto_ops name##_ops = {                 \
+static const struct proto_ops name##_ops = {                   \
        .family         = fam,                          \
        .owner          = THIS_MODULE,                  \
        .release        = __lock_##name##_release,      \
--- linux-2.6.15-rc5/include/net/inet_common.h  2005-12-04 06:10:42.000000000 
+0100
+++ linux-2.6.15-rc5-ed/include/net/inet_common.h       2005-12-17 
11:23:53.000000000 +0100
@@ -1,8 +1,8 @@
 #ifndef _INET_COMMON_H
 #define _INET_COMMON_H
 
-extern struct proto_ops                inet_stream_ops;
-extern struct proto_ops                inet_dgram_ops;
+extern const struct proto_ops          inet_stream_ops;
+extern const struct proto_ops          inet_dgram_ops;
 
 /*
  *     INET4 prototypes used by INET6
--- linux-2.6.15-rc5/include/net/ipv6.h 2005-12-04 06:10:42.000000000 +0100
+++ linux-2.6.15-rc5-ed/include/net/ipv6.h      2005-12-17 11:23:53.000000000 
+0100
@@ -533,8 +533,8 @@
 extern int sysctl_ip6frag_time;
 extern int sysctl_ip6frag_secret_interval;
 
-extern struct proto_ops inet6_stream_ops;
-extern struct proto_ops inet6_dgram_ops;
+extern const struct proto_ops inet6_stream_ops;
+extern const struct proto_ops inet6_dgram_ops;
 
 extern int ip6_mc_source(int add, int omode, struct sock *sk,
                         struct group_source_req *pgsr);
--- linux-2.6.15-rc5/net/netlink/af_netlink.c   2005-12-04 06:10:42.000000000 
+0100
+++ linux-2.6.15-rc5-ed/net/netlink/af_netlink.c        2005-12-17 
11:24:53.000000000 +0100
@@ -293,7 +293,7 @@
        return 0;
 }
 
-static struct proto_ops netlink_ops;
+static const struct proto_ops netlink_ops;
 
 static int netlink_insert(struct sock *sk, u32 pid)
 {
@@ -1656,7 +1656,7 @@
        return notifier_chain_unregister(&netlink_chain, nb);
 }
                 
-static struct proto_ops netlink_ops = {
+static const struct proto_ops netlink_ops = {
        .family =       PF_NETLINK,
        .owner =        THIS_MODULE,
        .release =      netlink_release,
--- linux-2.6.15-rc5/net/llc/af_llc.c   2005-12-04 06:10:42.000000000 +0100
+++ linux-2.6.15-rc5-ed/net/llc/af_llc.c        2005-12-17 11:25:44.000000000 
+0100
@@ -36,7 +36,7 @@
 static u16 llc_ui_sap_last_autoport = LLC_SAP_DYN_START;
 static u16 llc_ui_sap_link_no_max[256];
 static struct sockaddr_llc llc_ui_addrnull;
-static struct proto_ops llc_ui_ops;
+static const struct proto_ops llc_ui_ops;
 
 static int llc_ui_wait_for_conn(struct sock *sk, long timeout);
 static int llc_ui_wait_for_disc(struct sock *sk, long timeout);
@@ -1099,7 +1099,7 @@
        .owner  = THIS_MODULE,
 };
 
-static struct proto_ops llc_ui_ops = {
+static const struct proto_ops llc_ui_ops = {
        .family      = PF_LLC,
        .owner       = THIS_MODULE,
        .release     = llc_ui_release,
--- linux-2.6.15-rc5/net/irda/af_irda.c 2005-12-04 06:10:42.000000000 +0100
+++ linux-2.6.15-rc5-ed/net/irda/af_irda.c      2005-12-17 11:41:51.000000000 
+0100
@@ -62,12 +62,12 @@
 
 static int irda_create(struct socket *sock, int protocol);
 
-static struct proto_ops irda_stream_ops;
-static struct proto_ops irda_seqpacket_ops;
-static struct proto_ops irda_dgram_ops;
+static const struct proto_ops irda_stream_ops;
+static const struct proto_ops irda_seqpacket_ops;
+static const struct proto_ops irda_dgram_ops;
 
 #ifdef CONFIG_IRDA_ULTRA
-static struct proto_ops irda_ultra_ops;
+static const struct proto_ops irda_ultra_ops;
 #define ULTRA_MAX_DATA 382
 #endif /* CONFIG_IRDA_ULTRA */
 
@@ -2463,7 +2463,7 @@
        .owner  = THIS_MODULE,
 };
 
-static struct proto_ops SOCKOPS_WRAPPED(irda_stream_ops) = {
+static const struct proto_ops SOCKOPS_WRAPPED(irda_stream_ops) = {
        .family =       PF_IRDA,
        .owner =        THIS_MODULE,
        .release =      irda_release,
@@ -2484,7 +2484,7 @@
        .sendpage =     sock_no_sendpage,
 };
 
-static struct proto_ops SOCKOPS_WRAPPED(irda_seqpacket_ops) = {
+static const struct proto_ops SOCKOPS_WRAPPED(irda_seqpacket_ops) = {
        .family =       PF_IRDA,
        .owner =        THIS_MODULE,
        .release =      irda_release,
@@ -2505,7 +2505,7 @@
        .sendpage =     sock_no_sendpage,
 };
 
-static struct proto_ops SOCKOPS_WRAPPED(irda_dgram_ops) = {
+static const struct proto_ops SOCKOPS_WRAPPED(irda_dgram_ops) = {
        .family =       PF_IRDA,
        .owner =        THIS_MODULE,
        .release =      irda_release,
@@ -2527,7 +2527,7 @@
 };
 
 #ifdef CONFIG_IRDA_ULTRA
-static struct proto_ops SOCKOPS_WRAPPED(irda_ultra_ops) = {
+static const struct proto_ops SOCKOPS_WRAPPED(irda_ultra_ops) = {
        .family =       PF_IRDA,
        .owner =        THIS_MODULE,
        .release =      irda_release,
--- linux-2.6.15-rc5/net/sunrpc/svcsock.c       2005-12-04 06:10:42.000000000 
+0100
+++ linux-2.6.15-rc5-ed/net/sunrpc/svcsock.c    2005-12-17 11:25:44.000000000 
+0100
@@ -758,7 +758,7 @@
        struct svc_serv *serv = svsk->sk_server;
        struct socket   *sock = svsk->sk_sock;
        struct socket   *newsock;
-       struct proto_ops *ops;
+       const struct proto_ops *ops;
        struct svc_sock *newsvsk;
        int             err, slen;
 
--- linux-2.6.15-rc5/net/ipv4/af_inet.c 2005-12-04 06:10:42.000000000 +0100
+++ linux-2.6.15-rc5-ed/net/ipv4/af_inet.c      2005-12-17 11:27:09.000000000 
+0100
@@ -784,7 +784,7 @@
        return err;
 }
 
-struct proto_ops inet_stream_ops = {
+const struct proto_ops inet_stream_ops = {
        .family =       PF_INET,
        .owner =        THIS_MODULE,
        .release =      inet_release,
@@ -805,7 +805,7 @@
        .sendpage =     tcp_sendpage
 };
 
-struct proto_ops inet_dgram_ops = {
+const struct proto_ops inet_dgram_ops = {
        .family =       PF_INET,
        .owner =        THIS_MODULE,
        .release =      inet_release,
@@ -830,7 +830,7 @@
  * For SOCK_RAW sockets; should be the same as inet_dgram_ops but without
  * udp_poll
  */
-static struct proto_ops inet_sockraw_ops = {
+static const struct proto_ops inet_sockraw_ops = {
        .family =       PF_INET,
        .owner =        THIS_MODULE,
        .release =      inet_release,
--- linux-2.6.15-rc5/net/decnet/af_decnet.c     2005-12-04 06:10:42.000000000 
+0100
+++ linux-2.6.15-rc5-ed/net/decnet/af_decnet.c  2005-12-17 11:27:09.000000000 
+0100
@@ -149,7 +149,7 @@
 #define DN_SK_HASH_MASK (DN_SK_HASH_SIZE - 1)
 
 
-static struct proto_ops dn_proto_ops;
+static const struct proto_ops dn_proto_ops;
 static DEFINE_RWLOCK(dn_hash_lock);
 static struct hlist_head dn_sk_hash[DN_SK_HASH_SIZE];
 static struct hlist_head dn_wild_sk;
@@ -2323,7 +2323,7 @@
        .owner  =       THIS_MODULE,
 };
 
-static struct proto_ops dn_proto_ops = {
+static const struct proto_ops dn_proto_ops = {
        .family =       AF_DECnet,
        .owner =        THIS_MODULE,
        .release =      dn_release,
--- linux-2.6.15-rc5/net/ipv6/af_inet6.c        2005-12-04 06:10:42.000000000 
+0100
+++ linux-2.6.15-rc5-ed/net/ipv6/af_inet6.c     2005-12-17 11:28:02.000000000 
+0100
@@ -459,7 +459,7 @@
        return(0);
 }
 
-struct proto_ops inet6_stream_ops = {
+const struct proto_ops inet6_stream_ops = {
        .family =       PF_INET6,
        .owner =        THIS_MODULE,
        .release =      inet6_release,
@@ -480,7 +480,7 @@
        .sendpage =     tcp_sendpage
 };
 
-struct proto_ops inet6_dgram_ops = {
+const struct proto_ops inet6_dgram_ops = {
        .family =       PF_INET6,
        .owner =        THIS_MODULE,
        .release =      inet6_release,
@@ -508,7 +508,7 @@
 };
 
 /* Same as inet6_dgram_ops, sans udp_poll.  */
-static struct proto_ops inet6_sockraw_ops = {
+static const struct proto_ops inet6_sockraw_ops = {
        .family =       PF_INET6,
        .owner =        THIS_MODULE,
        .release =      inet6_release,
--- linux-2.6.15-rc5/net/ax25/af_ax25.c 2005-12-04 06:10:42.000000000 +0100
+++ linux-2.6.15-rc5-ed/net/ax25/af_ax25.c      2005-12-17 11:28:02.000000000 
+0100
@@ -54,7 +54,7 @@
 HLIST_HEAD(ax25_list);
 DEFINE_SPINLOCK(ax25_list_lock);
 
-static struct proto_ops ax25_proto_ops;
+static const struct proto_ops ax25_proto_ops;
 
 static void ax25_free_sock(struct sock *sk)
 {
@@ -1944,7 +1944,7 @@
        .owner  =       THIS_MODULE,
 };
 
-static struct proto_ops ax25_proto_ops = {
+static const struct proto_ops ax25_proto_ops = {
        .family         = PF_AX25,
        .owner          = THIS_MODULE,
        .release        = ax25_release,
--- linux-2.6.15-rc5/net/key/af_key.c   2005-12-04 06:10:42.000000000 +0100
+++ linux-2.6.15-rc5-ed/net/key/af_key.c        2005-12-17 11:30:35.000000000 
+0100
@@ -113,7 +113,7 @@
 }
 
 
-static struct proto_ops pfkey_ops;
+static const struct proto_ops pfkey_ops;
 
 static void pfkey_insert(struct sock *sk)
 {
@@ -2946,7 +2946,7 @@
        return err;
 }
 
-static struct proto_ops pfkey_ops = {
+static const struct proto_ops pfkey_ops = {
        .family         =       PF_KEY,
        .owner          =       THIS_MODULE,
        /* Operations that make no sense on pfkey sockets. */
--- linux-2.6.15-rc5/net/wanrouter/af_wanpipe.c 2005-12-04 06:10:42.000000000 
+0100
+++ linux-2.6.15-rc5-ed/net/wanrouter/af_wanpipe.c      2005-12-17 
11:30:35.000000000 +0100
@@ -181,7 +181,7 @@
 #endif
 
 static int sk_count;
-extern struct proto_ops wanpipe_ops;
+extern const struct proto_ops wanpipe_ops;
 static unsigned long find_free_critical;
 
 static void wanpipe_unlink_driver(struct sock *sk);
@@ -2546,7 +2546,7 @@
        return 0;
 }
 
-struct proto_ops wanpipe_ops = {
+const struct proto_ops wanpipe_ops = {
        .family =       PF_WANPIPE,
        .owner =        THIS_MODULE,
        .release =      wanpipe_release,
--- linux-2.6.15-rc5/net/bluetooth/l2cap.c      2005-12-04 06:10:42.000000000 
+0100
+++ linux-2.6.15-rc5-ed/net/bluetooth/l2cap.c   2005-12-17 11:31:18.000000000 
+0100
@@ -57,7 +57,7 @@
 
 #define VERSION "2.8"
 
-static struct proto_ops l2cap_sock_ops;
+static const struct proto_ops l2cap_sock_ops;
 
 static struct bt_sock_list l2cap_sk_list = {
        .lock = RW_LOCK_UNLOCKED
@@ -2160,7 +2160,7 @@
 
 static CLASS_ATTR(l2cap, S_IRUGO, l2cap_sysfs_show, NULL);
 
-static struct proto_ops l2cap_sock_ops = {
+static const struct proto_ops l2cap_sock_ops = {
        .family         = PF_BLUETOOTH,
        .owner          = THIS_MODULE,
        .release        = l2cap_sock_release,
--- linux-2.6.15-rc5/net/bluetooth/hci_sock.c   2005-12-04 06:10:42.000000000 
+0100
+++ linux-2.6.15-rc5-ed/net/bluetooth/hci_sock.c        2005-12-17 
11:31:18.000000000 +0100
@@ -575,7 +575,7 @@
        return 0;
 }
 
-static struct proto_ops hci_sock_ops = {
+static const struct proto_ops hci_sock_ops = {
        .family         = PF_BLUETOOTH,
        .owner          = THIS_MODULE,
        .release        = hci_sock_release,
--- linux-2.6.15-rc5/net/bluetooth/cmtp/sock.c  2005-12-04 06:10:42.000000000 
+0100
+++ linux-2.6.15-rc5-ed/net/bluetooth/cmtp/sock.c       2005-12-17 
11:31:18.000000000 +0100
@@ -137,7 +137,7 @@
        return -EINVAL;
 }
 
-static struct proto_ops cmtp_sock_ops = {
+static const struct proto_ops cmtp_sock_ops = {
        .family         = PF_BLUETOOTH,
        .owner          = THIS_MODULE,
        .release        = cmtp_sock_release,
--- linux-2.6.15-rc5/net/bluetooth/bnep/sock.c  2005-12-04 06:10:42.000000000 
+0100
+++ linux-2.6.15-rc5-ed/net/bluetooth/bnep/sock.c       2005-12-17 
11:31:34.000000000 +0100
@@ -146,7 +146,7 @@
        return 0;
 }
 
-static struct proto_ops bnep_sock_ops = {
+static const struct proto_ops bnep_sock_ops = {
        .family     = PF_BLUETOOTH,
        .owner      = THIS_MODULE,
        .release    = bnep_sock_release,
--- linux-2.6.15-rc5/net/bluetooth/sco.c        2005-12-04 06:10:42.000000000 
+0100
+++ linux-2.6.15-rc5-ed/net/bluetooth/sco.c     2005-12-17 11:32:55.000000000 
+0100
@@ -56,7 +56,7 @@
 
 #define VERSION "0.5"
 
-static struct proto_ops sco_sock_ops;
+static const struct proto_ops sco_sock_ops;
 
 static struct bt_sock_list sco_sk_list = {
        .lock = RW_LOCK_UNLOCKED
@@ -913,7 +913,7 @@
 
 static CLASS_ATTR(sco, S_IRUGO, sco_sysfs_show, NULL);
 
-static struct proto_ops sco_sock_ops = {
+static const struct proto_ops sco_sock_ops = {
        .family         = PF_BLUETOOTH,
        .owner          = THIS_MODULE,
        .release        = sco_sock_release,
--- linux-2.6.15-rc5/net/bluetooth/hidp/sock.c  2005-12-04 06:10:42.000000000 
+0100
+++ linux-2.6.15-rc5-ed/net/bluetooth/hidp/sock.c       2005-12-17 
11:32:55.000000000 +0100
@@ -143,7 +143,7 @@
        return -EINVAL;
 }
 
-static struct proto_ops hidp_sock_ops = {
+static const struct proto_ops hidp_sock_ops = {
        .family         = PF_BLUETOOTH,
        .owner          = THIS_MODULE,
        .release        = hidp_sock_release,
--- linux-2.6.15-rc5/net/bluetooth/rfcomm/sock.c        2005-12-04 
06:10:42.000000000 +0100
+++ linux-2.6.15-rc5-ed/net/bluetooth/rfcomm/sock.c     2005-12-17 
11:32:55.000000000 +0100
@@ -58,7 +58,7 @@
 #define BT_DBG(D...)
 #endif
 
-static struct proto_ops rfcomm_sock_ops;
+static const struct proto_ops rfcomm_sock_ops;
 
 static struct bt_sock_list rfcomm_sk_list = {
        .lock = RW_LOCK_UNLOCKED
@@ -907,7 +907,7 @@
 
 static CLASS_ATTR(rfcomm, S_IRUGO, rfcomm_sock_sysfs_show, NULL);
 
-static struct proto_ops rfcomm_sock_ops = {
+static const struct proto_ops rfcomm_sock_ops = {
        .family         = PF_BLUETOOTH,
        .owner          = THIS_MODULE,
        .release        = rfcomm_sock_release,
--- linux-2.6.15-rc5/net/packet/af_packet.c     2005-12-04 06:10:42.000000000 
+0100
+++ linux-2.6.15-rc5-ed/net/packet/af_packet.c  2005-12-17 11:32:55.000000000 
+0100
@@ -251,10 +251,10 @@
 }
 
 
-static struct proto_ops packet_ops;
+static const struct proto_ops packet_ops;
 
 #ifdef CONFIG_SOCK_PACKET
-static struct proto_ops packet_ops_spkt;
+static const struct proto_ops packet_ops_spkt;
 
 static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev,  
struct packet_type *pt, struct net_device *orig_dev)
 {
@@ -1777,7 +1777,7 @@
 
 
 #ifdef CONFIG_SOCK_PACKET
-static struct proto_ops packet_ops_spkt = {
+static const struct proto_ops packet_ops_spkt = {
        .family =       PF_PACKET,
        .owner =        THIS_MODULE,
        .release =      packet_release,
@@ -1799,7 +1799,7 @@
 };
 #endif
 
-static struct proto_ops packet_ops = {
+static const struct proto_ops packet_ops = {
        .family =       PF_PACKET,
        .owner =        THIS_MODULE,
        .release =      packet_release,
--- linux-2.6.15-rc5/net/ipx/af_ipx.c   2005-12-04 06:10:42.000000000 +0100
+++ linux-2.6.15-rc5-ed/net/ipx/af_ipx.c        2005-12-17 11:33:18.000000000 
+0100
@@ -75,7 +75,7 @@
 static struct datalink_proto *p8023_datalink;
 static struct datalink_proto *pSNAP_datalink;
 
-static struct proto_ops ipx_dgram_ops;
+static const struct proto_ops ipx_dgram_ops;
 
 LIST_HEAD(ipx_interfaces);
 DEFINE_SPINLOCK(ipx_interfaces_lock);
@@ -1901,7 +1901,7 @@
        .owner          = THIS_MODULE,
 };
 
-static struct proto_ops SOCKOPS_WRAPPED(ipx_dgram_ops) = {
+static const struct proto_ops SOCKOPS_WRAPPED(ipx_dgram_ops) = {
        .family         = PF_IPX,
        .owner          = THIS_MODULE,
        .release        = ipx_release,
--- linux-2.6.15-rc5/net/atm/svc.c      2005-12-04 06:10:42.000000000 +0100
+++ linux-2.6.15-rc5-ed/net/atm/svc.c   2005-12-17 11:33:48.000000000 +0100
@@ -613,7 +613,7 @@
        return error;
 }
 
-static struct proto_ops svc_proto_ops = {
+static const struct proto_ops svc_proto_ops = {
        .family =       PF_ATMSVC,
        .owner =        THIS_MODULE,
 
--- linux-2.6.15-rc5/net/atm/pvc.c      2005-12-04 06:10:42.000000000 +0100
+++ linux-2.6.15-rc5-ed/net/atm/pvc.c   2005-12-17 11:34:23.000000000 +0100
@@ -102,7 +102,7 @@
 }
 
 
-static struct proto_ops pvc_proto_ops = {
+static const struct proto_ops pvc_proto_ops = {
        .family =       PF_ATMPVC,
        .owner =        THIS_MODULE,
 
--- linux-2.6.15-rc5/net/x25/af_x25.c   2005-12-04 06:10:42.000000000 +0100
+++ linux-2.6.15-rc5-ed/net/x25/af_x25.c        2005-12-17 11:34:29.000000000 
+0100
@@ -64,7 +64,7 @@
 HLIST_HEAD(x25_list);
 DEFINE_RWLOCK(x25_list_lock);
 
-static struct proto_ops x25_proto_ops;
+static const struct proto_ops x25_proto_ops;
 
 static struct x25_address null_x25_address = {"               "};
 
@@ -1391,7 +1391,7 @@
        .owner  =       THIS_MODULE,
 };
 
-static struct proto_ops SOCKOPS_WRAPPED(x25_proto_ops) = {
+static const struct proto_ops SOCKOPS_WRAPPED(x25_proto_ops) = {
        .family =       AF_X25,
        .owner =        THIS_MODULE,
        .release =      x25_release,
--- linux-2.6.15-rc5/net/econet/af_econet.c     2005-12-04 06:10:42.000000000 
+0100
+++ linux-2.6.15-rc5-ed/net/econet/af_econet.c  2005-12-17 11:34:59.000000000 
+0100
@@ -45,7 +45,7 @@
 #include <asm/uaccess.h>
 #include <asm/system.h>
 
-static struct proto_ops econet_ops;
+static const struct proto_ops econet_ops;
 static struct hlist_head econet_sklist;
 static DEFINE_RWLOCK(econet_lock);
 
@@ -698,7 +698,7 @@
        .owner  =       THIS_MODULE,
 };
 
-static struct proto_ops SOCKOPS_WRAPPED(econet_ops) = {
+static const struct proto_ops SOCKOPS_WRAPPED(econet_ops) = {
        .family =       PF_ECONET,
        .owner =        THIS_MODULE,
        .release =      econet_release,
--- linux-2.6.15-rc5/net/dccp/proto.c   2005-12-04 06:10:42.000000000 +0100
+++ linux-2.6.15-rc5-ed/net/dccp/proto.c        2005-12-17 11:34:59.000000000 
+0100
@@ -653,7 +653,7 @@
        dccp_pr_debug("entry\n");
 }
 
-static struct proto_ops inet_dccp_ops = {
+static const struct proto_ops inet_dccp_ops = {
        .family         = PF_INET,
        .owner          = THIS_MODULE,
        .release        = inet_release,
--- linux-2.6.15-rc5/net/sctp/ipv6.c    2005-12-04 06:10:42.000000000 +0100
+++ linux-2.6.15-rc5-ed/net/sctp/ipv6.c 2005-12-17 11:35:37.000000000 +0100
@@ -866,7 +866,7 @@
        return 2;
 }
 
-static struct proto_ops inet6_seqpacket_ops = {
+static const struct proto_ops inet6_seqpacket_ops = {
        .family     = PF_INET6,
        .owner      = THIS_MODULE,
        .release    = inet6_release,
--- linux-2.6.15-rc5/net/sctp/protocol.c        2005-12-04 06:10:42.000000000 
+0100
+++ linux-2.6.15-rc5-ed/net/sctp/protocol.c     2005-12-17 11:35:37.000000000 
+0100
@@ -829,7 +829,7 @@
 };
 
 /* Socket operations.  */
-static struct proto_ops inet_seqpacket_ops = {
+static const struct proto_ops inet_seqpacket_ops = {
        .family      = PF_INET,
        .owner       = THIS_MODULE,
        .release     = inet_release,       /* Needs to be wrapped... */
--- linux-2.6.15-rc5/net/appletalk/ddp.c        2005-12-04 06:10:42.000000000 
+0100
+++ linux-2.6.15-rc5-ed/net/appletalk/ddp.c     2005-12-17 11:35:37.000000000 
+0100
@@ -63,7 +63,7 @@
 #include <linux/atalk.h>
 
 struct datalink_proto *ddp_dl, *aarp_dl;
-static struct proto_ops atalk_dgram_ops;
+static const struct proto_ops atalk_dgram_ops;
 
 /**************************************************************************\
 *                                                                          *
@@ -1841,7 +1841,7 @@
        .owner          = THIS_MODULE,
 };
 
-static struct proto_ops SOCKOPS_WRAPPED(atalk_dgram_ops) = {
+static const struct proto_ops SOCKOPS_WRAPPED(atalk_dgram_ops) = {
        .family         = PF_APPLETALK,
        .owner          = THIS_MODULE,
        .release        = atalk_release,
--- linux-2.6.15-rc5/net/netrom/af_netrom.c     2005-12-04 06:10:42.000000000 
+0100
+++ linux-2.6.15-rc5-ed/net/netrom/af_netrom.c  2005-12-17 11:35:56.000000000 
+0100
@@ -63,7 +63,7 @@
 static HLIST_HEAD(nr_list);
 static DEFINE_SPINLOCK(nr_list_lock);
 
-static struct proto_ops nr_proto_ops;
+static const struct proto_ops nr_proto_ops;
 
 /*
  *     Socket removal during an interrupt is now safe.
@@ -1337,7 +1337,7 @@
        .owner          =       THIS_MODULE,
 };
 
-static struct proto_ops nr_proto_ops = {
+static const struct proto_ops nr_proto_ops = {
        .family         =       PF_NETROM,
        .owner          =       THIS_MODULE,
        .release        =       nr_release,
--- linux-2.6.15-rc5/net/unix/af_unix.c 2005-12-04 06:10:42.000000000 +0100
+++ linux-2.6.15-rc5-ed/net/unix/af_unix.c      2005-12-17 11:36:24.000000000 
+0100
@@ -473,7 +473,7 @@
 static int unix_seqpacket_sendmsg(struct kiocb *, struct socket *,
                                  struct msghdr *, size_t);
 
-static struct proto_ops unix_stream_ops = {
+static const struct proto_ops unix_stream_ops = {
        .family =       PF_UNIX,
        .owner =        THIS_MODULE,
        .release =      unix_release,
@@ -494,7 +494,7 @@
        .sendpage =     sock_no_sendpage,
 };
 
-static struct proto_ops unix_dgram_ops = {
+static const struct proto_ops unix_dgram_ops = {
        .family =       PF_UNIX,
        .owner =        THIS_MODULE,
        .release =      unix_release,
@@ -515,7 +515,7 @@
        .sendpage =     sock_no_sendpage,
 };
 
-static struct proto_ops unix_seqpacket_ops = {
+static const struct proto_ops unix_seqpacket_ops = {
        .family =       PF_UNIX,
        .owner =        THIS_MODULE,
        .release =      unix_release,

Reply via email to