Skip to content
  1. Nov 29, 2016
  2. Nov 28, 2016
  3. Nov 27, 2016
  4. Nov 26, 2016
    • Jon Paul Maloy's avatar
      tipc: resolve connection flow control compatibility problem · 6998cc6e
      Jon Paul Maloy authored
      In commit 10724cc7
      
       ("tipc: redesign connection-level flow control")
      we replaced the previous message based flow control with one based on
      1k blocks. In order to ensure backwards compatibility the mechanism
      falls back to using message as base unit when it senses that the peer
      doesn't support the new algorithm. The default flow control window,
      i.e., how many units can be sent before the sender blocks and waits
      for an acknowledge (aka advertisement) is 512. This was tested against
      the previous version, which uses an acknowledge frequency of on ack per
      256 received message, and found to work fine.
      
      However, we missed the fact that versions older than Linux 3.15 use an
      acknowledge frequency of 512, which is exactly the limit where a 4.6+
      sender will stop and wait for acknowledge. This would also work fine if
      it weren't for the fact that if the first sent message on a 4.6+ server
      side is an empty SYNACK, this one is also is counted as a sent message,
      while it is not counted as a received message on a legacy 3.15-receiver.
      This leads to the sender always being one step ahead of the receiver, a
      scenario causing the sender to block after 512 sent messages, while the
      receiver only has registered 511 read messages. Hence, the legacy
      receiver is not trigged to send an acknowledge, with a permanently
      blocked sender as result.
      
      We solve this deadlock by simply allowing the sender to send one more
      message before it blocks, i.e., by a making minimal change to the
      condition used for determining connection congestion.
      
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6998cc6e
    • David S. Miller's avatar
      Merge branch 'mlxsw-trap-groups-and-policers' · e5f12b3f
      David S. Miller authored
      
      
      Jiri Pirko says:
      
      ====================
      mlxsw: traps, trap groups and policers
      
      Nogah says:
      
      For a packet to be sent from the HW to the cpu, it needs to be trapped.
      For a trap to be activate it should be assigned to a trap group.
      Those trap groups can have policers, to limit the packet rate (the max
      number of packets that can be sent to the cpu in a time slot, the rest
      will be discarded) or the data rate (the same, but the count is not by the
      number of packets but by their total length in bytes).
      
      This patchset rearrange the trap setting API, re-write the traps and the
      trap groups list in spectrum and assign them policers.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e5f12b3f
    • Nogah Frankel's avatar
      mlxsw: spectrum: Add policers for trap groups · 9148e7cf
      Nogah Frankel authored
      
      
      Configure policers and connect them to trap groups.
      
      While many trap groups share policer's configuration they don't share
      the actual policer because each trap group represents a different
      flow / protocol and we don't want one of them to be able to exceed its
      rate on behalf of another.
      For example, if STP and LLDP gets to send 128 packets/sec each, if we
      put them in one 256 packets/sec policer, one can send 200 packets while
      the other only 50.
      
      Note that IP2ME covers lots of flows, so it's limit is set to match the
      cpu ability to handle data.
      
      Signed-off-by: default avatarNogah Frankel <nogahf@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9148e7cf
    • Nogah Frankel's avatar
      mlxsw: reg: Add QoS Policer Configuration Register · 76a4c7d3
      Nogah Frankel authored
      
      
      The QPCR register is used to create and control policers.
      A policer can discard or change the color of packets that are
      trapped by a specific trap.
      
      Signed-off-by: default avatarNogah Frankel <nogahf@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      76a4c7d3
    • Nogah Frankel's avatar
      mlxsw: resources: Add max cpu policers resource · 2b77958b
      Nogah Frankel authored
      
      
      Add a new resource to resources query: max cpu policers which tells us how
      many policers can be used to limit the data rate to the cpu port.
      
      Signed-off-by: default avatarNogah Frankel <nogahf@mellanox.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2b77958b
    • Nogah Frankel's avatar
      mlxsw: Create a different trap group list for each device · 117b0dad
      Nogah Frankel authored
      
      
      Trap groups can be used to control traps priority, both in terms of
      which trap "wins" if a packet matches two traps (priority) and in terms
      of packets from which trap group will be scheduled to the cpu first (tc).
      They can also be used to set rate limiters (policers) on them (will be
      added in the next patches).
      
      Currently, we support two trap groups. In Spectrum we want a better
      resolution, so every protocol / flow will have a different trap group,
      so we can control its parameters separately. Once the policers will be
      implemented, it will also allow us limit the rate of each protocol by
      itself.
      
      This patch change the trap group list to include:
      * the emad trap group, which is shared for all the devices.
      * Switchx2's trap groups, which are a copy of the current trap groups.
      * Spectrum's new trap groups, in order to match the above guidelines.
      (Switchib is using only the emad trap group, so it require no changes).
      
      This patch also includes new configuration for Spectrum's trap groups,
      with primary priority order within them.
      
      Signed-off-by: default avatarNogah Frankel <nogahf@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      117b0dad
    • Nogah Frankel's avatar
      mlxsw: spectrum: Add BGP trap · 616d8040
      Nogah Frankel authored
      
      
      Add a trap for BGP protocol that was previously trapped by the generic trap
      for IP2ME. This trap will allow us to have better control (over priority
      and rate) of the traffic.
      
      Signed-off-by: default avatarNogah Frankel <nogahf@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      616d8040