pktgen: Specify the index of first thread

Use "-f <num>", to specify the index of the first
sender thread.
In default first thread is #0.

Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Tariq Toukan
2017-06-15 19:07:22 +03:00
committed by David S. Miller
parent 69137ea60c
commit e0e16672ee
8 changed files with 27 additions and 18 deletions

View File

@@ -33,7 +33,7 @@ fi
pg_ctrl "reset"
# Threads are specified with parameter -t value in $THREADS
for ((thread = 0; thread < $THREADS; thread++)); do
for ((thread = $F_THREAD; thread <= $L_THREAD; thread++)); do
# The device name is extended with @name, using thread number to
# make then unique, but any name will do.
dev=${DEV}@${thread}
@@ -71,7 +71,7 @@ pg_ctrl "start"
echo "Done" >&2
# Print results
for ((thread = 0; thread < $THREADS; thread++)); do
for ((thread = $F_THREAD; thread <= $L_THREAD; thread++)); do
dev=${DEV}@${thread}
echo "Device: $dev"
cat /proc/net/pktgen/$dev | grep -A2 "Result:"