Skip to content

Commit ac4df0c

Browse files
committed
nsh: Add support to compose-packet and use it in system tests.
OVS can parse NSH, but can't compose. Fix that and get rid of plain hex NSH packets in system tests as they are hard to read or modify. Tcpdump calls modified to write actual pcaps instead of text output, so ovs-pcap can be used while checking the results. While at it, replacing sleeps with more robust waiting for tcpdump to start listening. M4 macros are better than shell variables, because we can see the substitution result in the test log. So, using m4_define and m4_join extensively. Acked-by: Simon Horman <horms@ovn.org> Acked-by: Eelco Chaudron <echaudro@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
1 parent cd4ea33 commit ac4df0c

File tree

2 files changed

+134
-61
lines changed

2 files changed

+134
-61
lines changed

lib/flow.c

+18
Original file line numberDiff line numberDiff line change
@@ -3420,6 +3420,24 @@ flow_compose(struct dp_packet *p, const struct flow *flow,
34203420
arp->ar_sha = flow->arp_sha;
34213421
arp->ar_tha = flow->arp_tha;
34223422
}
3423+
} else if (flow->dl_type == htons(ETH_TYPE_NSH)) {
3424+
struct nsh_hdr *nsh;
3425+
3426+
nsh = dp_packet_put_zeros(p, sizeof *nsh);
3427+
dp_packet_set_l3(p, nsh);
3428+
3429+
nsh_set_flags_ttl_len(nsh, flow->nsh.flags, flow->nsh.ttl,
3430+
flow->nsh.mdtype == NSH_M_TYPE1
3431+
? NSH_M_TYPE1_LEN : NSH_BASE_HDR_LEN);
3432+
nsh->next_proto = flow->nsh.np;
3433+
nsh->md_type = flow->nsh.mdtype;
3434+
put_16aligned_be32(&nsh->path_hdr, flow->nsh.path_hdr);
3435+
3436+
if (flow->nsh.mdtype == NSH_M_TYPE1) {
3437+
for (size_t i = 0; i < 4; i++) {
3438+
put_16aligned_be32(&nsh->md1.context[i], flow->nsh.context[i]);
3439+
}
3440+
}
34233441
}
34243442

34253443
if (eth_type_mpls(flow->dl_type)) {

tests/system-traffic.at

+116-61
Original file line numberDiff line numberDiff line change
@@ -8920,21 +8920,29 @@ dnl The flow will encap a nsh header to the TCP syn packet
89208920
dnl eth/ip/tcp --> OVS --> eth/nsh/eth/ip/tcp
89218921
AT_CHECK([ovs-ofctl -Oopenflow13 add-flow br0 "table=0,priority=100,in_port=ovs-p0,ip,actions=encap(nsh(md_type=1)),set_field:0x1234->nsh_spi,set_field:0x11223344->nsh_c1,encap(ethernet),set_field:f2:ff:00:00:00:02->dl_dst,set_field:f2:ff:00:00:00:01->dl_src,ovs-p1"])
89228922

8923-
NETNS_DAEMONIZE([at_ns1], [tcpdump -l -n -xx -U -i p1 > p1.pcap], [tcpdump.pid])
8924-
sleep 1
8923+
NETNS_DAEMONIZE([at_ns1],
8924+
[tcpdump -l -n -xx -U -i p1 -w p1.pcap 2>tcpdump_err], [tcpdump.pid])
8925+
OVS_WAIT_UNTIL([grep "listening" tcpdump_err])
89258926

8926-
dnl The hex dump is a TCP syn packet. pkt=eth/ip/tcp
8927-
dnl The packet is sent from p0(at_ns0) interface directed to
8928-
dnl p1(at_ns1) interface
8929-
NS_CHECK_EXEC([at_ns0], [$PYTHON3 $srcdir/sendpkt.py p0 f2 00 00 00 00 02 f2 00 00 00 00 01 08 00 45 00 00 28 00 01 00 00 40 06 b0 13 c0 a8 00 0a 0a 00 00 0a 04 00 08 00 00 00 00 c8 00 00 00 00 50 02 20 00 b8 5e 00 00 > /dev/null])
8927+
m4_define([TCP_SYN_PKT], [m4_join([,],
8928+
[eth_src=f2:00:00:00:00:01,eth_dst=f2:00:00:00:00:02,eth_type=0x0800],
8929+
[nw_src=192.168.0.10,nw_dst=10.0.0.10],
8930+
[nw_proto=6,nw_ttl=64,nw_frag=no],
8931+
[tcp_src=1024,tcp_dst=2048,tcp_flags=syn])])
89308932

8931-
dnl Check the expected nsh encapsulated packet on the egress interface
8932-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0000: *f2ff *0000 *0002 *f2ff *0000 *0001 *894f *0fc6" 2>&1 1>/dev/null])
8933-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0010: *0103 *0012 *34ff *1122 *3344 *0000 *0000 *0000" 2>&1 1>/dev/null])
8934-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0020: *0000 *0000 *0000 *f200 *0000 *0002 *f200 *0000" 2>&1 1>/dev/null])
8935-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0030: *0001 *0800 *4500 *0028 *0001 *0000 *4006 *b013" 2>&1 1>/dev/null])
8936-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0040: *c0a8 *000a *0a00 *000a *0400 *0800 *0000 *00c8" 2>&1 1>/dev/null])
8937-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0050: *0000 *0000 *5002 *2000 *b85e *0000" 2>&1 1>/dev/null])
8933+
dnl Send the TCP SYN packet from p0(at_ns0) interface directed to
8934+
dnl p1(at_ns1) interface.
8935+
NS_CHECK_EXEC([at_ns0], [$PYTHON3 $srcdir/sendpkt.py p0 \
8936+
$(ovs-ofctl compose-packet --bare 'TCP_SYN_PKT')], [0], [ignore])
8937+
8938+
m4_define([NSH_HEADER], [m4_join([,],
8939+
[eth_src=f2:ff:00:00:00:01,eth_dst=f2:ff:00:00:00:02,eth_type=0x894f],
8940+
[nsh_ttl=63,nsh_np=3,nsh_spi=0x1234,nsh_si=255],
8941+
[nsh_mdtype=1,nsh_c1=0x11223344])])
8942+
8943+
OVS_WAIT_UNTIL([ovs-pcap p1.pcap | grep -q "m4_join([], [^],
8944+
$(ovs-ofctl compose-packet --bare 'NSH_HEADER'),
8945+
$(ovs-ofctl compose-packet --bare 'TCP_SYN_PKT'), [\$])"])
89388946

89398947
OVS_TRAFFIC_VSWITCHD_STOP
89408948
AT_CLEANUP
@@ -8952,19 +8960,31 @@ dnl The flow will decap a nsh header which in turn carries a TCP syn packet
89528960
dnl eth/nsh/eth/ip/tcp --> OVS --> eth/ip/tcp
89538961
AT_CHECK([ovs-ofctl -Oopenflow13 add-flow br0 "table=0,priority=100,in_port=ovs-p0,dl_type=0x894f, actions=decap(),decap(), ovs-p1"])
89548962

8955-
NETNS_DAEMONIZE([at_ns1], [tcpdump -l -n -xx -U -i p1 > p1.pcap], [tcpdump.pid])
8956-
sleep 1
8963+
NETNS_DAEMONIZE([at_ns1],
8964+
[tcpdump -l -n -xx -U -i p1 -w p1.pcap 2>tcpdump_err], [tcpdump.pid])
8965+
OVS_WAIT_UNTIL([grep "listening" tcpdump_err])
89578966

8958-
dnl The hex dump is NSH packet with TCP syn payload. pkt=eth/nsh/eth/ip/tcp
8959-
dnl The packet is sent from p0(at_ns0) interface directed to
8960-
dnl p1(at_ns1) interface
8961-
NS_CHECK_EXEC([at_ns0], [$PYTHON3 $srcdir/sendpkt.py p0 f2 ff 00 00 00 02 f2 ff 00 00 00 01 89 4f 02 06 01 03 00 00 64 03 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 f2 00 00 00 00 02 f2 00 00 00 00 01 08 00 45 00 00 28 00 01 00 00 40 06 b0 13 c0 a8 00 0a 0a 00 00 0a 04 00 08 00 00 00 00 c8 00 00 00 00 50 02 20 00 b8 5e 00 00 > /dev/null])
8967+
m4_define([TCP_SYN_PKT], [m4_join([,],
8968+
[eth_src=f2:00:00:00:00:01,eth_dst=f2:00:00:00:00:02,eth_type=0x0800],
8969+
[nw_src=192.168.0.10,nw_dst=10.0.0.10],
8970+
[nw_proto=6,nw_ttl=64,nw_frag=no],
8971+
[tcp_src=1024,tcp_dst=2048,tcp_flags=syn])])
8972+
8973+
m4_define([NSH_HEADER], [m4_join([,],
8974+
[eth_src=f2:ff:00:00:00:01,eth_dst=f2:ff:00:00:00:02,eth_type=0x894f],
8975+
[nsh_ttl=63,nsh_np=3,nsh_spi=0x1234,nsh_si=255],
8976+
[nsh_mdtype=1,nsh_c1=0x11223344])])
8977+
8978+
dnl Send the NSH packet with TCP SYN payload from p0(at_ns0) interface directed
8979+
dnl to p1(at_ns1) interface.
8980+
NS_CHECK_EXEC([at_ns0], [$PYTHON3 $srcdir/sendpkt.py p0 \
8981+
"$(ovs-ofctl compose-packet --bare 'NSH_HEADER')" \
8982+
"$(ovs-ofctl compose-packet --bare 'TCP_SYN_PKT')"],
8983+
[0], [ignore])
89628984

89638985
dnl Check the expected de-capsulated TCP packet on the egress interface
8964-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0000: *f200 *0000 *0002 *f200 *0000 *0001 *0800 *4500" 2>&1 1>/dev/null])
8965-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0010: *0028 *0001 *0000 *4006 *b013 *c0a8 *000a *0a00" 2>&1 1>/dev/null])
8966-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0020: *000a *0400 *0800 *0000 *00c8 *0000 *0000 *5002" 2>&1 1>/dev/null])
8967-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0030: *2000 *b85e *0000" 2>&1 1>/dev/null])
8986+
OVS_WAIT_UNTIL([ovs-pcap p1.pcap | grep -q \
8987+
"^$(ovs-ofctl compose-packet --bare 'TCP_SYN_PKT')\$"])
89688988

89698989
OVS_TRAFFIC_VSWITCHD_STOP
89708990
AT_CLEANUP
@@ -8984,22 +9004,38 @@ dnl The flow will add another NSH header with nsh_spi=0x101, nsh_si=4,
89849004
dnl nsh_ttl=7 and change the md1 context
89859005
AT_CHECK([ovs-ofctl -Oopenflow13 add-flow br0 "table=0,priority=100,in_port=ovs-p0,dl_type=0x894f,nsh_spi=0x100,nsh_si=0x03,actions=decap(),decap(),encap(nsh(md_type=1)),set_field:0x07->nsh_ttl,set_field:0x0101->nsh_spi,set_field:0x04->nsh_si,set_field:0x100f0e0d->nsh_c1,set_field:0x0c0b0a09->nsh_c2,set_field:0x08070605->nsh_c3,set_field:0x04030201->nsh_c4,encap(ethernet),set_field:f2:ff:00:00:00:02->dl_dst,set_field:f2:ff:00:00:00:01->dl_src,ovs-p1"])
89869006

8987-
NETNS_DAEMONIZE([at_ns1], [tcpdump -l -n -xx -U -i p1 > p1.pcap], [tcpdump.pid])
8988-
sleep 1
9007+
NETNS_DAEMONIZE([at_ns1],
9008+
[tcpdump -l -n -xx -U -i p1 -w p1.pcap 2>tcpdump_err], [tcpdump.pid])
9009+
OVS_WAIT_UNTIL([grep "listening" tcpdump_err])
89899010

8990-
dnl The hex dump is NSH packet with TCP syn payload. pkt=eth/nsh/eth/ip/tcp
8991-
dnl The nsh_ttl is 8, nsh_spi is 0x100 and nsh_si is 3
8992-
dnl The packet is sent from p0(at_ns0) interface directed to
8993-
dnl p1(at_ns1) interface
8994-
NS_CHECK_EXEC([at_ns0], [$PYTHON3 $srcdir/sendpkt.py p0 f2 ff 00 00 00 02 f2 ff 00 00 00 01 89 4f 02 06 01 03 00 01 00 03 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 f2 00 00 00 00 02 f2 00 00 00 00 01 08 00 45 00 00 28 00 01 00 00 40 06 b0 13 c0 a8 00 0a 0a 00 00 0a 04 00 08 00 00 00 00 c8 00 00 00 00 50 02 20 00 b8 5e 00 00 > /dev/null])
9011+
m4_define([TCP_SYN_PKT], [m4_join([,],
9012+
[eth_src=f2:00:00:00:00:01,eth_dst=f2:00:00:00:00:02,eth_type=0x0800],
9013+
[nw_src=192.168.0.10,nw_dst=10.0.0.10],
9014+
[nw_proto=6,nw_ttl=64,nw_frag=no],
9015+
[tcp_src=1024,tcp_dst=2048,tcp_flags=syn])])
9016+
9017+
m4_define([NSH_HEADER_1], [m4_join([,],
9018+
[eth_src=f2:ff:00:00:00:01,eth_dst=f2:ff:00:00:00:02,eth_type=0x894f],
9019+
[nsh_ttl=8,nsh_np=3,nsh_spi=0x100,nsh_si=3,nsh_mdtype=1],
9020+
[nsh_c1=0x01020304,nsh_c2=0x05060708,nsh_c3=0x090a0b0c,nsh_c4=0x0d0e0f10])])
89959021

8996-
dnl Check the expected NSH packet with new fields in the header
8997-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0000: *f2ff *0000 *0002 *f2ff *0000* 0001 *894f *01c6" 2>&1 1>/dev/null])
8998-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0010: *0103 *0001 *0104 *100f *0e0d *0c0b *0a09 *0807" 2>&1 1>/dev/null])
8999-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0020: *0605 *0403 *0201 *f200 *0000 *0002 *f200 *0000" 2>&1 1>/dev/null])
9000-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0030: *0001 *0800 *4500 *0028 *0001 *0000 *4006 *b013" 2>&1 1>/dev/null])
9001-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0040: *c0a8 *000a *0a00 *000a *0400 *0800 *0000 *00c8" 2>&1 1>/dev/null])
9002-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0050: *0000 *0000 *5002 *2000 *b85e *0000" 2>&1 1>/dev/null])
9022+
dnl Send the NSH packet with TCP SYN payload from p0(at_ns0) interface directed
9023+
dnl to p1(at_ns1) interface.
9024+
dnl The nsh_ttl is 8, nsh_spi is 0x100 and nsh_si is 3.
9025+
NS_CHECK_EXEC([at_ns0], [$PYTHON3 $srcdir/sendpkt.py p0 \
9026+
"$(ovs-ofctl compose-packet --bare 'NSH_HEADER_1')" \
9027+
"$(ovs-ofctl compose-packet --bare 'TCP_SYN_PKT')"],
9028+
[0], [ignore])
9029+
9030+
m4_define([NSH_HEADER_2], [m4_join([,],
9031+
[eth_src=f2:ff:00:00:00:01,eth_dst=f2:ff:00:00:00:02,eth_type=0x894f],
9032+
[nsh_ttl=7,nsh_np=3,nsh_spi=0x101,nsh_si=4,nsh_mdtype=1],
9033+
[nsh_c1=0x100f0e0d,nsh_c2=0x0c0b0a09,nsh_c3=0x08070605,nsh_c4=0x04030201])])
9034+
9035+
dnl Check the expected NSH packet with new fields in the header.
9036+
OVS_WAIT_UNTIL([ovs-pcap p1.pcap | grep -q "m4_join([], [^],
9037+
$(ovs-ofctl compose-packet --bare 'NSH_HEADER_2'),
9038+
$(ovs-ofctl compose-packet --bare 'TCP_SYN_PKT'), [\$])"])
90039039

90049040
OVS_TRAFFIC_VSWITCHD_STOP
90059041
AT_CLEANUP
@@ -9020,31 +9056,50 @@ dnl packet to to at_ns2.
90209056
AT_CHECK([ovs-ofctl -Oopenflow13 add-flow br0 "table=0,priority=100,dl_type=0x894f,nsh_spi=0x100,nsh_si=0x02,actions=ovs-p1"])
90219057
AT_CHECK([ovs-ofctl -Oopenflow13 add-flow br0 "table=0,priority=100,dl_type=0x894f,nsh_spi=0x100,nsh_si=0x01,actions=ovs-p2"])
90229058

9023-
NETNS_DAEMONIZE([at_ns1], [tcpdump -l -n -xx -U -i p1 > p1.pcap], [tcpdump.pid])
9024-
NETNS_DAEMONIZE([at_ns2], [tcpdump -l -n -xx -U -i p2 > p2.pcap], [tcpdump2.pid])
9025-
sleep 1
9059+
NETNS_DAEMONIZE([at_ns1],
9060+
[tcpdump -l -n -xx -U -i p1 -w p1.pcap 2>tcpdump_err], [tcpdump.pid])
9061+
OVS_WAIT_UNTIL([grep "listening" tcpdump_err])
9062+
NETNS_DAEMONIZE([at_ns2],
9063+
[tcpdump -l -n -xx -U -i p2 -w p2.pcap 2>tcpdump2_err], [tcpdump2.pid])
9064+
OVS_WAIT_UNTIL([grep "listening" tcpdump2_err])
9065+
9066+
m4_define([TCP_SYN_PKT], [m4_join([,],
9067+
[eth_src=f2:00:00:00:00:01,eth_dst=f2:00:00:00:00:02,eth_type=0x0800],
9068+
[nw_src=192.168.0.10,nw_dst=10.0.0.10],
9069+
[nw_proto=6,nw_ttl=64,nw_frag=no],
9070+
[tcp_src=1024,tcp_dst=2048,tcp_flags=syn])])
9071+
9072+
dnl First send packet from at_ns0 --> OVS with SPI=0x100 and SI=2.
9073+
m4_define([NSH_HEADER_1], [m4_join([,],
9074+
[eth_src=f2:ff:00:00:00:01,eth_dst=f2:ff:00:00:00:02,eth_type=0x894f],
9075+
[nsh_ttl=8,nsh_np=3,nsh_spi=0x100,nsh_si=2,nsh_mdtype=1],
9076+
[nsh_c1=0x01020304,nsh_c2=0x05060708,nsh_c3=0x090a0b0c,nsh_c4=0x0d0e0f10])])
9077+
9078+
NS_CHECK_EXEC([at_ns0], [$PYTHON3 $srcdir/sendpkt.py p0 \
9079+
"$(ovs-ofctl compose-packet --bare 'NSH_HEADER_1')" \
9080+
"$(ovs-ofctl compose-packet --bare 'TCP_SYN_PKT')"],
9081+
[0], [ignore])
9082+
9083+
dnl Check for the above packet on p1 interface.
9084+
OVS_WAIT_UNTIL([ovs-pcap p1.pcap | grep -q "m4_join([], [^],
9085+
$(ovs-ofctl compose-packet --bare 'NSH_HEADER_1'),
9086+
$(ovs-ofctl compose-packet --bare 'TCP_SYN_PKT'), [\$])"])
9087+
9088+
dnl Send the second packet from at_ns1 --> OVS with SPI=0x100 and SI=1.
9089+
m4_define([NSH_HEADER_2], [m4_join([,],
9090+
[eth_src=f2:ff:00:00:00:01,eth_dst=f2:ff:00:00:00:02,eth_type=0x894f],
9091+
[nsh_ttl=8,nsh_np=3,nsh_spi=0x100,nsh_si=1,nsh_mdtype=1],
9092+
[nsh_c1=0x01020304,nsh_c2=0x05060708,nsh_c3=0x090a0b0c,nsh_c4=0x0d0e0f10])])
9093+
9094+
NS_CHECK_EXEC([at_ns1], [$PYTHON3 $srcdir/sendpkt.py p1 \
9095+
"$(ovs-ofctl compose-packet --bare 'NSH_HEADER_2')" \
9096+
"$(ovs-ofctl compose-packet --bare 'TCP_SYN_PKT')"],
9097+
[0], [ignore])
90269098

9027-
dnl First send packet from at_ns0 --> OVS with SPI=0x100 and SI=2
9028-
NS_CHECK_EXEC([at_ns0], [$PYTHON3 $srcdir/sendpkt.py p0 f2 ff 00 00 00 02 f2 ff 00 00 00 01 89 4f 02 06 01 03 00 01 00 02 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 f2 00 00 00 00 02 f2 00 00 00 00 01 08 00 45 00 00 28 00 01 00 00 40 06 b0 13 c0 a8 00 0a 0a 00 00 0a 04 00 08 00 00 00 00 c8 00 00 00 00 50 02 20 00 b8 5e 00 00 > /dev/null])
9029-
9030-
dnl Check for the above packet on p1 interface
9031-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0000: *f2ff *0000 *0002 *f2ff *0000 *0001 *894f *0206" 2>&1 1>/dev/null])
9032-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0010: *0103 *0001 *0002 *0102 *0304 *0506 *0708 *090a" 2>&1 1>/dev/null])
9033-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0020: *0b0c *0d0e *0f10 *f200 *0000 *0002 *f200 *0000" 2>&1 1>/dev/null])
9034-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0030: *0001 *0800 *4500 *0028 *0001 *0000 *4006 *b013" 2>&1 1>/dev/null])
9035-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0040: *c0a8 *000a *0a00 *000a *0400 *0800 *0000 *00c8" 2>&1 1>/dev/null])
9036-
OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0050: *0000 *0000 *5002 *2000 *b85e *0000" 2>&1 1>/dev/null])
9037-
9038-
dnl Send the second packet from at_ns1 --> OVS with SPI=0x100 and SI=1
9039-
NS_CHECK_EXEC([at_ns1], [$PYTHON3 $srcdir/sendpkt.py p1 f2 ff 00 00 00 02 f2 ff 00 00 00 01 89 4f 01 c6 01 03 00 01 00 01 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 f2 00 00 00 00 02 f2 00 00 00 00 01 08 00 45 00 00 28 00 01 00 00 40 06 b0 13 c0 a8 00 0a 0a 00 00 0a 04 00 08 00 00 00 00 c8 00 00 00 00 50 02 20 00 b8 5e 00 00 > /dev/null])
9040-
9041-
dnl Check for the above packet on p2 interface
9042-
OVS_WAIT_UNTIL([cat p2.pcap | grep -E "0x0000: *f2ff *0000 *0002 *f2ff *0000 *0001 *894f *01c6" 2>&1 1>/dev/null])
9043-
OVS_WAIT_UNTIL([cat p2.pcap | grep -E "0x0010: *0103 *0001 *0001 *0102 *0304 *0506 *0708 *090a" 2>&1 1>/dev/null])
9044-
OVS_WAIT_UNTIL([cat p2.pcap | grep -E "0x0020: *0b0c *0d0e *0f10 *f200 *0000 *0002 *f200 *0000" 2>&1 1>/dev/null])
9045-
OVS_WAIT_UNTIL([cat p2.pcap | grep -E "0x0030: *0001 *0800 *4500 *0028 *0001 *0000 *4006 *b013" 2>&1 1>/dev/null])
9046-
OVS_WAIT_UNTIL([cat p2.pcap | grep -E "0x0040: *c0a8 *000a *0a00 *000a *0400 *0800 *0000 *00c8" 2>&1 1>/dev/null])
9047-
OVS_WAIT_UNTIL([cat p2.pcap | grep -E "0x0050: *0000 *0000 *5002 *2000 *b85e *0000" 2>&1 1>/dev/null])
9099+
dnl Check for the above packet on p2 interface.
9100+
OVS_WAIT_UNTIL([ovs-pcap p2.pcap | grep -q "m4_join([], [^],
9101+
$(ovs-ofctl compose-packet --bare 'NSH_HEADER_2'),
9102+
$(ovs-ofctl compose-packet --bare 'TCP_SYN_PKT'), [\$])"])
90489103

90499104
OVS_TRAFFIC_VSWITCHD_STOP
90509105
AT_CLEANUP

0 commit comments

Comments
 (0)