Skip to content

Commit

Permalink
tests: Use fmt_pkt in 1 HV, 1 LS, 2 lport/LS, 1 LR.
Browse files Browse the repository at this point in the history
Execution time: 3.413s
Execution time on "main" branch: 2.675s

Signed-off-by: Mark Michelson <mmichels@redhat.com>
  • Loading branch information
putnopvut committed Nov 29, 2023
1 parent 21e85be commit 7eaf013
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions tests/ovn.at
Expand Up @@ -6020,6 +6020,7 @@ AT_CLEANUP
OVN_FOR_EACH_NORTHD([
AT_SETUP([1 HV, 1 LS, 2 lport/LS, 1 LR])
AT_KEYWORDS([router-admin-state])
AT_SKIP_IF([test $HAVE_SCAPY = no])
ovn_start

# Logical network:
Expand Down Expand Up @@ -6069,11 +6070,13 @@ check ovn-nbctl --wait=hv sync
# Send ip packets between the two ports.

# Packet to send.
src_mac="f00000010203"
dst_mac="000000010203"
src_ip=`ip_to_hex 192 168 1 2`
dst_ip=`ip_to_hex 172 16 1 2`
packet=${dst_mac}${src_mac}08004500001c0000000040110000${src_ip}${dst_ip}0035111100080000
src_mac="f0:00:00:01:02:03"
dst_mac="00:00:00:01:02:03"
src_ip=192.168.1.2
dst_ip=172.16.1.2
packet=$(fmt_pkt "Ether(dst='${dst_mac}', src='${src_mac}')/ \
IP(src='${src_ip}', dst='${dst_ip}')/ \
UDP(sport=53, dport=4369)")
as hv1 ovs-appctl netdev-dummy/receive vif1 $packet


Expand Down Expand Up @@ -6110,9 +6113,11 @@ as hv1 ovs-ofctl dump-flows br-int
as hv1 ovs-appctl netdev-dummy/receive vif1 $packet

# Packet to Expect
expect_src_mac="000000010203"
expect_dst_mac="f00000010204"
echo "${expect_dst_mac}${expect_src_mac}08004500001c000000003f110100${src_ip}${dst_ip}0035111100080000" > expected
expect_src_mac="00:00:00:01:02:03"
expect_dst_mac="f0:00:00:01:02:04"
echo $(fmt_pkt "Ether(dst='${expect_dst_mac}', src='${expect_src_mac}')/ \
IP(src='${src_ip}', dst='${dst_ip}', ttl=0x3f)/ \
UDP(sport=53, dport=4369)") > expected

OVN_CHECK_PACKETS([hv1/vif2-tx.pcap], [expected])

Expand Down

0 comments on commit 7eaf013

Please sign in to comment.