From patchwork Thu Mar 29 23:46:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashish Varma X-Patchwork-Id: 893066 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="YJwYGkIw"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40C1cS1WWnz9s1P for ; Fri, 30 Mar 2018 10:46:47 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id C4B2FAD7; Thu, 29 Mar 2018 23:46:45 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 66CA115 for ; Thu, 29 Mar 2018 23:46:44 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pf0-f171.google.com (mail-pf0-f171.google.com [209.85.192.171]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 547DA62C for ; Thu, 29 Mar 2018 23:46:43 +0000 (UTC) Received: by mail-pf0-f171.google.com with SMTP id g14so4310846pfh.3 for ; Thu, 29 Mar 2018 16:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=8Ni6zPtuCtKyvEbAlEHt1yHT7oCAYNzP4Of1u7hfeIQ=; b=YJwYGkIwPE9Tw1/D66PgZk3yeYmZdTgLvGSOMZXvwhABQSB60ZIKxjeyLHmBHt+Apm 2K9/IxmVD5vgXciQMON/3ybwsFsZLVS4je2eKWww+wKK/OC3wxpEH3UIuX8755hzVL6K PAcx+JuzrMbtALUAe8sv/iFzCu4eO2lF+yDE2uuqtKIzlrLd1B6697B91G/mvmmAa+wa qR3KdV0N3E5lR5Og5QCoWynZXod5IeLVRDHH3Pgmli07wAbH2PtUQ1VWs/U2f5DCw2ej cVnszExYS5QEVtA/SyFrD05qZ4bL4WBZTVg4OrQZzQqu7XCk3J/MRLMXSVejqhqNT4tw nf+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=8Ni6zPtuCtKyvEbAlEHt1yHT7oCAYNzP4Of1u7hfeIQ=; b=bBRfl85+PlaIMG8Yz3J2MfUXh+DofAVL5ir8Z5ZASA7Nlka9S++m/FYD1A04/D1NGd ATqag+erNT1N4gbDdEK1PF5/2QbuafPXdA6vNC3K68Xfz8OzK8x2w2YixhV5gm9sO8Xe dYFTjfhleCECPeffyRhAF3+V9nqp+v+/iEuLkZfDeQnu5fFMzfuepCXknnEJjs+IoE42 b+d6OfgMY7DpkA3ZPHRYZUCwnQ4X+6fNIng99TNkNa0FqFYNxgdh2QXBedm+ktpNDLAH I9L0HEdWJ0PdlJMq5bkHOTeRDExg84IfOFTtZ+1RE6QC/ABibnXNIVUWXnaAJWMWpnum 7j9A== X-Gm-Message-State: AElRT7G4QpNKeJQJP2T52WcRpL36J0o/r1453W+2inS6eGp1tV++HhKU wKdAD17dIR+3uuGzu/rmOviq8g== X-Google-Smtp-Source: AIpwx49dV4zNj6alkjJdI/r6k7KPrVKt2GUgiIE2USfOSVB6u2W6GgwXuRUNxuRv4B+G6hhikXXhBA== X-Received: by 2002:a17:902:64cf:: with SMTP id y15-v6mr10635765pli.49.1522367201931; Thu, 29 Mar 2018 16:46:41 -0700 (PDT) Received: from ashish-Ubuntu-WorkStation.eng.vmware.com ([66.170.99.1]) by smtp.gmail.com with ESMTPSA id 67sm12702838pfz.57.2018.03.29.16.46.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Mar 2018 16:46:41 -0700 (PDT) From: Ashish Varma To: dev@openvswitch.org Date: Thu, 29 Mar 2018 16:46:09 -0700 Message-Id: <1522367169-4674-1-git-send-email-ashishvarma.ovs@gmail.com> X-Mailer: git-send-email 2.7.4 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH v1] tests: Added NSH related unit test cases for datapath X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Added test cases for encap, decap, replace and forwarding of NSH packets. Also added a python script 'sendpkt.py' to send hex ethernet frames. Signed-off-by: Ashish Varma Tested-by: Greg Rose Reviewed-by: Greg Rose --- tests/automake.mk | 4 +- tests/sendpkt.py | 94 ++++++++++++++++++++++++++++ tests/system-traffic.at | 163 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 260 insertions(+), 1 deletion(-) create mode 100755 tests/sendpkt.py diff --git a/tests/automake.mk b/tests/automake.mk index 780d3b8..0796123 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -400,7 +400,9 @@ CHECK_PYFILES = \ tests/test-unix-socket.py \ tests/test-unixctl.py \ tests/test-vlog.py \ - tests/uuidfilt.py + tests/uuidfilt.py \ + tests/sendpkt.py + EXTRA_DIST += $(CHECK_PYFILES) PYCOV_CLEAN_FILES += $(CHECK_PYFILES:.py=.py,cover) .coverage diff --git a/tests/sendpkt.py b/tests/sendpkt.py new file mode 100755 index 0000000..6d16d0f --- /dev/null +++ b/tests/sendpkt.py @@ -0,0 +1,94 @@ +#! /usr/bin/env python + +# Copyright (c) 2018 VMware, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# This program can be used send L2-L7 protocol messages using the hex bytes +# of the packet, to test simple protocol scenarios. (e.g. generate simple +# nsh packets to test nsh match fields/actions) +# +# Currently, the script supports sending the packets starting from the +# Ethernet header. As a part of future enchancement, raw ip packet support +# can also be added, and that's why there is "-t"/"--type" option +# + + +import socket +import struct +import sys +from optparse import OptionParser + + +usage = "usage: %prog [OPTIONS] OUT-INTERFACE HEX-BYTES \n \ + bytes in HEX-BYTES must be separated by space(s)" +parser = OptionParser(usage=usage) +parser.add_option("-t", "--type", type="string", dest="packet_type", + help="packet type ('eth' is the default PACKET_TYPE)", + default="eth") + +(options, args) = parser.parse_args() + +# validate the arguments +if len(args) < 2: + parser.print_help() + sys.exit(1) + +# validate the "-t" or "--type" option +if options.packet_type != "eth": + parser.error('invalid argument to "-t"/"--type". Allowed value is "eth".') + +# store the hex bytes with 0x appended at the beginning +# if not present in the user input and validate the hex bytes +hex_list = [] +for a in args[1:]: + if a[:2] != "0x": + hex_byte = "0x" + a + else: + hex_byte = a + try: + temp = int(hex_byte, 0) + except: + parser.error("invalid hex byte " + a) + + if temp > 0xff: + parser.error("hex byte " + a + " cannot be greater than 0xff!") + + hex_list.append(temp) + +pkt = "".join(map(chr, hex_list)) + +try: + sockfd = socket.socket(socket.AF_PACKET, socket.SOCK_RAW) +except socket.error as msg: + print 'unable to create socket! error eode: ' + str(msg[0]) + ' : '\ + + msg[1] + sys.exit(2) + +try: + sockfd.bind((args[0], 0)) +except socket.error as msg: + print 'unable to bind socket! error eode: ' + str(msg[0]) + ' : '\ + + msg[1] + sys.exit(2) + +try: + sockfd.send(pkt) +except socket.error as msg: + print 'unable to send packet! error eode: ' + str(msg[0]) + ' : '\ + + msg[1] + sys.exit(2) + +print 'send success!' +sys.exit(0) diff --git a/tests/system-traffic.at b/tests/system-traffic.at index 2afadec..58db095 100644 --- a/tests/system-traffic.at +++ b/tests/system-traffic.at @@ -4478,3 +4478,166 @@ NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.2.2.2 | FORMAT_PING OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP + + +AT_BANNER([nsh-datapath]) + +AT_SETUP([nsh - encap header]) +OVS_TRAFFIC_VSWITCHD_START() + +ADD_NAMESPACES(at_ns0, at_ns1) + +ADD_VETH(p0, at_ns0, br0, "0.0.0.0") +ADD_VETH(p1, at_ns1, br0, "0.0.0.0") + +dnl The flow will encap a nsh header to the TCP syn packet +dnl eth/ip/tcp --> OVS --> eth/nsh/eth/ip/tcp +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"]) + +rm ovs-p1.pcap +tcpdump -U -i ovs-p1 -w ovs-p1.pcap & +sleep 1 + +dnl The hex dump is a TCP syn packet. pkt=eth/ip/tcp +dnl The packet is sent from p0(at_ns0) interface directed to +dnl p1(at_ns1) interface +NS_CHECK_EXEC([at_ns0], [$PYTHON $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]) + +sleep 1 + +dnl Check the expected nsh encapsulated packet on the egress interface +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0000: *f2ff *0000 *0002 *f2ff *0000 *0001 *894f *0fc6" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0010: *0103 *0012 *34ff *1122 *3344 *0000 *0000 *0000" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0020: *0000 *0000 *0000 *f200 *0000 *0002 *f200 *0000" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0030: *0001 *0800 *4500 *0028 *0001 *0000 *4006 *b013" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0040: *c0a8 *000a *0a00 *000a *0400 *0800 *0000 *00c8" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0050: *0000 *0000 *5002 *2000 *b85e *0000" 2>&1 1>/dev/null]) + + +OVS_TRAFFIC_VSWITCHD_STOP +AT_CLEANUP + +AT_SETUP([nsh - decap header]) +OVS_TRAFFIC_VSWITCHD_START() + +ADD_NAMESPACES(at_ns0, at_ns1) + +ADD_VETH(p0, at_ns0, br0, "0.0.0.0") +ADD_VETH(p1, at_ns1, br0, "0.0.0.0") + +dnl The flow will decap a nsh header which in turn carries a TCP syn packet +dnl eth/nsh/eth/ip/tcp --> OVS --> eth/ip/tcp +AT_CHECK([ovs-ofctl -Oopenflow13 add-flow br0 "table=0,priority=100,in_port=ovs-p0,dl_type=0x894f, actions=decap(),decap(), ovs-p1"]) + +rm ovs-p1.pcap +tcpdump -U -i ovs-p1 -w ovs-p1.pcap & +sleep 1 + +dnl The hex dump is NSH packet with TCP syn payload. pkt=eth/nsh/eth/ip/tcp +dnl The packet is sent from p0(at_ns0) interface directed to +dnl p1(at_ns1) interface +NS_CHECK_EXEC([at_ns0], [$PYTHON $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]) + +sleep 1 + +dnl Check the expected de-capsulated TCP packet on the egress interface +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0000: *f200 *0000 *0002 *f200 *0000 *0001 *0800 *4500" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0010: *0028 *0001 *0000 *4006 *b013 *c0a8 *000a *0a00" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0020: *000a *0400 *0800 *0000 *00c8 *0000 *0000 *5002" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0030: *2000 *b85e *0000" 2>&1 1>/dev/null]) + + +OVS_TRAFFIC_VSWITCHD_STOP +AT_CLEANUP + +AT_SETUP([nsh - replace header]) +OVS_TRAFFIC_VSWITCHD_START() + +ADD_NAMESPACES(at_ns0, at_ns1) + +ADD_VETH(p0, at_ns0, br0, "0.0.0.0") +ADD_VETH(p1, at_ns1, br0, "0.0.0.0") + +dnl The flow will decap a nsh header and encap a new nsh header +dnl eth/nsh-X/eth/ip/tcp --> OVS --> eth/nsh-Y/eth/ip/tcp +dnl The flow will add another NSH header with nsh_spi=0x101, nsh_si=4, +dnl nsh_ttl=7 and change the md1 context +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"]) + +rm ovs-p1.pcap +tcpdump -U -i ovs-p1 -w ovs-p1.pcap & +sleep 1 + +dnl The hex dump is NSH packet with TCP syn payload. pkt=eth/nsh/eth/ip/tcp +dnl The nsh_ttl is 8, nsh_spi is 0x100 and nsh_si is 3 +dnl The packet is sent from p0(at_ns0) interface directed to +dnl p1(at_ns1) interface +NS_CHECK_EXEC([at_ns0], [$PYTHON $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]) + +sleep 1 + +dnl Check the expected NSH packet with new fields in the header +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0000: *f2ff *0000 *0002 *f2ff *0000* 0001 *894f *01c6" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0010: *0103 *0001 *0104 *100f *0e0d *0c0b *0a09 *0807" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0020: *0605 *0403 *0201 *f200 *0000 *0002 *f200 *0000" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0030: *0001 *0800 *4500 *0028 *0001 *0000 *4006 *b013" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0040: *c0a8 *000a *0a00 *000a *0400 *0800 *0000 *00c8" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0050: *0000 *0000 *5002 *2000 *b85e *0000" 2>&1 1>/dev/null]) + +OVS_TRAFFIC_VSWITCHD_STOP +AT_CLEANUP + + +AT_SETUP([nsh - forward]) +OVS_TRAFFIC_VSWITCHD_START() + +ADD_NAMESPACES(at_ns0, at_ns1, at_ns2) + +ADD_VETH(p0, at_ns0, br0, "0.0.0.0") +ADD_VETH(p1, at_ns1, br0, "0.0.0.0") +ADD_VETH(p2, at_ns2, br0, "0.0.0.0") + +dnl Push two flows to OVS. #1 will check on SPI=0X100, SI=2 and send the +dnl packet to at_ns1. #2 will check on SPI=0X100, SI=1 and send the +dnl packet to to at_ns2. +AT_CHECK([ovs-ofctl -Oopenflow13 add-flow br0 "table=0,priority=100,dl_type=0x894f,nsh_spi=0x100,nsh_si=0x02,actions=ovs-p1"]) +AT_CHECK([ovs-ofctl -Oopenflow13 add-flow br0 "table=0,priority=100,dl_type=0x894f,nsh_spi=0x100,nsh_si=0x01,actions=ovs-p2"]) + + +rm ovs-p1.pcap +rm ovs-p2.pcap +tcpdump -U -i ovs-p1 -w ovs-p1.pcap & +tcpdump -U -i ovs-p2 -w ovs-p2.pcap & +sleep 1 + +dnl First send packet from at_ns0 --> OVS with SPI=0x100 and SI=2 +NS_CHECK_EXEC([at_ns0], [$PYTHON $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]) + +sleep 1 + +dnl Check for the above packet on ovs-p1 interface +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0000: *f2ff *0000 *0002 *f2ff *0000 *0001 *894f *0206" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0010: *0103 *0001 *0002 *0102 *0304 *0506 *0708 *090a" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0020: *0b0c *0d0e *0f10 *f200 *0000 *0002 *f200 *0000" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0030: *0001 *0800 *4500 *0028 *0001 *0000 *4006 *b013" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0040: *c0a8 *000a *0a00 *000a *0400 *0800 *0000 *00c8" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0050: *0000 *0000 *5002 *2000 *b85e *0000" 2>&1 1>/dev/null]) + + +dnl Send the second packet from at_ns1 --> OVS with SPI=0x100 and SI=1 +NS_CHECK_EXEC([at_ns1], [$PYTHON $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]) + +sleep 1 + +dnl Check for the above packet on ovs-p2 interface +AT_CHECK([tcpdump -xx -r ovs-p2.pcap 2>&1 | egrep "0x0000: *f2ff *0000 *0002 *f2ff *0000 *0001 *894f *01c6" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p2.pcap 2>&1 | egrep "0x0010: *0103 *0001 *0001 *0102 *0304 *0506 *0708 *090a" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p2.pcap 2>&1 | egrep "0x0020: *0b0c *0d0e *0f10 *f200 *0000 *0002 *f200 *0000" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p2.pcap 2>&1 | egrep "0x0030: *0001 *0800 *4500 *0028 *0001 *0000 *4006 *b013" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p2.pcap 2>&1 | egrep "0x0040: *c0a8 *000a *0a00 *000a *0400 *0800 *0000 *00c8" 2>&1 1>/dev/null]) +AT_CHECK([tcpdump -xx -r ovs-p2.pcap 2>&1 | egrep "0x0050: *0000 *0000 *5002 *2000 *b85e *0000" 2>&1 1>/dev/null]) + + + +OVS_TRAFFIC_VSWITCHD_STOP +AT_CLEANUP