17 Dec, 2011

1 commit


09 Dec, 2011

3 commits

  • If user has configured a MAC address that is not one of the existing
    ports of the bridge, then we need to add a special entry in the forwarding
    table. This forwarding table entry has no outgoing port so it has to be
    treated a little differently. The special entry is reported by the netlink
    interface with ifindex of bridge, but ignored by the old interface since there
    is no usable way to put it in the ABI.

    Reported-by: Koki Sanagi
    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     
  • Pass bridge to fdb_notify so it can determine correct namespace based
    on namespace of bridge rather than namespace of destination port.
    Also makes next patch easier.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     
  • Move fdb_notify outside of fdb_create. This fixes the problem
    that notification of local entries are not flagged correctly.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     

14 Nov, 2011

1 commit

  • More changes to the recent code to support control of forwarding
    database via netlink.
    * Support NTF_USE like neighbour table
    * Validate state bits from application
    * Only send notifications (and change bits) if new entry is
    different.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     

04 Oct, 2011

1 commit


27 Jul, 2011

1 commit

  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     

12 Apr, 2011

1 commit


05 Apr, 2011

5 commits


31 Mar, 2011

1 commit


05 Feb, 2011

1 commit


16 Nov, 2010

1 commit

  • The macro br_port_exists() is not enough protection when only
    RCU is being used. There is a tiny race where other CPU has cleared port
    handler hook, but is bridge port flag might still be set.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     

03 Aug, 2010

1 commit


29 Jul, 2010

1 commit

  • Long ago, when bridge was converted to RCU, rcu lock was equivalent
    to having preempt disabled. RCU has changed a lot since then and
    bridge code was still assuming the since transmit was called with
    bottom half disabled, it was RCU safe.

    Signed-off-by: Stephen Hemminger
    Tested-by: Johannes Berg
    Signed-off-by: David S. Miller

    stephen hemminger
     

24 Jun, 2010

1 commit


18 Jun, 2010

1 commit

  • 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
    Signed-off-by: David S. Miller

    stephen hemminger
     

16 Jun, 2010

1 commit


16 May, 2010

1 commit


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

30 Nov, 2009

1 commit


12 Jun, 2009

1 commit

  • This patch changes FDB entry check for ATM LANE bridge integration.
    There's no point in holding a FDB entry around SKB building.

    br_fdb_get()/br_fdb_put() pair are changed into single br_fdb_test_addr()
    hook that checks if the addr has FDB entry pointing to other port
    to the one the request arrived on.

    FDB entry refcounting is removed as it's not used anywhere else.

    Signed-off-by: Michał Mirosław
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Michał Mirosław
     

28 May, 2009

1 commit


18 Jul, 2008

1 commit


12 Jun, 2008

1 commit


19 May, 2008

1 commit

  • Move rcu-protected lists from list.h into a new header file rculist.h.

    This is done because list are a very used primitive structure all over the
    kernel and it's currently impossible to include other header files in this
    list.h without creating some circular dependencies.

    For example, list.h implements rcu-protected list and uses rcu_dereference()
    without including rcupdate.h. It actually compiles because users of
    rcu_dereference() are macros. Others RCU functions could be used too but
    aren't probably because of this.

    Therefore this patch creates rculist.h which includes rcupdates without to
    many changes/troubles.

    Signed-off-by: Franck Bui-Huu
    Acked-by: Paul E. McKenney
    Acked-by: Josh Triplett
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar

    Franck Bui-Huu
     

03 May, 2008

1 commit

  • The forwarding table binary interface (my bad choice), only exposes
    the port number of the first 8 bits. The bridge code was limited to
    256 ports at the time, but now the kernel supports up 1024 ports, so
    the upper bits are lost when doing:

    brctl showmacs

    The fix is to squeeze the extra bits into small hole left in data
    structure, to maintain binary compatiablity.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

21 Mar, 2008

1 commit


07 Dec, 2007

1 commit

  • WARNING: vmlinux.o(.init.text+0x204e2): Section mismatch: reference to .exit.text:br_fdb_fini (between 'br_init' and 'br_fdb_init')

    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Andrew Morton
     

31 Aug, 2007

1 commit

  • This patch fixes some packet leakage in bridge. The bridging code was
    allowing forward table entries to be generated even if a device was
    being blocked. The fix is to not add forwarding database entries
    unless the port is active.

    The bug arose as part of the conversion to processing STP frames
    through normal receive path (in 2.6.17).

    Signed-off-by: Stephen Hemminger
    Acked-by: John W. Linville
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

20 Jul, 2007

1 commit

  • Slab destructors were no longer supported after Christoph's
    c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been
    BUGs for both slab and slub, and slob never supported them
    either.

    This rips out support for the dtor pointer from kmem_cache_create()
    completely and fixes up every single callsite in the kernel (there were
    about 224, not including the slab allocator definitions themselves,
    or the documentation references).

    Signed-off-by: Paul Mundt

    Paul Mundt
     

31 May, 2007

1 commit

  • The bridge cleanup timer is fired 10 times a second for timers that
    are at least 15 seconds ahead in time and that are not critical to be
    cleaned asap.

    This patch calculates the next time to run the timer as the minimum of
    all timers or a minimum based on the current state.

    Signed-off-by: Baruch Even
    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Baruch Even
     

26 Apr, 2007

3 commits


23 Mar, 2007

1 commit

  • br_fdb_get use atomic_inc to increase the refcount of an element found
    on a RCU protected list, which can lead to the following race:

    CPU0 CPU1

    br_fdb_get: rcu_read_lock
    __br_fdb_get: find element
    fdb_delete: hlist_del_rcu
    br_fdb_put
    br_fdb_put: atomic_dec_and_test
    call_rcu(fdb_rcu_free) br_fdb_get: atomic_inc
    rcu_read_unlock
    fdb_rcu_free: kmem_cache_free

    Use atomic_inc_not_zero instead.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     

11 Feb, 2007

1 commit