1. 01 5月, 2017 1 次提交
    • I
      mlxsw: spectrum_router: Simplify VRF enslavement · b1e45526
      Ido Schimmel 提交于
      When a netdev is enslaved to a VRF master, its router interface (RIF)
      needs to be destroyed (if exists) and a new one created using the
      corresponding virtual router (VR).
      
      >From the driver's perspective, the above is equivalent to an inetaddr
      event sent for this netdev. Therefore, when a port netdev (or its
      uppers) are enslaved to a VRF master, call the same function that
      would've been called had a NETDEV_UP was sent for this netdev in the
      inetaddr notification chain.
      
      This patch also fixes a bug when a LAG netdev with an existing RIF is
      enslaved to a VRF. Before this patch, each LAG port would drop the
      reference on the RIF, but would re-join the same one (in the wrong VR)
      soon after. With this patch, the corresponding RIF is first destroyed
      and a new one is created using the correct VR.
      
      Fixes: 7179eb5a ("mlxsw: spectrum_router: Add support for VRFs")
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b1e45526
  2. 21 4月, 2017 5 次提交
  3. 29 3月, 2017 1 次提交
  4. 25 3月, 2017 3 次提交
  5. 22 3月, 2017 2 次提交
  6. 17 3月, 2017 2 次提交
  7. 13 3月, 2017 3 次提交
  8. 11 3月, 2017 5 次提交
  9. 09 3月, 2017 1 次提交
  10. 15 2月, 2017 1 次提交
  11. 11 2月, 2017 2 次提交
  12. 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
  13. 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
  14. 04 2月, 2017 2 次提交
  15. 25 1月, 2017 1 次提交
  16. 12 1月, 2017 1 次提交
  17. 10 1月, 2017 3 次提交
  18. 09 1月, 2017 1 次提交
  19. 18 12月, 2016 1 次提交
  20. 26 11月, 2016 3 次提交
    • 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