1. 11 Dec, 2016 8 commits
    • Asbjørn Sloth Tønnesen's avatar
      net: l2tp: export debug flags to UAPI · 41c43fbe
      Asbjørn Sloth Tønnesen authored
      Move the L2TP_MSG_* definitions to UAPI, as it is part of
      the netlink API.
      Signed-off-by: default avatarAsbjoern Sloth Toennesen <asbjorn@asbjorn.st>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      41c43fbe
    • David S. Miller's avatar
      Merge branch 'sxgbe-stmmac-remove-private-tx-lock' · 0972770e
      David S. Miller authored
      Lino Sanfilippo says:
      
      ====================
      Remove private tx queue locks
      
      this patch series removes unnecessary private locks in the sxgbe and the
      stmmac driver.
      
      v2:
      - adjust commit message
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0972770e
    • Lino Sanfilippo's avatar
      net: ethernet: stmmac: remove private tx queue lock · 739c8e14
      Lino Sanfilippo authored
      The driver uses a private lock for synchronization of the xmit function and
      the xmit completion handler, but since the NETIF_F_LLTX flag is not set,
      the xmit function is also called with the xmit_lock held.
      
      On the other hand the completion handler uses the reverse locking order by
      first taking the private lock and (in case that the tx queue had been
      stopped) then the xmit_lock.
      
      Improve the locking by removing the private lock and using only the
      xmit_lock for synchronization instead.
      Signed-off-by: default avatarLino Sanfilippo <LinoSanfilippo@gmx.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      739c8e14
    • Lino Sanfilippo's avatar
      net: ethernet: sxgbe: remove private tx queue lock · 980f1404
      Lino Sanfilippo authored
      The driver uses a private lock for synchronization of the xmit function and
      the xmit completion handler, but since the NETIF_F_LLTX flag is not set,
      the xmit function is also called with the xmit_lock held.
      
      On the other hand the completion handler uses the reverse locking order by
      first taking the private lock and (in case that the tx queue had been
      stopped) then the xmit_lock.
      
      Improve the locking by removing the private lock and using only the
      xmit_lock for synchronization instead.
      Signed-off-by: default avatarLino Sanfilippo <LinoSanfilippo@gmx.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      980f1404
    • David S. Miller's avatar
      Merge branch 'bridge-fast-ageing-on-topology-change' · c280b482
      David S. Miller authored
      Vivien Didelot says:
      
      ====================
      net: bridge: fast ageing on topology change
      
      802.1D [1] specifies that the bridges in a network must use a short
      value to age out dynamic entries in the Filtering Database for a period,
      once a topology change has been communicated by the root bridge.
      
      This patchset fixes this for the in-kernel STP implementation.
      
      Once the topology change flag is set in a net_bridge instance, the
      ageing time value is shorten to twice the forward delay used by the
      topology.
      
      When the topology change flag is cleared, the ageing time configured for
      the bridge is restored.
      
      To accomplish that, a new bridge_ageing_time member is added to the
      net_bridge structure, to store the user configured bridge ageing time.
      
      Two helpers are added to offload the ageing time and set the topology
      change flag in the net_bridge instance. Then the required logic is added
      in the topology change helper if in-kernel STP is used.
      
      This has been tested on the following topology:
      
          +--------------+
          | root bridge  |
          |  1  2  3  4  |
          +--+--+--+--+--+
             |  |  |  |      +--------+
             |  |  |  +------| laptop |
             |  |  |         +--------+
          +--+--+--+-----+
          |  1  2  3     |
          | slave bridge |
          +--------------+
      
      When unplugging/replugging the laptop, the slave bridge (under test)
      gets the topology change flag sent by the root bridge, and fast ageing
      is triggered on the bridges. Once the topology change timer of the root
      bridge expires, the topology change flag is cleared and the configured
      ageing time is restored on the bridges.
      
      A similar test has been done between two bridges under test.
      When changing the forward delay of the root bridge with:
      
          # echo 3000 > /sys/class/net/br0/bridge/forward_delay
      
      the ageing time correctly changes on both bridges from 300s to 60s while
      the TOPOLOGY_CHANGE flag is present.
      
      [1] "8.3.5 Notifying topology changes",
          http://profesores.elo.utfsm.cl/~agv/elo309/doc/802.1D-1998.pdf
      
      No change since RFC: https://lkml.org/lkml/2016/10/19/828
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c280b482
    • Vivien Didelot's avatar
      net: bridge: shorten ageing time on topology change · 34d8acd8
      Vivien Didelot authored
      802.1D [1] specifies that the bridges must use a short value to age out
      dynamic entries in the Filtering Database for a period, once a topology
      change has been communicated by the root bridge.
      
      Add a bridge_ageing_time member in the net_bridge structure to store the
      bridge ageing time value configured by the user (ioctl/netlink/sysfs).
      
      If we are using in-kernel STP, shorten the ageing time value to twice
      the forward delay used by the topology when the topology change flag is
      set. When the flag is cleared, restore the configured ageing time.
      
      [1] "8.3.5 Notifying topology changes ",
          http://profesores.elo.utfsm.cl/~agv/elo309/doc/802.1D-1998.pdfSigned-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      34d8acd8
    • Vivien Didelot's avatar
      net: bridge: add helper to set topology change · 8384b5f5
      Vivien Didelot authored
      Add a __br_set_topology_change helper to set the topology change value.
      
      This can be later extended to add actions when the topology change flag
      is set or cleared.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8384b5f5
    • Vivien Didelot's avatar
      net: bridge: add helper to offload ageing time · 82dd4332
      Vivien Didelot authored
      The SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME switchdev attr is actually set
      when initializing a bridge port, and when configuring the bridge ageing
      time from ioctl/netlink/sysfs.
      
      Add a __set_ageing_time helper to offload the ageing time to physical
      switches, and add the SWITCHDEV_F_DEFER flag since it can be called
      under bridge lock.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      82dd4332
  2. 10 Dec, 2016 25 commits
  3. 09 Dec, 2016 7 commits