08 Oct, 2011

1 commit


07 Oct, 2011

2 commits

  • 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
     
  • This resolves a regression seen by some users of bridging.
    Some users use the bridge like a dummy device.
    They expect to be able to put an IPv6 address on the device
    with no ports attached. Although there are better ways of doing
    this, there is no reason to not allow it.

    Note: the bridge still will reflect the state of ports in the
    bridge if there are any added.

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

    stephen hemminger
     

18 Aug, 2011

1 commit


06 Jul, 2011

1 commit

  • As is_multicast_ether_addr returns true on broadcast packets as
    well, we need to explicitly exclude broadcast packets so that
    they're always flooded. This wasn't an issue before as broadcast
    packets were considered to be an unregistered multicast group,
    which were always flooded. However, as we now only flood such
    packets to router ports, this is no longer acceptable.

    Reported-by: Michael Guntsche
    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

20 Jun, 2011

1 commit


29 Apr, 2011

1 commit


05 Apr, 2011

1 commit

  • Add netlink device ops to allow creating bridge device via netlink.
    This works in a manner similar to vlan, macvlan and bonding.

    Example:
    # ip link add link dev br0 type bridge
    # ip link del dev br0

    The change required rearranging initializtion code to deal with
    being called by create link. Most of the initialization happens
    in br_dev_setup, but allocation of stats is done in ndo_init callback
    to deal with allocation failure. Sysfs setup has to wait until
    after the network device kobject is registered.

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

    stephen hemminger
     

15 Mar, 2011

1 commit

  • This makes the bridge device behave like a physical device.
    In earlier releases the bridge always asserted carrier. This
    changes the behavior so that bridge device carrier is on only
    if one or more ports are in the forwarding state. This
    should help IPv6 autoconfiguration, DHCP, and routing daemons.

    I did brief testing with Network and Virt manager and they
    seem fine, but since this changes behavior of bridge, it should
    wait until net-next (2.6.39).

    Signed-off-by: Stephen Hemminger
    Reviewed-by: Nicolas de Pesloüan
    Tested-By: Adam Majer
    Signed-off-by: David S. Miller

    stephen hemminger
     

14 Feb, 2011

1 commit


10 Dec, 2010

1 commit

  • Use helper functions to hide all direct accesses, especially writes,
    to dst_entry metrics values.

    This will allow us to:

    1) More easily change how the metrics are stored.

    2) Implement COW for metrics.

    In particular this will help us put metrics into the inetpeer
    cache if that is what we end up doing. We can make the _metrics
    member a pointer instead of an array, initially have it point
    at the read-only metrics in the FIB, and then on the first set
    grab an inetpeer entry and point the _metrics member there.

    Signed-off-by: David S. Miller
    Acked-by: Eric Dumazet

    David S. Miller
     

21 Oct, 2010

1 commit

  • If some of the underlying devices support it, enable vlan offload on
    transmit for bridge devices. This allows senders to take advantage of the
    hardware support, similar to other forms of acceleration.

    Signed-off-by: Jesse Gross
    Signed-off-by: David S. Miller

    Jesse Gross
     

03 Aug, 2010

1 commit


31 Jul, 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
     

20 Jul, 2010

1 commit

  • The new netpoll code in bridging contains use-after-free bugs
    that are non-trivial to fix.

    This patch fixes this by removing the code that uses skbs after
    they're freed.

    As a consequence, this means that we can no longer call bridge
    from the netpoll path, so this patch also removes the controller
    function in order to disable netpoll.

    Signed-off-by: Herbert Xu

    Thanks,
    Signed-off-by: David S. Miller

    Herbert Xu
     

08 Jul, 2010

1 commit

  • There is a small possibility that a reader gets incorrect values on 32
    bit arches. SNMP applications could catch incorrect counters when a
    32bit high part is changed by another stats consumer/provider.

    One way to solve this is to add a rtnl_link_stats64 param to all
    ndo_get_stats64() methods, and also add such a parameter to
    dev_get_stats().

    Rule is that we are not allowed to use dev->stats64 as a temporary
    storage for 64bit stats, but a caller provided area (usually on stack)

    Old drivers (only providing get_stats() method) need no changes.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

24 Jun, 2010

1 commit

  • Use u64_stats_sync infrastructure to provide 64bit rx/tx
    counters even on 32bit hosts.

    It is safe to use a single u64_stats_sync for rx and tx,
    because BH is disabled on both, and we use per_cpu data.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

16 Jun, 2010

2 commits

  • There are multiple problems with the newly added netpoll support:

    1) Use-after-free on each netpoll packet.
    2) Invoking unsafe code on netpoll/IRQ path.
    3) Breaks when netpoll is enabled on the underlying device.

    This patch fixes all of these problems. In particular, we now
    allocate proper netpoll structures for each underlying device.

    We only allow netpoll to be enabled on the bridge when all the
    devices underneath it support netpoll. Once it is enabled, we
    do not allow non-netpoll devices to join the bridge (until netpoll
    is disabled again).

    This allows us to do away with the npinfo juggling that caused
    problem number 1.

    Incidentally this patch fixes number 2 by bypassing unsafe code
    such as multicast snooping and netfilter.

    Reported-by: Qianfeng Zhang
    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • Now that netpoll always zaps npinfo we no longer need to do it
    in bridge.

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

    Herbert Xu
     

11 Jun, 2010

1 commit


16 May, 2010

2 commits


11 May, 2010

1 commit


06 May, 2010

1 commit

  • Based on the previous patch, make bridge support netpoll by:

    1) implement the 2 methods to support netpoll for bridge;

    2) modify netpoll during forwarding packets via bridge;

    3) disable netpoll support of bridge when a netpoll-unabled device
    is added to bridge;

    4) enable netpoll support when all underlying devices support netpoll.

    Cc: David Miller
    Cc: Neil Horman
    Cc: Stephen Hemminger
    Cc: Matt Mackall
    Signed-off-by: WANG Cong
    Signed-off-by: David S. Miller

    WANG Cong
     

28 Apr, 2010

1 commit


15 Apr, 2010

1 commit

  • Remove br_netfilter.c::br_nf_local_out(). The function
    br_nf_local_out() was needed because the PF_BRIDGE::LOCAL_OUT hook
    could be called when IP DNAT happens on to-be-bridged traffic. The
    new scheme eliminates this mess.

    Signed-off-by: Bart De Schuymer
    Signed-off-by: Patrick McHardy

    Bart De Schuymer
     

17 Mar, 2010

2 commits


28 Feb, 2010

3 commits


08 Oct, 2009

1 commit


01 Sep, 2009

1 commit


06 Jul, 2009

1 commit


21 Nov, 2008

1 commit

  • This patch moves neigh_setup and hard_start_xmit into the network device ops
    structure. For bisection, fix all the previously converted drivers as well.
    Bonding driver took the biggest hit on this.

    Added a prefetch of the hard_start_xmit in the fast path to try and reduce
    any impact this would have.

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

    Stephen Hemminger
     

20 Nov, 2008

1 commit


23 Oct, 2008

1 commit

  • My change

    commit e2a6b85247aacc52d6ba0d9b37a99b8d1a3e0d83
    net: Enable TSO if supported by at least one device

    didn't do what was intended because the netdev_compute_features
    function was designed for conjunctions. So what happened was that
    it would simply take the TSO status of the last constituent device.

    This patch extends it to support both conjunctions and disjunctions
    under the new name of netdev_increment_features.

    It also adds a new function netdev_fix_features which does the
    sanity checking that usually occurs upon registration. This ensures
    that the computation doesn't result in an illegal combination
    since this checking is absent when the change is initiated via
    ethtool.

    The two users of netdev_compute_features have been converted.

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

    Herbert Xu
     

09 Sep, 2008

1 commit

  • Bridge as netdevice doesn't cross netns boundaries.

    Bridge ports and bridge itself live in same netns.

    Notifiers are fixed.

    netns propagated from userspace socket for setup and teardown.

    Signed-off-by: Alexey Dobriyan
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     

16 Aug, 2008

1 commit