|
@@ -1273,11 +1273,22 @@ sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb)
|
|
|
* This routine must be called with interrupts disabled or with the socket
|
|
|
* locked so that the sk_buff queue operation is ok.
|
|
|
*/
|
|
|
-static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb)
|
|
|
+#ifdef CONFIG_NET_DMA
|
|
|
+static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_early)
|
|
|
+{
|
|
|
+ __skb_unlink(skb, &sk->sk_receive_queue);
|
|
|
+ if (!copied_early)
|
|
|
+ __kfree_skb(skb);
|
|
|
+ else
|
|
|
+ __skb_queue_tail(&sk->sk_async_wait_queue, skb);
|
|
|
+}
|
|
|
+#else
|
|
|
+static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_early)
|
|
|
{
|
|
|
__skb_unlink(skb, &sk->sk_receive_queue);
|
|
|
__kfree_skb(skb);
|
|
|
}
|
|
|
+#endif
|
|
|
|
|
|
extern void sock_enable_timestamp(struct sock *sk);
|
|
|
extern int sock_get_timestamp(struct sock *, struct timeval __user *);
|