summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2014-09-29 13:29:15 -0700
committerDavid S. Miller <davem@davemloft.net>2014-10-01 16:34:25 -0400
commitd0bf4a9e92b9a93ffeeacbd7b6cb83e0ee3dc2ef (patch)
tree1ba29128caa07307632b6219c1692308ec89983a /net/ipv4
parentb248230c34970a6c1c17c591d63b464e8d2cfc33 (diff)
downloadlinux-d0bf4a9e92b9a93ffeeacbd7b6cb83e0ee3dc2ef.tar.gz
linux-d0bf4a9e92b9a93ffeeacbd7b6cb83e0ee3dc2ef.tar.bz2
linux-d0bf4a9e92b9a93ffeeacbd7b6cb83e0ee3dc2ef.zip
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.c5
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)
static bool skb_still_in_host_queue(const struct sock *sk,
const struct sk_buff *skb)
{
- const struct sk_buff *fclone = skb + 1;
-
- if (unlikely(skb->fclone == SKB_FCLONE_ORIG &&
- fclone->fclone == SKB_FCLONE_CLONE)) {
+ if (unlikely(skb_fclone_busy(skb))) {
NET_INC_STATS_BH(sock_net(sk),
LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES);
return true;