07 Oct, 2011

1 commit

  • This is based on an earlier patch by Nick Carter with comments
    by David Lamparter but with some refinements. Thanks for their patience
    this is a confusing area with overlap of standards, user requirements,
    and compatibility with earlier releases.

    It adds a new sysfs attribute
    /sys/class/net/brX/bridge/group_fwd_mask
    that controls forwarding of frames with address of: 01-80-C2-00-00-0X
    The default setting has no forwarding to retain compatibility.

    One change from earlier releases is that forwarding of group
    addresses is not dependent on STP being enabled or disabled. This
    choice was made based on interpretation of tie 802.1 standards.
    I expect complaints will arise because of this, but better to follow
    the standard than continue acting incorrectly by default.

    The filtering mask is writeable, but only values that don't forward
    known control frames are allowed. It intentionally blocks attempts
    to filter control protocols. For example: writing a 8 allows
    forwarding 802.1X PAE addresses which is the most common request.

    Reported-by: David Lamparter
    Original-patch-by: Nick Carter
    Signed-off-by: Stephen Hemminger
    Tested-by: Benjamin Poirier
    Signed-off-by: David S. Miller

    stephen hemminger
     

05 Apr, 2011

1 commit

  • Apply restrictions on STP parameters based 802.1D 1998 standard.
    * Fixes missing locking in set path cost ioctl
    * Uses common code for both ioctl and sysfs

    This is based on an earlier patch Sasikanth V but with overhaul.

    Note:
    1. It does NOT enforce the restriction on the relationship max_age and
    forward delay or hello time because in existing implementation these are
    set as independant operations.

    2. If STP is disabled, there is no restriction on forward delay

    3. No restriction on holding time because users use Linux code to act
    as hub or be sticky.

    4. Although standard allow 0-255, Linux only allows 0-63 for port priority
    because more bits are reserved for port number.

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

    stephen hemminger
     

02 Jul, 2010

1 commit

  • Support more fine grained control of bridge netfilter iptables invocation
    by adding seperate brnf_call_*tables parameters for each device using the
    sysfs interface. Packets are passed to layer 3 netfilter when either the
    global parameter or the per bridge parameter is enabled.

    Acked-by: Stephen Hemminger
    Acked-by: David S. Miller
    Signed-off-by: Patrick McHardy

    Patrick McHardy
     

22 May, 2010

1 commit


28 Feb, 2010

4 commits

  • This patch allows the user to the IGMP parameters related to the
    snooping function of the bridge. This includes various time
    values and retransmission limits.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • This patch allows the user to control the hash elasticity/max
    parameters. The elasticity setting does not take effect until
    the next new multicast group is added. At which point it is
    checked and if after rehashing it still can't be satisfied then
    snooping will be disabled.

    The max setting on the other hand takes effect immediately. It
    must be a power of two and cannot be set to a value less than the
    current number of multicast group entries. This is the only way
    to shrink the multicast hash.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • This patch allows the user to disable IGMP snooping completely
    through a sysfs toggle. It also allows the user to reenable
    snooping when it has been automatically disabled due to hash
    collisions. If the collisions have not been resolved however
    the system will refuse to reenable snooping.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • This patch allows the user to forcibly enable/disable ports as
    having multicast routers attached. A port with a multicast router
    will receive all multicast traffic.

    The value 0 disables it completely. The default is 1 which lets
    the system automatically detect the presence of routers (currently
    this is limited to picking up queries), and 2 means that the port
    will always receive all multicast traffic.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

30 Nov, 2009

1 commit


19 May, 2009

1 commit


13 Nov, 2008

1 commit

  • We have some reasons to kill netdev->priv:
    1. netdev->priv is equal to netdev_priv().
    2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously
    netdev_priv() is more flexible than netdev->priv.
    But we cann't kill netdev->priv, because so many drivers reference to it
    directly.

    This patch is a safe convert for netdev->priv to netdev_priv(netdev).
    Since all of the netdev->priv is only for read.
    But it is too big to be sent in one mail.
    I split it to 4 parts and make every part smaller than 100,000 bytes,
    which is max size allowed by vger.

    Signed-off-by: Wang Chen
    Signed-off-by: David S. Miller

    Wang Chen
     

09 Sep, 2008

1 commit

  • Dushan Tcholich reports that on his system ksoftirqd can consume
    between %6 to %10 of cpu time, and cause ~200 context switches per
    second.

    He then correlated this with a report by bdupree@techfinesse.com:

    http://marc.info/?l=linux-kernel&m=119613299024398&w=2

    and the culprit cause seems to be starting the bridge interface.
    In particular, when starting the bridge interface, his scripts
    are specifying a hello timer interval of "0".

    The bridge hello time can't be safely set to values less than 1
    second, otherwise it is possible to end up with a runaway timer.

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

    Stephen Hemminger
     

06 Mar, 2008

1 commit


25 Jan, 2008

2 commits


13 Oct, 2007

1 commit


20 Aug, 2007

1 commit


15 Aug, 2007

1 commit

  • The stp change code generates "sleeping function called from invalid
    context" because rtnl_lock() called with BH disabled. This fixes it by
    not acquiring then dropping the bridge lock.

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

    Stephen Hemminger
     

12 Jul, 2007

2 commits

  • Well, first of all, I don't want to change so many files either.

    What I do:
    Adding a new parameter "struct bin_attribute *" in the
    .read/.write methods for the sysfs binary attributes.

    In fact, only the four lines change in fs/sysfs/bin.c and
    include/linux/sysfs.h do the real work.
    But I have to update all the files that use binary attributes
    to make them compatible with the new .read and .write methods.
    I'm not sure if I missed any. :(

    Why I do this:
    For a sysfs attribute, we can get a pointer pointing to the
    struct attribute in the .show/.store method,
    while we can't do this for the binary attributes.
    I don't know why this is different, but this does make it not
    so handy to use the binary attributes as the regular ones.
    So I think this patch is reasonable. :)

    Who benefits from it:
    The patch that exposes ACPI tables in sysfs
    requires such an improvement.
    All the table binary attributes share the same .read method.
    Parameter "struct bin_attribute *" is used to get
    the table signature and instance number which are used to
    distinguish different ACPI table binary attributes.

    Without this parameter, we need to offer different .read methods
    for different ACPI table binary attributes.
    This is impossible as there are various ACPI tables on different
    platforms, and we don't know what they are until they are loaded.

    Signed-off-by: Zhang Rui
    Signed-off-by: Greg Kroah-Hartman

    Zhang Rui
     
  • sysfs is now completely out of driver/module lifetime game. After
    deletion, a sysfs node doesn't access anything outside sysfs proper,
    so there's no reason to hold onto the attribute owners. Note that
    often the wrong modules were accounted for as owners leading to
    accessing removed modules.

    This patch kills now unnecessary attribute->owner. Note that with
    this change, userland holding a sysfs node does not prevent the
    backing module from being unloaded.

    For more info regarding lifetime rule cleanup, please read the
    following message.

    http://article.gmane.org/gmane.linux.kernel/510293

    (tweaked by Greg to not delete the field just yet, to make it easier to
    merge things properly.)

    Signed-off-by: Tejun Heo
    Cc: Cornelia Huck
    Cc: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Tejun Heo
     

26 Apr, 2007

3 commits

  • Writing to /sys/class/net/brX/bridge/stp_state causes a warning because
    RTNL is not held when call br_stp_if.c

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

    Stephen Hemminger
     
  • This patchset based on work by Aji_Srinivas@emc.com provides allows
    spanning tree to be controled from userspace. Like hotplug, it
    uses call_usermodehelper when spanning tree is enabled so there
    is no visible API change. If call to start usermode STP fails
    it falls back to existing kernel STP.

    Signed-off-by: Stephen Hemminger

    Stephen Hemminger
     
  • The RSTP daemon needs to be able to flush all dynamic forwarding
    entries in the case of topology change.

    This is a temporary interface. It will change to a netlink interface
    before RSTP daemon is officially released.

    Signed-off-by: Stephen Hemminger

    Stephen Hemminger
     

11 Feb, 2007

1 commit


08 Feb, 2007

1 commit


26 Oct, 2006

1 commit


21 Mar, 2006

1 commit

  • Bridge's communicate with each other using Spanning Tree Protocol
    over a standard multicast address. There are times when testing or
    layering bridges over existing topologies or tunnels, when it is
    useful to use alternative multicast addresses for STP packets.

    The 802.1d standard has some unused addresses, that can be used for this.
    This patch is restrictive in that it only allows one of the possible
    addresses in the standard.

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

    Stephen Hemminger
     

12 Jan, 2006

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds