diff options
author | Eric Dumazet <edumazet@google.com> | 2014-09-29 16:29:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-01 16:34:25 -0400 |
commit | d0bf4a9e92b9a93ffeeacbd7b6cb83e0ee3dc2ef (patch) | |
tree | 1ba29128caa07307632b6219c1692308ec89983a /net/ipv4 | |
parent | b248230c34970a6c1c17c591d63b464e8d2cfc33 (diff) |
net: cleanup and document skb fclone layout
Lets use a proper structure to clearly document and implement
skb fast clones.
Then, we might experiment more easily alternative layouts.
This patch adds a new skb_fclone_busy() helper, used by tcp and xfrm,
to stop leaking of implementation details.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp_output.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index ee567e9e98c3..8d4eac793700 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -2110,10 +2110,7 @@ bool tcp_schedule_loss_probe(struct sock *sk) | |||
2110 | static bool skb_still_in_host_queue(const struct sock *sk, | 2110 | static bool skb_still_in_host_queue(const struct sock *sk, |
2111 | const struct sk_buff *skb) | 2111 | const struct sk_buff *skb) |
2112 | { | 2112 | { |
2113 | const struct sk_buff *fclone = skb + 1; | 2113 | if (unlikely(skb_fclone_busy(skb))) { |
2114 | |||
2115 | if (unlikely(skb->fclone == SKB_FCLONE_ORIG && | ||
2116 | fclone->fclone == SKB_FCLONE_CLONE)) { | ||
2117 | NET_INC_STATS_BH(sock_net(sk), | 2114 | NET_INC_STATS_BH(sock_net(sk), |
2118 | LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES); | 2115 | LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES); |
2119 | return true; | 2116 | return true; |