]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - samples/pktgen/pktgen_sample02_multiqueue.sh
samples: Add an IPv6 '-6' option to the pktgen scripts
[mirror_ubuntu-artful-kernel.git] / samples / pktgen / pktgen_sample02_multiqueue.sh
index 32467aea8e47848dde1ba77d5ac722c520720a2e..c88a161d3e6f6d7a612a147d6c340d867b58e58c 100755 (executable)
@@ -23,7 +23,9 @@ UDP_MIN=9
 UDP_MAX=109
 
 # (example of setting default params in your script)
-[ -z "$DEST_IP" ] && DEST_IP="198.18.0.42"
+if [ -z "$DEST_IP" ]; then
+    [ -z "$IP6" ] && DEST_IP="198.18.0.42" || DEST_IP="FD00::1"
+fi
 [ -z "$DST_MAC" ] && DST_MAC="90:e2:ba:ff:ff:ff"
 
 # General cleanup everything since last run
@@ -54,7 +56,7 @@ for ((thread = 0; thread < $THREADS; thread++)); do
 
     # Destination
     pg_set $dev "dst_mac $DST_MAC"
-    pg_set $dev "dst $DEST_IP"
+    pg_set $dev "dst$IP6 $DEST_IP"
 
     # Setup random UDP port src range
     pg_set $dev "flag UDPSRC_RND"