diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-04-28 15:14:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-30 19:29:42 -0400 |
commit | 767dd03369ac18af58efdef0383d6eb986eab426 (patch) | |
tree | 5af8a861110676a084078a168c27fd3935d41f13 /net/socket.c | |
parent | 21851264120b0bd1f953328cb131abcfa9305bc3 (diff) |
net: speedup sock_recv_ts_and_drops()
sock_recv_ts_and_drops() is fat and slow (~ 4% of cpu time on some
profiles)
We can test all socket flags at once to make fast path fast again.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/socket.c b/net/socket.c index 9822081eab38..cb7c1f6c0d6e 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -655,13 +655,13 @@ inline void sock_recv_drops(struct msghdr *msg, struct sock *sk, struct sk_buff | |||
655 | sizeof(__u32), &skb->dropcount); | 655 | sizeof(__u32), &skb->dropcount); |
656 | } | 656 | } |
657 | 657 | ||
658 | void sock_recv_ts_and_drops(struct msghdr *msg, struct sock *sk, | 658 | void __sock_recv_ts_and_drops(struct msghdr *msg, struct sock *sk, |
659 | struct sk_buff *skb) | 659 | struct sk_buff *skb) |
660 | { | 660 | { |
661 | sock_recv_timestamp(msg, sk, skb); | 661 | sock_recv_timestamp(msg, sk, skb); |
662 | sock_recv_drops(msg, sk, skb); | 662 | sock_recv_drops(msg, sk, skb); |
663 | } | 663 | } |
664 | EXPORT_SYMBOL_GPL(sock_recv_ts_and_drops); | 664 | EXPORT_SYMBOL_GPL(__sock_recv_ts_and_drops); |
665 | 665 | ||
666 | static inline int __sock_recvmsg_nosec(struct kiocb *iocb, struct socket *sock, | 666 | static inline int __sock_recvmsg_nosec(struct kiocb *iocb, struct socket *sock, |
667 | struct msghdr *msg, size_t size, int flags) | 667 | struct msghdr *msg, size_t size, int flags) |