]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/net/sctp/sctp.h
[SCTP]: Rewrite of sctp buffer management code
[karo-tx-linux.git] / include / net / sctp / sctp.h
index dda72bf5b9b4cab8775b478b0b24c7454c8c3487..d5a1ddc7483fb6e7706e5eea88698bd04d2926e4 100644 (file)
  * sctp/protocol.c
  */
 extern struct sock *sctp_get_ctl_sock(void);
+extern void sctp_local_addr_free(struct rcu_head *head);
 extern int sctp_copy_local_addr_list(struct sctp_bind_addr *,
                                     sctp_scope_t, gfp_t gfp,
                                     int flags);
@@ -189,6 +190,16 @@ int sctp_assocs_proc_init(void);
 void sctp_assocs_proc_exit(void);
 
 
+/*
+ * Module global variables
+ */
+
+ /*
+  * sctp/protocol.c
+  */
+extern struct kmem_cache *sctp_chunk_cachep __read_mostly;
+extern struct kmem_cache *sctp_bucket_cachep __read_mostly;
+
 /*
  *  Section:  Macros, externs, and inlines
  */
@@ -458,6 +469,11 @@ static inline void sctp_skb_set_owner_r(struct sk_buff *skb, struct sock *sk)
        skb->sk = sk;
        skb->destructor = sctp_sock_rfree;
        atomic_add(event->rmem_len, &sk->sk_rmem_alloc);
+       /*
+        * This mimics the behavior of
+        * sk_stream_set_owner_r
+        */
+       sk->sk_forward_alloc -= event->rmem_len;
 }
 
 /* Tests if the list has one and only one entry. */
@@ -503,6 +519,13 @@ static inline int sctp_frag_point(const struct sctp_sock *sp, int pmtu)
        return frag;
 }
 
+static inline void sctp_assoc_pending_pmtu(struct sctp_association *asoc)
+{
+
+       sctp_assoc_sync_pmtu(asoc);
+       asoc->pmtu_pending = 0;
+}
+
 /* Walk through a list of TLV parameters.  Don't trust the
  * individual parameter lengths and instead depend on
  * the chunk length to indicate when to stop.  Make sure