1. 15 12月, 2018 4 次提交
  2. 14 12月, 2018 14 次提交
  3. 13 12月, 2018 18 次提交
  4. 12 12月, 2018 4 次提交
    • D
      Merge branch 'mlxsw-Add-Spectrum-2-multicast-routing-support' · 3f9b7eee
      David S. Miller 提交于
      Ido Schimmel says:
      
      ====================
      mlxsw: Add Spectrum-2 multicast routing support
      
      Nir says:
      
      In Spectrum the firmware provided an abstraction for multicast routing
      on top of the policy engine. In Spectrum-2 this is no longer the case
      and the driver must interact directly with the policy engine in order to
      program multicast routes. Every route is written as an ACL rule, its
      priority set according to route type (*,G) or (S,G) and its action is an
      appropriate multicast routing action. Multicast routes are written to a
      specific ACL group which is bound to the appropriate IP protocol
      IPv4/IPv6.
      
      Patch #1 adds PEMRBT register needed to declare which ACL group is
      dedicated for each IP protocol multicast routing function.
      
      Patch #2 Changes initialization order and puts ACL before router as
      multicast router now uses ACL module.
      
      Patch #3 adds Spectrum-2 ACL keys needed for multicast route matching.
      
      Patch #4 adds another ACL profile - in addition to existing flower
      profile - which allows the multicast routing module to program rules
      directly into the ACL block.
      
      Patch #5 adds the ability to update ACL rules' action, since multicast
      routes actions may be updated after being configured.
      
      Patch #6 separates rule creation operation and rule action creation
      operation as in multicast router the action is created before the route
      is inserted.
      
      Patch #7 sharpens priority handling in Spectrum-2, to ensure incorrect
      values are not set to rule's priority.
      
      Patch #8 adds the implementation of multicast routing for IPv4 and IPv6
      over existing ACL rule programming
      
      Finally, patch #9 adds a test for IPv4/IPv6 multicast routing.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3f9b7eee
    • N
      selftests: forwarding: Add multicast routing test · 6d4efada
      Nir Dotan 提交于
      Introduce basic testing for both IPv4 and IPv6 multicast. The test creates
      an (S,G) type route, sends traffic and verifies traffic arrives when the
      route is present and then verifies traffic does not arrive after deleting
      the route.
      This test requires smcroute - https://github.com/troglobit/smcroute which
      is a tool that allows creation of static multicast routes.
      Signed-off-by: NNir Dotan <nird@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6d4efada
    • N
      mlxsw: spectrum_router: Add Multicast routing support for Spectrum-2 · cf7221a4
      Nir Dotan 提交于
      Add implementation of Spectrum-2 multicast routes for both IPv4 and IPv6 by
      using ACL module explicitly.
      In Spectrum-2, multicast routes are set as ACL rules, so initialization
      takes care of creating dedicated ACL groups and binding them to the
      appropriate multicast routing protocol IPv4/IPv6, and afterwards routes
      configuration translates to setting explicit ACL rules.
      Signed-off-by: NNir Dotan <nird@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cf7221a4
    • N
      mlxsw: spectrum_acl: Limit priority value · d7263ab3
      Nir Dotan 提交于
      In Spectrum-2, higher priority value wins and priority valid values are in
      the range of {1,cap_kvd_size-1}. mlxsw_sp_acl_tcam_priority_get converts
      from lower-bound priorities alike tc flower to Spectrum-2 HW range. Up
      until now tc flower did not provide priority 0 or reached the maximal
      value, however multicast routing does provide priority 0.
      
      Therefore, Change mlxsw_sp_acl_tcam_priority_get to verify priority is in
      the correct range. Make sure priority is never set to zero and never
      exceeds the maximal allowed value.
      Signed-off-by: NNir Dotan <nird@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d7263ab3