1. 26 Aug, 2021 37 commits
  2. 25 Aug, 2021 3 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