1. 21 4月, 2017 2 次提交
  2. 29 3月, 2017 1 次提交
  3. 25 3月, 2017 3 次提交
  4. 22 3月, 2017 2 次提交
  5. 17 3月, 2017 2 次提交
  6. 13 3月, 2017 3 次提交
  7. 11 3月, 2017 5 次提交
  8. 09 3月, 2017 1 次提交
  9. 15 2月, 2017 1 次提交
  10. 11 2月, 2017 2 次提交
  11. 09 2月, 2017 1 次提交
    • I
      mlxsw: spectrum_router: Flush resources when RIF is deleted · 9665b745
      Ido Schimmel 提交于
      When the last IP address is removed from a netdev, its RIF is deleted.
      However, if user didn't first remove neighbours and nexthops using this
      interface, then they would still be present in the device's tables.
      
      Therefore, whenever a RIF is deleted, make sure all the neighbours and
      nexthops (adjacency entries) using it are removed from the relevant
      tables as well.
      
      The action associated with any route using this RIF would be refreshed,
      most likely to trap. If the kernel decides to remove the route (f.e.,
      because all the nexthops are now DEAD), then an event would be sent,
      causing the route to be removed from the device.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9665b745
  12. 07 2月, 2017 1 次提交
    • I
      mlxsw: spectrum_router: Simplify neighbour reflection · 5c8802f1
      Ido Schimmel 提交于
      Up until now we had two interfaces for neighbour related configuration:
      ndo_neigh_{construct,destroy} and NEIGH_UPDATE netevents. The ndos were
      used to add and remove neighbours from the driver's cache, whereas the
      netevent was used to reflect the neighbours into the device's tables.
      
      However, if the NUD state of a neighbour isn't NUD_VALID or if the
      neighbour is dead, then there's really no reason for us to keep it
      inside our cache. The only exception to this rule are neighbours that
      are also used for nexthops, which we periodically refresh to get them
      resolved.
      
      We can therefore eliminate the ndo entry point into the driver and
      simplify the code, making it similar to the FIB reflection, which is
      based solely on events. This also helps us avoid a locking issue, in
      which the RIF cache was traversed without proper locking during
      insertion into the neigh entry cache.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5c8802f1
  13. 04 2月, 2017 2 次提交
  14. 25 1月, 2017 1 次提交
  15. 12 1月, 2017 1 次提交
  16. 10 1月, 2017 3 次提交
  17. 09 1月, 2017 1 次提交
  18. 18 12月, 2016 1 次提交
  19. 26 11月, 2016 7 次提交
    • 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: 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: core: Change emad trap group settings · 9d87fcea
      Nogah Frankel 提交于
      Currently, the emad trap init was done in the core. In the future we will
      want to add some changes to the traps groups, according to device type.
      This commit create a driver function to create the trap group for the
      emad, so later it can be changed by devices. It also changes the emad
      registration to use the new generic functions.
      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>
      9d87fcea
    • N
      mlxsw: Add option to choose trap group · 0fb78a4e
      Nogah Frankel 提交于
      Currently, we set the trap group to pre-determined option, based on whether
      it is an rx or event trap.
      This commit adds a possibility to chose the trap group, so it can be set
      to different values in the following patches.
      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>
      0fb78a4e
    • N
      mlxsw: Change trap set function · d570b7ee
      Nogah Frankel 提交于
      Change trap setting function so instead of determining the trap group by
      trap id, it gets it as a parameter (so later we can have different trap
      groups for Spectrum and Switchx2).
      Add "is_ctrl" parameter to the trap setting function. It control whether
      the trapped packets wait in a designated control buffer or in their
      default one. This parameter is ignored by Switchx2 and Switchib.
      Add these parameters to the traps array in Spectrum, Switchx2 and
      Switchib.
      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>
      d570b7ee