backports: complete backport of frag size accessors

These are just helpers so carry them over, this was added via commit
9e903e0852 through v3.2. The skb frag size was in place for a long time but
was changed from __u16 to __u32 via commit a309bb072b through v2.6.23 and
since we backport for >= 2.6.25 just leave this as is. This was already
only partly backported, this adds the missing helpers.

mcgrof@ergon ~/linux-next (git::master)$ git describe --contains 9e903e0852

mcgrof@ergon ~/linux-next (git::master)$ git describe --contains a309bb072b

commit 9e903e085262ffbf1fc44a17ac06058aca03524a
Author: Eric Dumazet <>
Date:   Tue Oct 18 21:00:24 2011 +0000

    net: add skb frag size accessors

    To ease skb->truesize sanitization, its better to be able to localize
    all references to skb frags size.

    Define accessors : skb_frag_size() to fetch frag size, and
    skb_frag_size_{set|add|sub}() to manipulate it.

    Signed-off-by: Eric Dumazet <>
    Signed-off-by: David S. Miller <>

Cc: Eric Dumazet <>
Signed-off-by: Luis R. Rodriguez <>
1 file changed