1. 09 4月, 2021 10 次提交
  2. 08 4月, 2021 26 次提交
  3. 07 4月, 2021 4 次提交
    • C
      net/mlx5e: TC, Add support to offload sample action · f94d6389
      Chris Mi 提交于
      The following diagram illustrates the hardware model for tc sample action:
      
              +---------------------+
              + original flow table +
              +---------------------+
              +   original match    +
              +---------------------+
                         |
                         v
      +------------------------------------------------+
      +                Flow Sampler Object             +
      +------------------------------------------------+
      +                    sample ratio                +
      +------------------------------------------------+
      +    sample table id    |    default table id    +
      +------------------------------------------------+
                 |                            |
                 v                            v
      +-----------------------------+  +----------------------------------------+
      +        sample table         +  + default table per <vport, chain, prio> +
      +-----------------------------+  +----------------------------------------+
      + forward to management vport +  +            original match              +
      +-----------------------------+  +----------------------------------------+
                                       +            other actions               +
                                       +----------------------------------------+
      
      The sample action is translated to a goto flow table object
      destination which samples packets according to the provided
      sample ratio. Sampled packets are duplicated. One copy is
      processed by a termination table, named the sample table,
      which sends the packet to the eswitch manager port (that will
      be processed by software).
      
      The second copy is processed by the default table which executes
      the subsequent actions. The default table is created per <vport,
      chain, prio> tuple as rules with different prios and chains may
      overlap.
      Signed-off-by: NChris Mi <cmi@nvidia.com>
      Reviewed-by: NOz Shlomo <ozsh@nvidia.com>
      Reviewed-by: NMark Bloch <mbloch@nvidia.com>
      Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
      f94d6389
    • C
      net/mlx5e: TC, Handle sampled packets · be9dc004
      Chris Mi 提交于
      Mark the sampled packets with a sample restore object. Send sampled
      packets using the psample api.
      Signed-off-by: NChris Mi <cmi@nvidia.com>
      Reviewed-by: NOz Shlomo <ozsh@nvidia.com>
      Reviewed-by: NMark Bloch <mbloch@nvidia.com>
      Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
      be9dc004
    • C
      net/mlx5e: TC, Refactor tc update skb function · 7319a1cc
      Chris Mi 提交于
      As a pre-step to process sampled packet in this function.
      Signed-off-by: NChris Mi <cmi@nvidia.com>
      Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
      7319a1cc
    • C
      net/mlx5e: TC, Add sampler restore handle API · 36a31962
      Chris Mi 提交于
      Use common object pool to create an object ID to map sample parameters.
      Allocate a modify header action to write the object ID to reg_c0 lower
      16 bits. Create a restore rule to pass the object ID to software. So
      software can identify sampled packets via the object ID and send it to
      userspace.
      
      Aggregate the modify header action, restore rule and object ID to a
      sample restore handle. Re-use identical sample restore handle for
      the same object ID.
      Signed-off-by: NChris Mi <cmi@nvidia.com>
      Reviewed-by: NOz Shlomo <ozsh@nvidia.com>
      Reviewed-by: NMark Bloch <mbloch@nvidia.com>
      Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
      36a31962