1. 08 Feb, 2019 13 commits
  2. 07 Feb, 2019 23 commits
  3. 06 Feb, 2019 4 commits
    • David S. Miller's avatar
      Merge branch 'mlxsw-blackhole-routes' · 907bea9c
      David S. Miller authored
      Ido Schimmel says:
      
      ====================
      mlxsw: Offload blackhole routes
      
      Blackhole routes are routes that cause matching packets to be silently
      dropped. This is in contrast to unreachable routes that generate an ICMP
      host unreachable packet in response.
      
      The driver currently programs both route types with a trap action and
      lets the kernel drop matching packets. This is sub-optimal as packets
      routed using a blackhole route can be directly dropped by the ASIC.
      
      Patch #1 alters mlxsw to program blackhole routes with a discard action.
      
      Patch #2 adds a matching test.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      907bea9c
    • Ido Schimmel's avatar
      selftests: mlxsw: Add a test for blackhole routes · a98232a1
      Ido Schimmel authored
      Use a simple topology consisting of two hosts directly connected to a
      router. Make sure IPv4/IPv6 ping works and then add blackhole routes.
      Test that ping fails and that the routes are marked as offloaded. Use a
      simple tc filter to test that packets were dropped by the ASIC and not
      trapped to the CPU.
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a98232a1
    • Ido Schimmel's avatar
      mlxsw: spectrum_router: Offload blackhole routes · 2810c3b2
      Ido Schimmel authored
      Create a new FIB entry type for blackhole routes and set it in case the
      type of the notified route is 'RTN_BLACKHOLE'.
      
      Program such routes with a discard action and mark them as offloaded
      since the device is dropping the packets instead of the kernel.
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2810c3b2
    • David S. Miller's avatar
      Merge branch 'net-Introduce-ndo_get_port_parent_id' · 554c88ac
      David S. Miller authored
      Florian Fainelli says:
      
      ====================
      net: Introduce ndo_get_port_parent_id()
      
      Based on discussion with Ido and feedback from Jakub there are clearly
      two classes of users that implement SWITCHDEV_ATTR_ID_PORT_PARENT_ID:
      
      - PF/VF drivers which typically only implement return the port's parent
        ID, yet have to implement switchdev_port_attr_get() just for that
      
      - Ethernet switch drivers: mlxsw, ocelot, DSA, etc. which implement more
        attributes which we want to be able to eventually veto in the context
        of the caller, thus making them candidates for using a blocking notifier
        chain
      
      Changes in v4:
      
      - remove superfluous net/switchdev.h inclusions in a few files
      - added Jiri's Acked-by where given
      - removed err = -EOPNOTSUPP initializations
      - changed according to Jiri's suggestion in net/ipv4/ipmr.c
      
      Changes in v3:
      
      - keep ethsw's switchdev_ops assignment
      - remove inclusion of net/switchdev.h in netdevsim which is no longer
        necesary
      
      Changes in v2:
      
      - resolved build failures spotted by kbuild test robot
      - added helpers functions into the core network device layer:
        dev_get_port_parent_id() and netdev_port_same_parent_id();
      - added support for recursion to lower devices
      
      Changes from RFC:
      
      - introduce a ndo_get_port_parent_id() and convert all relevant drivers
        to use it
      
      - get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID
      
      A subsequent set of patches will convert switchdev_port_attr_set() to
      use a blocking notifier call, and still get rid of
      switchdev_port_attr_get() altogether.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      554c88ac