1. 02 May, 2016 33 commits
  2. 01 May, 2016 3 commits
  3. 29 Apr, 2016 4 commits
    • David S. Miller's avatar
      Merge branch 'mlx5-aRFS' · 3cfef195
      David S. Miller authored
      Saeed Mahameed says:
      
      ====================
      Mellanox 100G mlx5 ethernet aRFS support
      
      This series adds accelerated RFS support for the mlx5e driver.
      I have added one patch non-related to aRFS that fixes the rtnl_lock
      warning mlx5 driver been getting since b7aade15 ('vxlan: break dependency with netdev drivers')
      
      aRFS support in details:
      
      A direct TIR per RQ is now required in order to have the essential building blocks
      for aRFS.  Today the driver has one direct TIR that forwards traffic to RQ[0] (core 0),
      and one indirect TIR for RSS indirection table.  For that we've added one direct TIR
      per RQ, e.g.: TIR[i] -> RQ[i] (core i).
      
      Publicize Modify flow rule destination and reveal it in flow steering API, to have the
      ability to dynamically modify the destination TIR(core) for aRFS rules from the
      ethernet driver.
      
      Initializing CPU reverse mapping to notify upper layer on internal receive queue cpu
      mappings.
      
      Some design refactoring for mlx5e ethernet driver flow tables and flow steering API.
      Now the caller of create_flow_table can choose the level of the flow table, this way
      we will create the mlx5e flow tables in a reversed order and connect them as we go,
      we create flow table[i+1] before flow table[i] to be able to set flow table[i + 1] as
      a destination of flow table[i] once flow table[i] is created.
      also we have split the main flow table in the following manner:
          - From before: RX packet had to visit two flow tables until it is delivered to its receive queue:
              RX packet -> vlan filter flow table -> main flow table.
              > vlan filter will check the packet vlan field is allowed.
              > main flow will check if the dest mac is allowed and will check the l3/l4 headers to
              retrieve the RSS hash for steering the packet into its final receive queue.
      
          - Now main flow table is split into l2 dst mac steering table and ttc (traffic type classifier) table:
              RX packet -> vlan filter -> l2 table -> ttc table
              > vlan filter - same as before
              > L2 filter - filter packets according their destination mac address
              > ttc table - classify packet headers for RSS steering
                  - L3/L4 classification rules to steer the packet according to thier headers hash
                  - in case of none of the rules applies the packet is steered to RQ[0]
      
      After the above refactoring all left to-do is to create aRFS flow table which will manage
      aRFS steering rules to forward traffic to the desired RQ (core) and just connect the ttc
      table rules destinations to aRFS flow table.
      
      aRFS flow table in case of a miss will deliver the traffic to the core where the original
      ttc hash would have chosen.
      
      TTC table is not initialized and enabled until the user explicitly asks to, i.e. setting the NETIF_F_NTUPLE
      to ON.  This way there is no need for ttc table to forward traffic to aRFS table unless required.
      When setting back to OFF aRFS flow table is disabled and disconnected.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3cfef195
    • Maor Gottlieb's avatar
      net/mlx5e: Enabling aRFS mechanism · 45bf454a
      Maor Gottlieb authored
      Accelerated RFS requires that ntuple filtering is enabled via
      ethtool and driver supports ndo_rx_flow_steer.
      When the ntuple filtering is enabled, we modify the l3_l4 ttc
      rules to point on the aRFS flow tables and when the filtering
      is disabled, we modify the l3_l4 ttc rules to point on the RSS
      TIRs.
      Signed-off-by: default avatarMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      45bf454a
    • Maor Gottlieb's avatar
      net/mlx5e: Add accelerated RFS support · 18c908e4
      Maor Gottlieb authored
      Implement ndo_rx_flow_steer ndo.
      A new flow steering rule will be composed from the
      skb 4-tuple and added to the hardware aRFS flow table.
      
      Each rule is stored in an internal hash table, if such
      skb 4-tuple rule already exists we update the corresponding
      hardware steering rule with the new destination.
      
      For garbage collection rps_may_expire_flow will be
      invoked for a limited amount of old rules upon any
      ndo_rx_flow_steer invocation.
      Signed-off-by: default avatarMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      18c908e4
    • Maor Gottlieb's avatar
      net/mlx5e: Create aRFS flow tables · 1cabe6b0
      Maor Gottlieb authored
      Create the following four flow tables for aRFS usage:
      1. IPv4 TCP - filtering 4-tuple of IPv4 TCP packets.
      2. IPv6 TCP - filtering 4-tuple of IPv6 TCP packets.
      3. IPv4 UDP - filtering 4-tuple of IPv4 UDP packets.
      4. IPv6 UDP - filtering 4-tuple of IPv6 UDP packets.
      
      Each flow table has two flow groups: one for the 4-tuple
      filtering (full match)  and the other contains * rule for miss rule.
      
      Full match rule means a hit for aRFS and packet will be forwarded
      to the dedicated RQ/Core, miss rule packets will be forwarded to
      default RSS hashing.
      Signed-off-by: default avatarMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1cabe6b0