diff options
author | Chris Leech <christopher.leech@intel.com> | 2006-05-23 18:01:28 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-17 21:25:52 -0700 |
commit | 624d1164730d58a494cc5aa4afa37d02c41e83a7 (patch) | |
tree | b6cc0776a826f8f2611eff41149410c7f4ccb355 /include/net/sock.h | |
parent | 0e4b4992b8007c6b62ec143cbbb292f98813ca11 (diff) | |
download | linux-624d1164730d58a494cc5aa4afa37d02c41e83a7.tar.gz linux-624d1164730d58a494cc5aa4afa37d02c41e83a7.tar.bz2 linux-624d1164730d58a494cc5aa4afa37d02c41e83a7.zip |
[I/OAT]: Make sk_eat_skb I/OAT aware.
Add an extra argument to sk_eat_skb, and make it move early copied
packets to the async_wait_queue instead of freeing them.
Signed-off-by: Chris Leech <christopher.leech@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 90c65cb091a8..75b0e97ed93d 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -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 *); |