1. 26 Aug, 2021 31 commits
  2. 25 Aug, 2021 9 commits
    • David S. Miller's avatar
      Merge branch 'pktgen-samples-next' · e3f30ab2
      David S. Miller authored
      Juhee Kang says:
      
      ====================
      samples: pktgen: enhance the ability to print the execution results of samples
      
      This patch series improves the ability to print the execution result of pktgen
      samples by adding a line which calls the function before termination and adding
      trap SIGINT. Also, this series documents the latest pktgen usage options.
      
      Currently, pktgen samples print the execution result when terminated usually.
      However, sample03 is not working properly.
      
      This is results of sample04 and sample03:
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample04_many_flows.sh -n 1
          Running... ctrl^C to stop
          Device: eth0@0
          Result: OK: 19(c5+d13) usec, 1 (60byte,0frags)
          51762pps 24Mb/sec (24845760bps) errors: 0
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample03_burst_single_flow.sh -n 1
          Running... ctrl^C to stop
      
      Because sample03 doesn't call the function which prints the execution result
      when terminated normally, unlike other samples. So the first commit solves
      this issue by adding a line which calls the function before termination.
      
      Also, all pktgen samples are able to send infinite messages per thread by
      setting the count option to 0, and pktgen is stopped by Ctrl-C. However,
      the sample besides sample{3...5} don't work appropriately because Ctrl-C stops
      the script, not just pktgen.
      
      This is results of samples:
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample04_many_flows.sh -n 0
          Running... ctrl^C to stop
          ^CDevice: eth0@0
          Result: OK: 569657(c569538+d118) usec, 84650 (60byte,0frags)
          148597pps 71Mb/sec (71326560bps) errors: 0
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample01_simple.sh -n 0
          Running... ctrl^C to stop
          ^C
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample02_multiqueue.sh -n 0
          Running... ctrl^C to stop
          ^C
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample06_numa_awared_queue_irq_affinity.sh -n 0
          Running... ctrl^C to stop
          ^C
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_bench_xmit_mode_netif_receive.sh -n 0
          Running... ctrl^C to stop
          ^C
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_bench_xmit_mode_queue_xmit.sh -n 0
          Running... ctrl^C to stop
          ^C
      
      So the second commit solves this issue by adding trap SIGINT. Also, changes
      control_c function to print_results to maintain consistency with other samples
      on the first commit and second commit.
      
      And current pktgen.rst documentation doesn't add the latest pktgen sample
      usage options such as count and IPv6, and so on. Also, the old pktgen
      sample scripts are still included in the document. The old scripts were removed
      by the commit a4b6ade8 ("samples/pktgen: remove remaining old pktgen
      sample scripts").
      
      Thus, the last commit documents the latest pktgen sample usage and removes
      old sample scripts. And fixes a minor typo.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e3f30ab2
    • Juhee Kang's avatar
      pktgen: document the latest pktgen usage options · 246b184f
      Juhee Kang authored
      Currently, the pktgen.rst documentation doesn't cover the latest pktgen
      sample usage options such as count and IPv6, and so on. Also, this
      documentation includes the old sample scripts which are no longer use
      because it was removed by the commit a4b6ade8 ("samples/pktgen :
      remove remaining old pktgen sample scripts")
      
      Thus, this commit documents pktgen sample usage using the latest options
      and removes old sample scripts, and fixes a minor typo.
      Signed-off-by: default avatarJuhee Kang <claudiajkang@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      246b184f
    • Juhee Kang's avatar
      samples: pktgen: add trap SIGINT for printing execution result · 6c882bdc
      Juhee Kang authored
      All pktgen samples can send indefinitely num messages per thread by
      setting the count option to 0(-n 0). If running sample with setting
      count 0 and press Ctrl-C to stop this program, the program prints the
      result of the execution so far. Currently, the samples besides
      sample{3...5} don't work properly. Because Ctrl-C stops the script, not
      just pktgen.
      
      This is results of samples:
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample04_many_flows.sh -n 0
          Running... ctrl^C to stop
          ^CDevice: eth0@0
          Result: OK: 569657(c569538+d118) usec, 84650 (60byte,0frags)
          148597pps 71Mb/sec (71326560bps) errors: 0
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample01_simple.sh -n 0
          Running... ctrl^C to stop
          ^C
      
      In order to solve this, this commit adds trap SIGINT. Also, this commit
      changes control_c function to print_result to maintain consistency with
      other samples.
      Signed-off-by: default avatarJuhee Kang <claudiajkang@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6c882bdc
    • Juhee Kang's avatar
      samples: pktgen: fix to print when terminated normally · c0e9422c
      Juhee Kang authored
      Currently, most pktgen samples print the execution result when the
      program is terminated normally. However, sample03 doesn't work
      appropriately.
      
      This is results of samples:
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample04_many_flows.sh -n 1
          Running... ctrl^C to stop
          Device: eth0@0
          Result: OK: 19(c5+d13) usec, 1 (60byte,0frags)
          51762pps 24Mb/sec (24845760bps) errors: 0
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample03_burst_single_flow.sh -n 1
          Running... ctrl^C to stop
      
      The reason why it doesn't print the execution result when the program is
      terminated usually is that sample03 doesn't call the function which
      prints the result, unlike other samples.
      
      So, this commit solves this issue by calling the function before
      termination. Also, this commit changes control_c function to
      print_result to maintain consistency with other samples.
      Signed-off-by: default avatarJuhee Kang <claudiajkang@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c0e9422c
    • David S. Miller's avatar
      Merge branch 'octeontx2-traffic-shaping' · 9270c565
      David S. Miller authored
      Sunil Goutham says:
      
      ====================
      Octeontx2: Traffic shaping and SDP link config support
      
      This patch series adds support for traffic shaping configuration
      on all silicons available after 96xx C0. And also adds SDP link
      related configuration needed when Octeon is connected as an end-point
      and traffic needs to flow from end-point to host and vice versa.
      
      Series also has other changes like
      - New mbox messages in admin function driver for PF/VF drivers
        to retrieve available HW resource count. HW resources like block LFs,
        bandwidth profiles etc are covered.
      - Added PTP device ID for new CN10K and 95O silicons.
      - etc
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9270c565
    • Sunil Goutham's avatar
      octeontx2-af: Add mbox to retrieve bandwidth profile free count · 66c312ea
      Sunil Goutham authored
      Added mbox for PF/VF drivers to retrieve current ingress bandwidth
      profile free count. Also added current policer timeunit
      configuration info based on which ratelimiting decisions can be
      taken by PF/VF drivers.
      Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      66c312ea
    • Sunil Goutham's avatar
      octeontx2-af: Remove channel verification while installing MCAM rules · 18603683
      Sunil Goutham authored
      New usecases are popping up where in user wants to install common MCAM
      filters for all interfaces. Having channel verification will result in
      duplicating such MCAM filters for each of the ingress interface. Hence
      removed channel verification.
      Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      18603683
    • Subbaraya Sundeep's avatar
      octeontx2-af: Add PTP device id for CN10K and 95O silcons · a8b90c9d
      Subbaraya Sundeep authored
      CN10K slicon has different device id for PTP device.
      Hence this patch updates the driver with new id.
      Though ptp driver being a separate driver AF manages
      configuring PTP block by all PFs. To manage ptp, AF
      driver checks in its probe whether
      1. ptp hardware device found on silicon
      2. A driver is bound to ptp device
      3. The ptp driver probe is successful
      
      In failure of cases 1 and 3, AF proceeds with out ptp
      and for case 2 defers the probe. This patch refactors
      code also to check for all the PTP device ids given in
      ptp device ids table for case 1.
      
      Also added PTP device ID for 95O silicon
      Signed-off-by: default avatarSubbaraya Sundeep <sbhatta@marvell.com>
      Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a8b90c9d
    • George Cherian's avatar
      octeontx2-af: Add free rsrc count mbox msg · 275e5d17
      George Cherian authored
      Upon receiving the MBOX_MSG_FREE_RSRC_CNT, the AF will find out the
      current number of free resources and reply it back to the requester. No
      guarantee is given on the future state of the free resources yet.
      If another requester sends MBOX_MSG_ATTACH_RESOURCES after this call,
      the number of available resources might change.
      Signed-off-by: default avatarGeorge Cherian <george.cherian@marvell.com>
      Signed-off-by: default avatarStanislaw Kardach <skardach@marvell.com>
      Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      275e5d17