]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
net: wrap sk->sk_backlog_rcv()
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Tue, 7 Oct 2008 21:18:42 +0000 (14:18 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Oct 2008 21:18:42 +0000 (14:18 -0700)
Wrap calling sk->sk_backlog_rcv() in a function. This will allow extending the
generic sk_backlog_rcv behaviour.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h
include/net/tcp.h
net/core/sock.c
net/ipv4/tcp.c
net/ipv4/tcp_timer.c

index 18f96708f3a6db257e742e6809e38f7c73570a60..ada50c04d09ffbb64135690573740567a59436a5 100644 (file)
@@ -482,6 +482,11 @@ static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb)
        skb->next = NULL;
 }
 
+static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb)
+{
+       return sk->sk_backlog_rcv(sk, skb);
+}
+
 #define sk_wait_event(__sk, __timeo, __condition)                      \
        ({      int __rc;                                               \
                release_sock(__sk);                                     \
index f6cc34143154759795f52e51575ec2d00b883114..438014d57610d3c22355746e7f73e73ec73a3785 100644 (file)
@@ -896,7 +896,7 @@ static inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb)
                        BUG_ON(sock_owned_by_user(sk));
 
                        while ((skb1 = __skb_dequeue(&tp->ucopy.prequeue)) != NULL) {
-                               sk->sk_backlog_rcv(sk, skb1);
+                               sk_backlog_rcv(sk, skb1);
                                NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPPREQUEUEDROPPED);
                        }
 
index 2d358dd8a03e6acc47bc0797d9486d04ed945976..5e2a3132a8c934d5aae50f8b359ebf28c6b65d8c 100644 (file)
@@ -327,7 +327,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
                 */
                mutex_acquire(&sk->sk_lock.dep_map, 0, 1, _RET_IP_);
 
-               rc = sk->sk_backlog_rcv(sk, skb);
+               rc = sk_backlog_rcv(sk, skb);
 
                mutex_release(&sk->sk_lock.dep_map, 1, _RET_IP_);
        } else
@@ -1374,7 +1374,7 @@ static void __release_sock(struct sock *sk)
                        struct sk_buff *next = skb->next;
 
                        skb->next = NULL;
-                       sk->sk_backlog_rcv(sk, skb);
+                       sk_backlog_rcv(sk, skb);
 
                        /*
                         * We are in process context here with softirqs
index 7d81a1ee5507c08a2fb2b297fb387a7cf6bc55bb..7d3fe571d15fc704b35955014cabfeda6b107c43 100644 (file)
@@ -1161,7 +1161,7 @@ static void tcp_prequeue_process(struct sock *sk)
         * necessary */
        local_bh_disable();
        while ((skb = __skb_dequeue(&tp->ucopy.prequeue)) != NULL)
-               sk->sk_backlog_rcv(sk, skb);
+               sk_backlog_rcv(sk, skb);
        local_bh_enable();
 
        /* Clear memory counter. */
index 5ab6ba19c3ce8547076f9fefbdf83c60f3c01c44..6b6dff1164b93209da97bf673fd76707c216ea1b 100644 (file)
@@ -201,7 +201,7 @@ static void tcp_delack_timer(unsigned long data)
                NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPSCHEDULERFAILED);
 
                while ((skb = __skb_dequeue(&tp->ucopy.prequeue)) != NULL)
-                       sk->sk_backlog_rcv(sk, skb);
+                       sk_backlog_rcv(sk, skb);
 
                tp->ucopy.memory = 0;
        }