vserver 1.9.3
[linux-2.6.git] / include / net / sock.h
index fb4df58..62cb862 100644 (file)
@@ -146,7 +146,6 @@ struct sock_common {
   *    @sk_route_caps - route capabilities (e.g. %NETIF_F_TSO)
   *    @sk_lingertime - %SO_LINGER l_linger setting
   *    @sk_hashent - hash entry in several tables (e.g. tcp_ehash)
-  *    @sk_pair - socket pair (e.g. AF_UNIX/unix_peer)
   *    @sk_backlog - always used with the per-socket spinlock held
   *    @sk_callback_lock - used with the callbacks in the end of this struct
   *    @sk_error_queue - rarely used
@@ -227,7 +226,6 @@ struct sock {
        int                     sk_route_caps;
        unsigned long           sk_lingertime;
        int                     sk_hashent;
-       struct sock             *sk_pair;
        /*
         * The backlog queue is special, it is always used with
         * the per-socket spinlock held and requires low latency
@@ -563,6 +561,9 @@ struct proto {
        int                     *sysctl_rmem;
        int                     max_header;
 
+       kmem_cache_t            *slab;
+       int                     slab_obj_size;
+
        char                    name[32];
 
        struct {
@@ -571,6 +572,14 @@ struct proto {
        } stats[NR_CPUS];
 };
 
+extern int sk_alloc_slab(struct proto *prot, char *name);
+extern void sk_free_slab(struct proto *prot);
+
+static inline void sk_alloc_slab_error(struct proto *proto)
+{
+       printk(KERN_CRIT "%s: Can't create sock SLAB cache!\n", proto->name);
+}
+
 static __inline__ void sk_set_owner(struct sock *sk, struct module *owner)
 {
        /*