summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2016-02-19 15:53:26 -0800
committerBen Pfaff <blp@ovn.org>2016-02-19 16:15:45 -0800
commitbdcad671e088d454a807072d07b8314f9860fdbc (patch)
tree34abe71ba7e00d5123a20e22f014c2a7df71b7a4 /tests
parent4adaf1828a88e0859f1eab1074216da9ba82a71a (diff)
downloadopenvswitch-bdcad671e088d454a807072d07b8314f9860fdbc.tar.gz
Support userdata in NXT_PACKET_IN2.
Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Jarno Rajahalme <jarno@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/ofp-actions.at7
-rw-r--r--tests/ofp-print.at7
-rw-r--r--tests/ofproto.at7
3 files changed, 16 insertions, 5 deletions
diff --git a/tests/ofp-actions.at b/tests/ofp-actions.at
index f3e5277e3..e16de3273 100644
--- a/tests/ofp-actions.at
+++ b/tests/ofp-actions.at
@@ -113,6 +113,13 @@ ffff 0010 00002320 0013 000a 0014 0000
# actions=controller(reason=invalid_ttl,max_len=1234,id=5678)
ffff 0010 00002320 0014 04d2 162e 02 00
+# actions=controller(reason=invalid_ttl,max_len=1234,id=5678,userdata=01.02.03.04.05)
+ffff 0038 00002320 0025 000000000000 dnl
+0000 0008 04d2 0000 dnl
+0001 0008 162e 0000 dnl
+0002 0005 02 000000 dnl
+0003 0009 0102030405 00000000000000
+
# actions=dec_ttl(32768,12345,90,765,1024)
ffff 0020 00002320 0015 000500000000 80003039005A02fd 0400000000000000
diff --git a/tests/ofp-print.at b/tests/ofp-print.at
index 54980fca7..10ec04bbf 100644
--- a/tests/ofp-print.at
+++ b/tests/ofp-print.at
@@ -2849,7 +2849,7 @@ AT_CLEANUP
AT_SETUP([NX_PACKET_IN2])
AT_KEYWORDS([ofp-print])
AT_CHECK([ovs-ofctl ofp-print "
-01 04 0088 00000000 00002320 0000001e
+01 04 0098 00000000 00002320 0000001e
0000 0034
82 82 82 82 82 82 80 81 81 81 81 81 81 00 00 50
08 00 45 00 00 28 00 00 00 00 00 06 32 05 53 53
@@ -2859,9 +2859,12 @@ AT_CHECK([ovs-ofctl ofp-print "
0003 0005 07 000000
0004 0010 00000000 fedcba9876543210
0005 0005 01 000000
-0006 0010 80000408 5a5a5a5a5a5a5a5a"
+0006 0010 80000408 5a5a5a5a5a5a5a5a
+0007 0009 0102030405 00000000000000
+"
], [0], [dnl
NXT_PACKET_IN2 (xid=0x0): table_id=7 cookie=0xfedcba9876543210 total_len=64 metadata=0x5a5a5a5a5a5a5a5a (via action) data_len=48 buffer=0x00000114
+ userdata=01.02.03.04.05
ip,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=0.0.0.0,nw_dst=0.0.0.0,nw_proto=0,nw_tos=0,nw_ecn=0,nw_ttl=0
])
AT_CLEANUP
diff --git a/tests/ofproto.at b/tests/ofproto.at
index d036a2015..bede254f8 100644
--- a/tests/ofproto.at
+++ b/tests/ofproto.at
@@ -3353,8 +3353,8 @@ OFPT_BARRIER_REPLY (OF1.1):
OVS_VSWITCHD_STOP
AT_CLEANUP
-dnl This test checks that metadata is encoded in NXT_PACKET_IN2.
-AT_SETUP([ofproto - packet-out with metadata (NXT_PACKET_IN2)])
+dnl This test checks that metadata and userdata are encoded in NXT_PACKET_IN2.
+AT_SETUP([ofproto - packet-out with metadata and userdata (NXT_PACKET_IN2)])
OVS_VSWITCHD_START
# Start a monitor listening for packet-ins.
@@ -3365,7 +3365,7 @@ ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
AT_CAPTURE_FILE([monitor.log])
# Send a packet-out with a load action to set some metadata, and forward to controller
-AT_CHECK([ovs-ofctl packet-out br0 controller 'load(0xfafafafa5a5a5a5a->OXM_OF_METADATA[[0..63]]), load(0xaa->NXM_NX_PKT_MARK[[]]), controller' '0001020304050010203040501234'])
+AT_CHECK([ovs-ofctl packet-out br0 controller 'load(0xfafafafa5a5a5a5a->OXM_OF_METADATA[[0..63]]), load(0xaa->NXM_NX_PKT_MARK[[]]), controller(userdata=01.02.03.04.05)' '0001020304050010203040501234'])
# Stop the monitor and check its output.
ovs-appctl -t ovs-ofctl ofctl/barrier
@@ -3373,6 +3373,7 @@ ovs-appctl -t ovs-ofctl exit
AT_CHECK([sed 's/ (xid=0x[[0-9a-fA-F]]*)//' monitor.log], [0], [dnl
NXT_PACKET_IN2: total_len=14 pkt_mark=0xaa,metadata=0xfafafafa5a5a5a5a,in_port=CONTROLLER (via action) data_len=14 (unbuffered)
+ userdata=01.02.03.04.05
vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234
OFPT_BARRIER_REPLY:
])