1. 17 Apr, 2019 17 commits
  2. 16 Apr, 2019 17 commits
  3. 15 Apr, 2019 6 commits
    • David S. Miller's avatar
      Merge branch 'nfp-Flower-flow-merging' · b6ed55cb
      David S. Miller authored
      Simon Horman says:
      
      ====================
      nfp: Flower flow merging
      
      John Hurley says,
      
      These patches deal with 'implicit recirculation' on the NFP. This is a
      firmware feature whereby a packet egresses to an 'internal' port meaning
      that it will recirculate back to the header extract phase with the
      'internal' port now marked as its ingress port. This internal port can
      then be matched on by another rule. This process simulates how OvS
      datapath outputs to an internal port. The FW traces the packet's
      recirculation route and sends a 'merge hint' to the driver telling it
      which flows it matched against. The driver can then decide if these flows
      can be merged to a single rule and offloaded.
      
      The patches deal with the following issues:
      
      - assigning/freeing IDs to/from each of these new internal ports
      - offloading rules that match on internal ports
      - offloading neighbour table entries whose egress port is internal
      - handling fallback traffic with an internal port as ingress
      - using merge hints to create 'faster path' flows and tracking stats etc.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b6ed55cb
    • John Hurley's avatar
      nfp: flower: offload merge flows · 8af56f40
      John Hurley authored
      A merge flow is formed from 2 sub flows. The match fields of the merge are
      the same as the first sub flow that has formed it, with the actions being
      a combination of the first and second sub flow. Therefore, a merge flow
      should replace sub flow 1 when offloaded.
      
      Offload valid merge flows by using a new 'flow mod' message type to
      replace an existing offloaded rule. Track the deletion of sub flows that
      are linked to a merge flow and revert offloaded merge rules if required.
      Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
      Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8af56f40
    • John Hurley's avatar
      nfp: flower: support stats update for merge flows · aa6ce2ea
      John Hurley authored
      With the merging of 2 sub flows, a new 'merge' flow will be created and
      written to FW. The TC layer is unaware that the merge flow exists and will
      request stats from the sub flows. Conversely, the FW treats a merge rule
      the same as any other rule and sends stats updates to the NFP driver.
      
      Add links between merge flows and their sub flows. Use these links to pass
      merge flow stats updates from FW to the underlying sub flows, ensuring TC
      stats requests are handled correctly. The updating of sub flow stats is
      done on (the less time critcal) TC stats requests rather than on FW stats
      update.
      Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
      Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aa6ce2ea
    • John Hurley's avatar
      nfp: flower: generate merge flow rule · 1c6952ca
      John Hurley authored
      When combining 2 sub_flows to a single 'merge flow' (assuming the merge is
      valid), the merge flow should contain the same match fields as sub_flow 1
      with actions derived from a combination of sub_flows 1 and 2. This action
      list should have all actions from sub_flow 1 with the exception of the
      output action that triggered the 'implicit recirculation' by sending to
      an internal port, followed by all actions of sub_flow 2. Any pre-actions
      in either sub_flow should feature at the start of the action list.
      
      Add code to generate a new merge flow and populate the match and actions
      fields based on the sub_flows. The offloading of the flow is left to
      future patches.
      Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
      Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1c6952ca
    • John Hurley's avatar
      nfp: flower: validate merge hint flows · 107e37bb
      John Hurley authored
      Two flows can be merged if the second flow (after recirculation) matches
      on bits that are either matched on or explicitly set by the first flow.
      This means that if a packet hits flow 1 and recirculates then it is
      guaranteed to hit flow 2.
      
      Add a 'can_merge' function that determines if 2 sub_flows in a merge hint
      can be validly merged to a single flow.
      Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
      Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      107e37bb
    • John Hurley's avatar
      nfp: flower: handle merge hint messages · dbc2d68e
      John Hurley authored
      If a merge hint is received containing 2 flows that are matched via an
      implicit recirculation (sending to and matching on an internal port), fw
      reports that the flows (called sub_flows) may be able to be combined to a
      single flow.
      
      Add infastructure to accept and process merge hint messages. The actual
      merging of the flows is left as a stub call.
      Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
      Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dbc2d68e