WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] [XM-TEST] Use explicit (IP id==packet size) on hping

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] [XM-TEST] Use explicit (IP id==packet size) on hping2 tests to avoid problems with IP id==0
From: James Dykman <dykman@xxxxxxxxxx>
Date: Thu, 18 May 2006 16:04:37 -0400
Delivery-date: Thu, 18 May 2006 13:05:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
We have run into some xm-test network test failures in the tests that use 
hping2 that are caused by an IP id of 0:

- hping2 uses a packet socket, so must do its own fragmentation when 
sending messages >1500 bytes.
- When fragmenting, hping2 uses the low byte of the PID as the IP id in 
each of the fragmented IP headers.
- The kernel will assign an IP id if it sees the IP id ==  0 in the header 
that hping2 passes down 
   (net/ipv4/raw.c:raw_send_hdrinc())
So if the low byte of the PID is 0, every fragment will get assigned a 
unique IP id by the kernel, and 
reassembly will fail at the destination.

Jim
----------------------------------
Use explicit (IP id==packet size) on hping2 tests to avoid problems with 
IP id==0

Signed-off-by: Jim Dykman <dykman@xxxxxxxxxx>

diff -r dc213d745642 
tools/xm-test/tests/network/03_network_local_tcp_pos.py
--- a/tools/xm-test/tests/network/03_network_local_tcp_pos.py   Mon May 15 
15:32:09 2006
+++ b/tools/xm-test/tests/network/03_network_local_tcp_pos.py   Thu May 18 
14:19:01 2006
@@ -44,7 +44,7 @@
     lofails=""
     for size in trysizes:
         out = console.runCmd("hping2 127.0.0.1 -E /dev/urandom -q -c 20 "
-              + "--fast -d " + str(size))
+              + "--fast -d " + str(size) + " -N " + str(size))
         if out["return"]:
             lofails += " " + str(size)

@@ -54,7 +54,7 @@
     ip = netdev.getNetDevIP()
     for size in trysizes:
         out = console.runCmd("hping2 " + ip + " -E /dev/urandom -q -c 20 
"
-              + "--fast -d "+ str(size))
+              + "--fast -d "+ str(size) + " -N " + str(size))
         if out["return"]:
             eth0fails += " " + str(size)
 except ConsoleError, e:
diff -r dc213d745642 
tools/xm-test/tests/network/04_network_local_udp_pos.py
--- a/tools/xm-test/tests/network/04_network_local_udp_pos.py   Mon May 15 
15:32:09 2006
+++ b/tools/xm-test/tests/network/04_network_local_udp_pos.py   Thu May 18 
14:19:01 2006
@@ -43,7 +43,7 @@
     lofails=""
     for size in trysizes:
         out = console.runCmd("hping2 127.0.0.1 -E /dev/urandom -2 -q -c 
20 "
-              + "--fast -d " + str(size))
+              + "--fast -d " + str(size) + " -N " + str(size))
         if out["return"]:
             lofails += " " + str(size)
             print out["output"]
@@ -54,7 +54,7 @@
     ip = netdev.getNetDevIP()
     for size in trysizes:
         out = console.runCmd("hping2 " + ip + " -E /dev/urandom -2 -q -c 
20 "
-              + "--fast -d " + str(size))
+              + "--fast -d " + str(size) + " -N " + str(size))
         if out["return"]:
             eth0fails += " " + str(size)
             print out["output"]
diff -r dc213d745642 
tools/xm-test/tests/network/06_network_dom0_tcp_pos.py 
--- a/tools/xm-test/tests/network/06_network_dom0_tcp_pos.py    Mon May 15 
15:32:09 2006
+++ b/tools/xm-test/tests/network/06_network_dom0_tcp_pos.py    Thu May 18 
14:19:01 2006
@@ -44,7 +44,7 @@
     dom0ip = netdev.getDom0AliasIP()
     for size in trysizes:
         out = console.runCmd("hping2 " + dom0ip + " -E /dev/urandom -q -c 
20 "
-              + "--fast -d " + str(size))
+              + "--fast -d " + str(size) + " -N " + str(size))
         if out["return"]:
             fails += " " + str(size)
             print out["output"]
diff -r dc213d745642 
tools/xm-test/tests/network/07_network_dom0_udp_pos.py
--- a/tools/xm-test/tests/network/07_network_dom0_udp_pos.py    Mon May 15 
15:32:09 2006
+++ b/tools/xm-test/tests/network/07_network_dom0_udp_pos.py    Thu May 18 
14:19:01 2006
@@ -43,7 +43,7 @@
     dom0ip = netdev.getDom0AliasIP()
     for size in trysizes:
         out = console.runCmd("hping2 " + dom0ip + " -E /dev/urandom -2 -q 
-c 20"
-             + " --fast -d " + str(size))
+             + " --fast -d " + str(size) + " -N " + str(size))
         if out["return"]:
             fails += " " + str(size)
             print out["output"]
diff -r dc213d745642 
tools/xm-test/tests/network/12_network_domU_tcp_pos.py
--- a/tools/xm-test/tests/network/12_network_domU_tcp_pos.py    Mon May 15 
15:32:09 2006
+++ b/tools/xm-test/tests/network/12_network_domU_tcp_pos.py    Thu May 18 
14:19:01 2006
@@ -50,7 +50,7 @@
     ip2 = dst_netdev.getNetDevIP()
     for size in pingsizes:
         out = src_console.runCmd("hping2 " + ip2 + " -E /dev/urandom -q 
-c 20 "
-              + "--fast -d " + str(size))
+              + "--fast -d " + str(size) + " -N " + str(size))
         if out["return"]:
             fails += " " + str(size)
             print out["output"]
diff -r dc213d745642 
tools/xm-test/tests/network/13_network_domU_udp_pos.py
--- a/tools/xm-test/tests/network/13_network_domU_udp_pos.py    Mon May 15 
15:32:09 2006
+++ b/tools/xm-test/tests/network/13_network_domU_udp_pos.py    Thu May 18 
14:19:01 2006
@@ -50,7 +50,7 @@
     ip2 = dst_netdev.getNetDevIP()
     for size in pingsizes:
         out = src_console.runCmd("hping2 " + ip2 + " -E /dev/urandom -2 
-q "
-              + "-c 20 --fast -d " + str(size))
+              + "-c 20 --fast -d " + str(size) + " -N " + str(size))
         if out["return"]:
             fails += " " + str(size)
             print out["output"]




Attachment: ipid.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel