]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sctp/input.c
[SCTP]: Include ulpevents in socket receive buffer accounting.
[linux-2.6-omap-h63xx.git] / net / sctp / input.c
index 28f32243397f3b1b9755f42fcc70fa824d92dea0..b24ff2c1aef510ce9d4be716b19caa504baf08a9 100644 (file)
@@ -100,21 +100,6 @@ static inline int sctp_rcv_checksum(struct sk_buff *skb)
        return 0;
 }
 
-/* The free routine for skbuffs that sctp receives */
-static void sctp_rfree(struct sk_buff *skb)
-{
-       atomic_sub(sizeof(struct sctp_chunk),&skb->sk->sk_rmem_alloc);
-       sock_rfree(skb);
-}
-
-/* The ownership wrapper routine to do receive buffer accounting */
-static void sctp_rcv_set_owner_r(struct sk_buff *skb, struct sock *sk)
-{
-       skb_set_owner_r(skb,sk);
-       skb->destructor = sctp_rfree;
-       atomic_add(sizeof(struct sctp_chunk),&sk->sk_rmem_alloc);
-}
-
 struct sctp_input_cb {
        union {
                struct inet_skb_parm    h4;
@@ -217,9 +202,6 @@ int sctp_rcv(struct sk_buff *skb)
                rcvr = &ep->base;
        }
 
-       if (atomic_read(&sk->sk_rmem_alloc) >= sk->sk_rcvbuf)
-               goto discard_release;
-
        /*
         * RFC 2960, 8.4 - Handle "Out of the blue" Packets.
         * An SCTP packet is called an "out of the blue" (OOTB)
@@ -256,8 +238,6 @@ int sctp_rcv(struct sk_buff *skb)
        }
        SCTP_INPUT_CB(skb)->chunk = chunk;
 
-       sctp_rcv_set_owner_r(skb,sk);
-
        /* Remember what endpoint is to handle this packet. */
        chunk->rcvr = rcvr;