[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20111009.181023.328192272226333109.davem@davemloft.net>
Date: Sun, 09 Oct 2011 18:10:23 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: netdev@...r.kernel.org
Subject: Re: [RFC] truesize lies
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Sun, 09 Oct 2011 23:55:20 +0200
> Some drivers splits a page in two (or more) pieces, so we cant know what
> was really reserved by a driver for paged skbs.
>
> Only thing we could enforce at the moment is the proper accounting for
> skb head :
>
> WARN_ON(skb->truesize < (skb_end_pointer(skb) - skb->head) + sizeof(sk_buff) + skb->data_len);
This is partly true.
Drivers that use page pools divide pages up into different pools, each
with some specific block size. At least this is how NIU works.
So NIU knows exactly how much of the block is logically part of that
SKB yet unused.
And if we really wanted to we could add a frag[].reserved field that
keeps track of this for debugging.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists