1. 29 11月, 2016 10 次提交
  2. 28 11月, 2016 12 次提交
  3. 27 11月, 2016 9 次提交
  4. 26 11月, 2016 9 次提交
    • J
      tipc: resolve connection flow control compatibility problem · 6998cc6e
      Jon Paul Maloy 提交于
      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: NJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6998cc6e
    • D
      Merge branch 'mlxsw-trap-groups-and-policers' · e5f12b3f
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      e5f12b3f
    • N
      mlxsw: spectrum: Add policers for trap groups · 9148e7cf
      Nogah Frankel 提交于
      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: NNogah Frankel <nogahf@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9148e7cf
    • N
      mlxsw: reg: Add QoS Policer Configuration Register · 76a4c7d3
      Nogah Frankel 提交于
      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: NNogah Frankel <nogahf@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      76a4c7d3
    • N
      mlxsw: resources: Add max cpu policers resource · 2b77958b
      Nogah Frankel 提交于
      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: NNogah Frankel <nogahf@mellanox.com>
      Reviewed-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2b77958b
    • N
      mlxsw: Create a different trap group list for each device · 117b0dad
      Nogah Frankel 提交于
      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: NNogah Frankel <nogahf@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      117b0dad
    • N
      mlxsw: spectrum: Add BGP trap · 616d8040
      Nogah Frankel 提交于
      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: NNogah Frankel <nogahf@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      616d8040
    • N
      mlxsw: Change trap groups setting · 579c82e4
      Nogah Frankel 提交于
      Trap groups have many options which we currently set to default values.
      In the next patches we will use many of them with non-default values.
      
      Some of these options have no default value, so this patch sets them as
      params for the trap group set function. Others almost always use the same
      values, so the set function will use this default values. In the rare cases
      when they will need to be with other values, these values can be set
      directly (using the macros for fields in registers).
      
      Parameters without default value:
      TC - the traffic class for packets that hit this trap group.
          (old default is the max tc)
      priority - if one packet hits multiple trap groups, the group with the
      	   higher priority will "catch" it. (old default is 0)
      policer - limit rate policer (old default is disabled)
      
      Default parameters:
      swid - switch id, relevant for the emad trap only, ignored on Spectrum.
             (new default is 0)
      rdq - CPU receive descriptor queue (new default is identical to trap
            group id)
      Signed-off-by: NNogah Frankel <nogahf@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      579c82e4
    • N
      mlxsw: resources: Add max trap groups resource · 23432cb8
      Nogah Frankel 提交于
      Add the max number of trap groups to resource query.
      Signed-off-by: NNogah Frankel <nogahf@mellanox.com>
      Reviewed-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      23432cb8