lkml.org 
[lkml]   [2011]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 6/6] ip_gre: Set needed_headroom dynamically again
    From
    Date
    ip_gre: Set needed_headroom dynamically again

    Now that all needed_headroom users have been fixed up so that
    we can safely increase needed_headroom, this patch restore the
    dynamic update of needed_headroom.

    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    ---

    net/ipv4/ip_gre.c | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
    index d55110e..d7bb94c 100644
    --- a/net/ipv4/ip_gre.c
    +++ b/net/ipv4/ip_gre.c
    @@ -835,6 +835,8 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
    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);
    dev->stats.tx_dropped++;

    \
     
     \ /
      Last update: 2011-11-18 13:23    [W:0.019 / U:0.900 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site