1. 23 Aug, 2019 3 commits
  2. 22 Aug, 2019 32 commits
  3. 21 Aug, 2019 5 commits
    • Vlad Buslov's avatar
      net/mlx5e: Add trace point for neigh update · 5970882a
      Vlad Buslov authored
      Allow tracing neigh state during neigh update task that is executed on
      workqueue and is scheduled by neigh state change event.
      
      Usage example:
       ># cd /sys/kernel/debug/tracing
       ># echo mlx5:mlx5e_rep_neigh_update >> set_event
       ># cat trace
          ...
          kworker/u48:7-2221  [009] ...1  1475.387435: mlx5e_rep_neigh_update:
      netdev: ens1f0 MAC: 24:8a:07:9a:17:9a IPv4: 1.1.1.10 IPv6: ::ffff:1.1.1.10 neigh_connected=1
      
      Added corresponding documentation in
          Documentation/networking/device-driver/mellanox/mlx5.rst
      Signed-off-by: default avatarVlad Buslov <vladbu@mellanox.com>
      Reviewed-by: default avatarDmytro Linkin <dmitrolin@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      5970882a
    • Vlad Buslov's avatar
      net/mlx5e: Add trace point for neigh used value update · c786fe59
      Vlad Buslov authored
      Allow tracing result of neigh used value update task that is executed
      periodically on workqueue.
      
      Usage example:
       ># cd /sys/kernel/debug/tracing
       ># echo mlx5:mlx5e_tc_update_neigh_used_value >> set_event
       ># cat trace
          ...
          kworker/u48:4-8806  [009] ...1 55117.882428: mlx5e_tc_update_neigh_used_value:
      netdev: ens1f0 IPv4: 1.1.1.10 IPv6: ::ffff:1.1.1.10 neigh_used=1
      
      Added corresponding documentation in
          Documentation/networking/device-driver/mellanox/mlx5.rst
      Signed-off-by: default avatarVlad Buslov <vladbu@mellanox.com>
      Reviewed-by: default avatarDmytro Linkin <dmitrolin@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      c786fe59
    • Dmytro Linkin's avatar
      net/mlx5e: Add tc flower tracepoints · 7a978759
      Dmytro Linkin authored
      Implemented following tracepoints:
      1. Configure flower (mlx5e_configure_flower)
      2. Delete flower (mlx5e_delete_flower)
      3. Stats flower (mlx5e_stats_flower)
      
      Usage example:
       ># cd /sys/kernel/debug/tracing
       ># echo mlx5:mlx5e_configure_flower >> set_event
       ># cat trace
          ...
          tc-6535  [019] ...1  2672.404466: mlx5e_configure_flower: cookie=0000000067874a55 actions= REDIRECT
      
      Added corresponding documentation in
          Documentation/networking/device-driver/mellanox/mlx5.rst
      Signed-off-by: default avatarDmytro Linkin <dmitrolin@mellanox.com>
      Reviewed-by: default avatarVlad Buslov <vladbu@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      7a978759
    • Vlad Buslov's avatar
      net/mlx5e: Only access fully initialized flows in neigh update · 95435ad7
      Vlad Buslov authored
      To remove dependency on rtnl lock and prevent neigh update code from
      accessing uninitialized flows when executing concurrently with tc, extend
      mlx5e_tc_flow with 'init_done' completion. Modify helper
      mlx5e_take_all_encap_flows() to wait for flow completion after obtaining
      reference to it. Modify mlx5e_tc_encap_flows_del() and
      mlx5e_tc_encap_flows_add() to skip flows that don't have OFFLOADED flag
      set, which can happen if concurrent flow initialization failed.
      
      This commit finishes neigh update refactoring for concurrent execution
      started in previous change in this series.
      Signed-off-by: default avatarVlad Buslov <vladbu@mellanox.com>
      Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      95435ad7
    • Vlad Buslov's avatar
      net/mlx5e: Refactor neigh update for concurrent execution · 2a1f1768
      Vlad Buslov authored
      In order to remove dependency on rtnl lock and allow neigh update workqueue
      task to execute concurrently with tc, refactor mlx5e_rep_neigh_update() for
      concurrent execution:
      
      - Lock encap table when accessing encap entry to prevent concurrent
        changes. To do this properly, the initial encap state check is moved from
        mlx5e_rep_neigh_update() into mlx5e_rep_update_flows() to be performed
        under encap_tbl_lock protection.
      
      - Wait for encap to be fully initialized before accessing it by means of
        'res_ready' completion.
      
      - Add mlx5e_take_all_encap_flows() helper which is used to construct a
        temporary list of flows and efi indexes that is used to access current
        encap data in flow which can be attached to multiple encaps
        simultaneously. Release the flows from temporary list after
        encap_tbl_lock critical section. This is necessary because
        mlx5e_flow_put() can't be called while holding encap_tbl_lock.
      
      - Modify mlx5e_tc_encap_flows_add() and mlx5e_tc_encap_flows_del() to work
        with user-provided list of flows built by mlx5e_take_all_encap_flows(),
        instead of traversing encap flow list directly.
      
      This is first step in complex neigh update refactoring, which is finished
      by following commit in this series.
      Signed-off-by: default avatarVlad Buslov <vladbu@mellanox.com>
      Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      2a1f1768