lkml.org 
[lkml]   [2010]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[132/156] ip_gre: include route header_len in max_headroom calculation
    2.6.33-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Timo Teräs <timo.teras@iki.fi>

    [ Upstream commit 243aad830e8a4cdda261626fbaeddde16b08d04a ]

    Taking route's header_len into account, and updating gre device
    needed_headroom will give better hints on upper bound of required
    headroom. This is useful if the gre traffic is xfrm'ed.

    Signed-off-by: Timo Teras <timo.teras@iki.fi>
    Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    net/ipv4/ip_gre.c | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)

    --- a/net/ipv4/ip_gre.c
    +++ b/net/ipv4/ip_gre.c
    @@ -810,11 +810,13 @@ static netdev_tx_t ipgre_tunnel_xmit(str
    tunnel->err_count = 0;
    }

    - max_headroom = LL_RESERVED_SPACE(tdev) + gre_hlen;
    + max_headroom = LL_RESERVED_SPACE(tdev) + gre_hlen + rt->u.dst.header_len;

    if (skb_headroom(skb) < max_headroom || skb_shared(skb)||
    (skb_cloned(skb) && !skb_clone_writable(skb, 0))) {
    struct sk_buff *new_skb = skb_realloc_headroom(skb, max_headroom);
    + if (max_headroom > dev->needed_headroom)
    + dev->needed_headroom = max_headroom;
    if (!new_skb) {
    ip_rt_put(rt);
    txq->tx_dropped++;

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2010-03-31 01:31    [W:5.743 / U:0.200 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site