23 Apr, 2013

1 commit

  • Conflicts:
    drivers/net/ethernet/emulex/benet/be_main.c
    drivers/net/ethernet/intel/igb/igb_main.c
    drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
    include/net/scm.h
    net/batman-adv/routing.c
    net/ipv4/tcp_input.c

    The e{uid,gid} --> {uid,gid} credentials fix conflicted with the
    cleanup in net-next to now pass cred structs around.

    The be2net driver had a bug fix in 'net' that overlapped with the VLAN
    interface changes by Patrick McHardy in net-next.

    An IGB conflict existed because in 'net' the build_skb() support was
    reverted, and in 'net-next' there was a comment style fix within that
    code.

    Several batman-adv conflicts were resolved by making sure that all
    calls to batadv_is_my_mac() are changed to have a new bat_priv first
    argument.

    Eric Dumazet's TS ECR fix in TCP in 'net' conflicted with the F-RTO
    rewrite in 'net-next', mostly overlapping changes.

    Thanks to Stephen Rothwell and Antonio Quartulli for help with several
    of these merge resolutions.

    Signed-off-by: David S. Miller

    David S. Miller
     

16 Apr, 2013

1 commit


03 Apr, 2013

1 commit

  • commit 00cfec37484761 (net: add a synchronize_net() in
    netdev_rx_handler_unregister())
    allows us to remove the synchronized_net() call from del_nbp()

    Signed-off-by: Eric Dumazet
    Cc: Veaceslav Falico
    Cc: Stephen Hemminger
    Acked-by: Veaceslav Falico
    Signed-off-by: David S. Miller

    Eric Dumazet
     

14 Feb, 2013

3 commits

  • When VLAN is added to the port, a local fdb entry for that port
    (the entry with the mac address of the port) is added for that
    VLAN. This way we can correctly determine if the traffic
    is for the bridge itself. If the address of the port changes,
    we try to change all the local fdb entries we have for that port.

    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • Add a netlink interface to add and remove vlan configuration on bridge port.
    The interface uses the RTM_SETLINK message and encodes the vlan
    configuration inside the IFLA_AF_SPEC. It is possble to include multiple
    vlans to either add or remove in a single message.

    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • Adds an optional infrustructure component to bridge that would allow
    native vlan filtering in the bridge. Each bridge port (as well
    as the bridge device) now get a VLAN bitmap. Each bit in the bitmap
    is associated with a vlan id. This way if the bit corresponding to
    the vid is set in the bitmap that the packet with vid is allowed to
    enter and exit the port.

    Write access the bitmap is protected by RTNL and read access
    protected by RCU.

    Vlan functionality is disabled by default.

    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     

05 Jan, 2013

1 commit


30 Dec, 2012

1 commit

  • The bridge link detection should follow the operational state
    of the lower device, rather than the carrier bit. This allows devices
    like tunnels that are controlled by userspace control plane to work
    with bridge STP link management.

    Signed-off-by: Stephen Hemminger
    Reviewed-by: Flavio Leitner
    Signed-off-by: David S. Miller

    stephen hemminger
     

22 Dec, 2012

1 commit

  • When netdev_set_master faild in br_add_if, we should
    call br_netpoll_disable to do some cleanup jobs,such
    as free the memory of struct netpoll which allocated
    in br_netpoll_enable.

    Signed-off-by: Gao feng
    Acked-by: Cong Wang
    Signed-off-by: David S. Miller

    Gao feng
     

15 Aug, 2012

2 commits


27 Jun, 2012

1 commit


17 Nov, 2011

1 commit


25 Oct, 2011

1 commit


19 Oct, 2011

1 commit

  • Need to cleanup bridge device timers and ports when being bridge
    device is being removed via netlink.

    This fixes the problem of observed when doing:
    ip link add br0 type bridge
    ip link set dev eth1 master br0
    ip link set br0 up
    ip link del br0

    which would cause br0 to hang in unregister_netdev because
    of leftover reference count.

    Reported-by: Sridhar Samudrala
    Signed-off-by: Stephen Hemminger
    Acked-by: Sridhar Samudrala
    Signed-off-by: David S. Miller

    stephen hemminger
     

04 Oct, 2011

1 commit

  • When port is added to a bridge, the old code would send the new neighbor
    netlink message before the subsequent new link message. This bug makes
    it difficult to use the monitoring API in an application.

    This code changes the ordering to add the forwarding entry
    after the port is setup. One of the error checks (for invalid address)
    is moved earlier in the process to avoid having to do unwind.

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

    stephen hemminger
     

22 Sep, 2011

1 commit

  • Conflicts:
    MAINTAINERS
    drivers/net/Kconfig
    drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
    drivers/net/ethernet/broadcom/tg3.c
    drivers/net/wireless/iwlwifi/iwl-pci.c
    drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
    drivers/net/wireless/rt2x00/rt2800usb.c
    drivers/net/wireless/wl12xx/main.c

    David S. Miller
     

16 Sep, 2011

2 commits

  • This patch does several things:
    - introduces __ethtool_get_settings which is called from ethtool code and
    from drivers as well. Put ASSERT_RTNL there.
    - dev_ethtool_get_settings() is replaced by __ethtool_get_settings()
    - changes calling in drivers so rtnl locking is respected. In
    iboe_get_rate was previously ->get_settings() called unlocked. This
    fixes it. Also prb_calc_retire_blk_tmo() in af_packet.c had the same
    problem. Also fixed by calling __dev_get_by_index() instead of
    dev_get_by_index() and holding rtnl_lock for both calls.
    - introduces rtnl_lock in bnx2fc_vport_create() and fcoe_vport_create()
    so bnx2fc_if_create() and fcoe_if_create() are called locked as they
    are from other places.
    - use __ethtool_get_settings() in bonding code

    Signed-off-by: Jiri Pirko

    v2->v3:
    -removed dev_ethtool_get_settings()
    -added ASSERT_RTNL into __ethtool_get_settings()
    -prb_calc_retire_blk_tmo - use __dev_get_by_index() and lock
    around it and __ethtool_get_settings() call
    v1->v2:
    add missing export_symbol
    Reviewed-by: Ben Hutchings [except FCoE bits]
    Acked-by: Ralf Baechle
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • Since these checks and initialization are done in
    dev_ethtool_get_settings called later on, remove this redundancy.

    Signed-off-by: Jiri Pirko
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Jiri Pirko
     

23 Aug, 2011

1 commit

  • Jan Beulich reported a possible net_device leak in bridge code after
    commit bb900b27a2f4 (bridge: allow creating bridge devices with netlink)

    Reported-by: Jan Beulich
    Signed-off-by: Eric Dumazet
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Eric Dumazet
     

10 Aug, 2011

1 commit

  • This ensures the neighbor entries associated with the bridge
    dev are flushed, also invalidating the associated cached L2 headers.

    This means we br_add_if/br_del_if ports to implement hand-over and
    not wind up with bridge packets going out with stale MAC.

    This means we can also change MAC of port device and also not wind
    up with bridge packets going out with stale MAC.

    This builds on Stephen Hemminger's patch, also handling the br_del_if
    case and the port MAC change case.

    Cc: Stephen Hemminger
    Signed-off-by: Andrei Warkentin
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Andrei Warkentin
     

23 Jul, 2011

1 commit

  • If a new device is added to a bridge, the ethernet address of the
    bridge network device may change. When the address changes, the
    appropriate callback is called, but with the wrong device argument.
    The address of the bridge device (ie br0) changes not the address
    of the device being passed to add_if (ie eth0).

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

    stephen hemminger
     

23 May, 2011

2 commits

  • In the old days, we used to access dev->master in __netif_receive_skb()
    in a rcu_read_lock section.

    So one synchronize_net() call was needed in netdev_set_master() to make
    sure another cpu could not use old master while/after we release it.

    We now use netdev_rx_handler infrastructure and added one
    synchronize_net() call in bond_release()/bond_release_all()

    Remove the obsolete synchronize_net() from netdev_set_master() and add
    one in bridge del_nbp() after its netdev_rx_handler_unregister() call.

    This makes enslave -d a bit faster.

    Signed-off-by: Eric Dumazet
    CC: Jiri Pirko
    CC: Stephen Hemminger
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • In the previous patch I added NETDEV_JOIN, now
    we can notify netconsole when adding a device to a bridge too.

    Signed-off-by: WANG Cong
    Cc: Neil Horman
    Signed-off-by: David S. Miller

    Amerigo Wang
     

30 Apr, 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
     

28 Mar, 2011

1 commit


14 Feb, 2011

1 commit


25 Jan, 2011

2 commits

  • Reduce printk() levels to KERN_INFO in netdev_fix_features() as this will
    be used by ethtool and might spam dmesg unnecessarily.

    This converts the function to use netdev_info() instead of plain printk().

    As a side effect, bonding and bridge devices will now log dropped features
    on every slave device change.

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

    Michał Mirosław
     
  • Quoting Ben Hutchings: we presumably won't be defining features that
    can only be enabled on 64-bit architectures.

    Occurences found by `grep -r` on net/, drivers/net, include/

    [ Move features and vlan_features next to each other in
    struct netdev, as per Eric Dumazet's suggestion -DaveM ]

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

    Michał Mirosław
     

16 Nov, 2010

2 commits


26 Aug, 2010

2 commits


16 Jun, 2010

3 commits

  • Register net_bridge_port pointer as rx_handler data pointer. As br_port is
    removed from struct net_device, another netdev priv_flag is added to indicate
    the device serves as a bridge port. Also rcuized pointers are now correctly
    dereferenced in br_fdb.c and in netfilter parts.

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • Add possibility to register rx_handler data pointer along with a rx_handler.

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • 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
     

02 Jun, 2010

1 commit

  • What this patch does is it removes two receive frame hooks (for bridge and for
    macvlan) from __netif_receive_skb. These are replaced them with a single
    hook for both. It only supports one hook per device because it makes no
    sense to do bridging and macvlan on the same device.

    Then a network driver (of virtual netdev like macvlan or bridge) can register
    an rx_handler for needed net device.

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

    Jiri Pirko
     

19 May, 2010

1 commit

  • Fix build when CONFIG_SYSFS is not enabled:
    net/bridge/br_if.c:136: error: 'struct net_bridge_port' has no member named 'sysfs_name'

    Note: dev->name == sysfs_name except when change name is in
    progress, and we are protected from that by RTNL mutex.

    Signed-off-by: Randy Dunlap
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Randy Dunlap