lkml.org 
[lkml]   [2010]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[001/140] bridge: fdb cleanup runs too often
    2.6.33-stable review patch.  If anyone has any objections, please let us know.

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

    From: stephen hemminger <shemminger@vyatta.com>

    [ Upstream commit 25442e06d20aaba7d7b16438078a562b3e4cf19b ]

    It is common in end-node, non STP bridges to set forwarding
    delay to zero; which causes the forwarding database cleanup
    to run every clock tick. Change to run only as soon as needed
    or at next ageing timer interval which ever is sooner.

    Use round_jiffies_up macro rather than attempting round up
    by changing value.

    Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
    ---
    net/bridge/br_fdb.c | 6 ++----
    1 file changed, 2 insertions(+), 4 deletions(-)

    --- a/net/bridge/br_fdb.c
    +++ b/net/bridge/br_fdb.c
    @@ -127,7 +127,7 @@ void br_fdb_cleanup(unsigned long _data)
    {
    struct net_bridge *br = (struct net_bridge *)_data;
    unsigned long delay = hold_time(br);
    - unsigned long next_timer = jiffies + br->forward_delay;
    + unsigned long next_timer = jiffies + br->ageing_time;
    int i;

    spin_lock_bh(&br->hash_lock);
    @@ -148,9 +148,7 @@ void br_fdb_cleanup(unsigned long _data)
    }
    spin_unlock_bh(&br->hash_lock);

    - /* Add HZ/4 to ensure we round the jiffies upwards to be after the next
    - * timer, otherwise we might round down and will have no-op run. */
    - mod_timer(&br->gc_timer, round_jiffies(next_timer + HZ/4));
    + mod_timer(&br->gc_timer, round_jiffies_up(next_timer));
    }

    /* Completely flush all dynamic entries in forwarding database.*/



    \
     
     \ /
      Last update: 2010-07-30 20:59    [W:4.247 / U:0.312 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site