1. 16 Mar, 2021 18 commits
  2. 15 Mar, 2021 20 commits
  3. 14 Mar, 2021 2 commits
    • David S. Miller's avatar
      Merge branch 'psample-Add-additional-metadata-attributes' · 2117fce8
      David S. Miller authored
      Ido Schimmel says:
      
      ====================
      psample: Add additional metadata attributes
      
      This series extends the psample module to expose additional metadata to
      user space for packets sampled via act_sample. The new metadata (e.g.,
      transit delay) can then be consumed by applications such as hsflowd [1]
      for better network observability.
      
      netdevsim is extended with a dummy psample implementation that
      periodically reports "sampled" packets to the psample module. In
      addition to testing of the psample module, it enables the development
      and demonstration of user space applications (e.g., hsflowd) that are
      interested in the new metadata even without access to specialized
      hardware (e.g., Spectrum ASIC) that can provide it.
      
      mlxsw is also extended to provide the new metadata to psample.
      
      A Wireshark dissector for psample netlink packets [2] will be submitted
      upstream after the kernel patches are accepted. In addition, a libpcap
      capture module for psample is currently in the works. Eventually, users
      should be able to run:
      
       # tshark -i psample
      
      In order to consume sampled packets along with their metadata.
      
      Series overview:
      
      Patch #1 makes it easier to extend the metadata provided to psample
      
      Patch #2 adds the new metadata attributes to psample
      
      Patch #3 extends netdevsim to periodically report "sampled" packets to
      psample. Various debugfs knobs are added to control the reporting
      
      Patch #4 adds a selftest over netdevsim
      
      Patches #5-#10 gradually add support for the new metadata in mlxsw
      
      Patch #11 adds a selftest over mlxsw
      
      [1] https://sflow.org/draft4_sflow_transit.txt
      [2] https://gitlab.com/amitcohen1/wireshark/-/commit/3d711143024e032aef1b056dd23f0266c54fab56
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2117fce8
    • Ido Schimmel's avatar
      selftests: mlxsw: Add tc sample tests · bb24d592
      Ido Schimmel authored
      Test that packets are sampled when tc-sample is used and that reported
      metadata is correct. Two sets of hosts (with and without LAG) are used,
      since metadata extraction in mlxsw is a bit different when LAG is
      involved.
      
       # ./tc_sample.sh
       TEST: tc sample rate (forward)                                      [ OK ]
       TEST: tc sample rate (local receive)                                [ OK ]
       TEST: tc sample maximum rate                                        [ OK ]
       TEST: tc sample group conflict test                                 [ OK ]
       TEST: tc sample iif                                                 [ OK ]
       TEST: tc sample lag iif                                             [ OK ]
       TEST: tc sample oif                                                 [ OK ]
       TEST: tc sample lag oif                                             [ OK ]
       TEST: tc sample out-tc                                              [ OK ]
       TEST: tc sample out-tc-occ                                          [ OK ]
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bb24d592