mbox series

[v2,net-next,0/2] pktgen: scripts improvements

Message ID 20210211155626.25213-1-irusskikh@marvell.com
Headers show
Series pktgen: scripts improvements | expand

Message

Igor Russkikh Feb. 11, 2021, 3:56 p.m. UTC
Hello netdev community,

Please consider small improvements to pktgen scripts we use in our environment.

Adding delay parameter through command line,
Adding new -a (append) parameter to make flex runs

v2: Review comments from Jesper

CC: Jesper Dangaard Brouer <brouer@redhat.com>

Igor Russkikh (2):
  samples: pktgen: allow to specify delay parameter via new opt
  samples: pktgen: new append mode

 samples/pktgen/README.rst                     | 18 +++++++++++
 samples/pktgen/functions.sh                   |  7 ++++-
 samples/pktgen/parameters.sh                  | 15 ++++++++-
 .../pktgen_bench_xmit_mode_netif_receive.sh   |  3 --
 .../pktgen_bench_xmit_mode_queue_xmit.sh      |  3 --
 samples/pktgen/pktgen_sample01_simple.sh      | 25 ++++++++-------
 samples/pktgen/pktgen_sample02_multiqueue.sh  | 29 +++++++++--------
 .../pktgen_sample03_burst_single_flow.sh      | 15 ++++-----
 samples/pktgen/pktgen_sample04_many_flows.sh  | 17 +++++-----
 .../pktgen/pktgen_sample05_flow_per_thread.sh | 17 +++++-----
 ...sample06_numa_awared_queue_irq_affinity.sh | 31 ++++++++++---------
 11 files changed, 110 insertions(+), 70 deletions(-)

Comments

Igor Russkikh Feb. 11, 2021, 5:39 p.m. UTC | #1
>> +    echo "  -w : (\$DELAY)     Tx Delay value (us)"
>This is not in "us" it is in "ns" (nanosec). (Like I pointed out last time...)

Ah, sorry lost that. Will fix.

One extra thing I wanted to raise is "set -o errexit" in functions.sh.
It basically contradicts with the usecase I'm using (doing source ./functions.sh).
After that, any error in current shell makes it to quit.

Honestly, for my tests, I do always disable that line.

  Igor
Jesper Dangaard Brouer Feb. 12, 2021, 7:09 a.m. UTC | #2
On Thu, 11 Feb 2021 17:39:35 +0000
Igor Russkikh <irusskikh@marvell.com> wrote:

> >> +    echo "  -w : (\$DELAY)     Tx Delay value (us)"  

> >This is not in "us" it is in "ns" (nanosec). (Like I pointed out last time...)  

> 

> Ah, sorry lost that. Will fix.


Also remember that you made similar mistake in next patch.
When adding documentation in samples/pktgen/README.rst.
Strictly speaking, the doc update for DELAY belongs in patch-1.


> One extra thing I wanted to raise is "set -o errexit" in functions.sh.

> It basically contradicts with the usecase I'm using (doing source ./functions.sh).

> After that, any error in current shell makes it to quit.


Cc. Daniel T. Lee, can you remember why this 'errexit' was added?

> Honestly, for my tests, I do always disable that line.


In your shell script, using "append", you can disable that shell
feature in your script (instead of removing the line from functions.sh).

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer