From patchwork Fri May 26 07:26:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Balogh X-Patchwork-Id: 767275 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3wYyRv0tZmz9s89 for ; Fri, 26 May 2017 17:28:59 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ericsson.onmicrosoft.com header.i=@ericsson.onmicrosoft.com header.b="RkfEhtDl"; dkim-atps=neutral Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id F297DBBF; Fri, 26 May 2017 07:26:24 +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 E6C12BB3 for ; Fri, 26 May 2017 07:26:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from sesbmg23.ericsson.net (sesbmg23.ericsson.net [193.180.251.37]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 1F53D17E for ; Fri, 26 May 2017 07:26:20 +0000 (UTC) X-AuditID: c1b4fb25-35fff700000055fe-1f-5927d89a7e1a Received: from ESESSHC024.ericsson.se (Unknown_Domain [153.88.183.90]) by sesbmg23.ericsson.net (Symantec Mail Security) with SMTP id 36.AB.22014.A98D7295; Fri, 26 May 2017 09:26:19 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (153.88.183.145) by oa.msg.ericsson.com (153.88.183.90) with Microsoft SMTP Server (TLS) id 14.3.339.0; Fri, 26 May 2017 09:26:17 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.onmicrosoft.com; s=selector1-ericsson-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=R40u589Wr32jkjpYNTz6gQp+vMZyCZ54P7sVh1DvpUA=; b=RkfEhtDlOE36C6kya1L3JQ/i/ha5Vya5zHia0CP7cEBbQUSKyETqOs1byciQWQAMWAGqVcTNQUEafqsN7iiz/RHen6ofC/1vxGRB5o382bTfSFrUkkxHyKf4fWH4YyAbrwlNVUncpGx0J9vIrcXKgJeSuJ34WeDj6FVKauHjZdo= Received: from AM2PR07MB1042.eurprd07.prod.outlook.com (10.162.37.27) by AM2PR07MB1044.eurprd07.prod.outlook.com (10.162.38.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.5; Fri, 26 May 2017 07:26:17 +0000 Received: from AM2PR07MB1042.eurprd07.prod.outlook.com ([fe80::25ea:238d:aff1:8466]) by AM2PR07MB1042.eurprd07.prod.outlook.com ([fe80::25ea:238d:aff1:8466%14]) with mapi id 15.01.1124.013; Fri, 26 May 2017 07:26:17 +0000 From: =?iso-8859-1?Q?Zolt=E1n_Balogh?= To: "'dev@openvswitch.org'" Thread-Topic: [PATCH v8 3/3] userspace: add vxlan gpe support to vport Thread-Index: AdLV8RkPybb6+uHcQSaZ975XvHkC6A== Date: Fri, 26 May 2017 07:26:16 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: openvswitch.org; dkim=none (message not signed) header.d=none;openvswitch.org; dmarc=none action=none header.from=ericsson.com; x-originating-ip: [192.176.1.88] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM2PR07MB1044; 7:/M79NOhiOsU0MSQlhnPHAM2Pj1iUcDdJij2cmDD+bHtdGqoMXy5h5bhEWLOkr+cr9blj5NuIaU1RJZdKZD+ih3vK/LH2uvOUhDX3I5AbOJ9LSsCueO8bEHzNGPqJUObc3Wig7dzqCy7JDbjZnVCBJKmVISJy8j2NkecdFm7sb8PWmFkCXjJUhCGuU1N+I/JUrKB0BEMFKiDCByfjOqP0PgyfRSWdGOeTlaw4UuxTiUbgX7bkbH/eQoZlqoYmh8Fz6kiuLQmy6oUYgbjmDXEisN7PmZ7ym8jARgb+vPs4zhx95FxKfc4xmIYKaoHYqNgY++3NGAOirs6xcmx5MHdpAQ== x-ld-processed: 92e84ceb-fbfd-47ab-be52-080c6b87953f,ExtAddr x-ms-traffictypediagnostic: AM2PR07MB1044: x-ms-office365-filtering-correlation-id: 736c8c1e-c5c1-4580-8374-08d4a4087f6e x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:AM2PR07MB1044; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(37575265505322)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(6041248)(20161123560025)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123555025)(6072148); SRVR:AM2PR07MB1044; BCL:0; PCL:0; RULEID:; SRVR:AM2PR07MB1044; x-forefront-prvs: 031996B7EF x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(39410400002)(39400400002)(39850400002)(6116002)(3280700002)(2906002)(102836003)(3660700001)(3846002)(478600001)(189998001)(305945005)(966005)(50986999)(54356999)(7736002)(74316002)(5250100002)(8936002)(6916009)(9686003)(6306002)(8676002)(81166006)(2900100001)(6506006)(53936002)(14454004)(7696004)(6436002)(55016002)(99286003)(54906002)(33656002)(25786009)(86362001)(575784001)(107886003)(110136004)(38730400002)(4326008)(5660300001)(491001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR07MB1044; H:AM2PR07MB1042.eurprd07.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 May 2017 07:26:16.8643 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR07MB1044 X-OriginatorOrg: ericsson.com X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplleLIzCtJLcpLzFFi42KZGbE9Snf2DfVIg/6jbBZHT+9htvj9dRuT A5PH4j0vmTye3fzPGMAUxWWTkpqTWZZapG+XwJVxf8o1xoInGRWL9k1nb2A869fFyMkhIWAi sePJRrYuRi4OIYEjjBJrJ7RBOScYJa5NPwnmsAj0Mkssnt3ICpGZwiTRc/0FC4TzmFHi4t3D zCDD2AScJa7vfskGYosIGEpcmnQSrINZoINR4sXfPSwgCWEBR4mD0xcAFXEAFblJ/F8kCFGv J3Gv5TnYHBYBVYnn0z+xg9i8AjES85vamEBsRgExie+n1oDZzALiEreezGeCeEJAYsme88wQ tqjEy8f/wPYyCsxmlPi7swWqSEHi3dzTbBC2rMSl+d2MIEUSAj3MEo9+/WGBSNhIzOiezgxy nISAlsTxpXIQYV+JAwtnMELYdRLL2yYyQpRkS9y+KAUR9paY2jcXauQnJokVjd+YIGpkJD5O VYeIf2eR+PdwJyskHKQk7l7pZJzAqDULyT8Qtp7EjalT2CBsbYllC18zzwKHhaDEyZlPWBYw sqxiFC1OLU7KTTcy1kstykwuLs7P08tLLdnECEwcB7f8Vt3BePmN4yFGAQ5GJR7ehkPqkUKs iWXFlbmHGCU4mJVEeOPOA4V4UxIrq1KL8uOLSnNSiw8xSnOwKInzOu67ECEkkJ5YkpqdmlqQ WgSTZeLglGpgNGiwnp4/+1qjajnXx3kMYtvPT1vWwzqVq6q7JW2tp3tG7sHEef06n9zfuuXf Wlpz7FTNg+8afBkva1dXSG7+nv9nC3+p+tKD9h8zTPOrn9c9dNwnc7vntczdAFaxcyzRt1JW yvNe2HrF+RzX10k98QuXPSibvWPBUfEHSTLprz8k171YE//aXImlOCPRUIu5qDgRALR+Kh4Y AwAA X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED 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 v8 3/3] userspace: add vxlan gpe support to vport 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: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Georg Schmuecking This patch is based on the "datapath: enable vxlangpe creation in compat mode" from Yi Yang. It introduces an extension option "gpe" to the vxlan port in the netdev-dpdk datapath. Description of vxlan gpe protocoll was added to header file lib/packets.h. In the vxlan specific methods the different packet are introduced and handled. Added VXLAN GPE tunnel push test. Signed-off-by: Yi Yang Signed-off-by: Georg Schmuecking --- datapath/linux/compat/include/linux/openvswitch.h | 1 + include/openvswitch/automake.mk | 1 - lib/netdev-native-tnl.c | 59 +++++++++++++++++++++-- lib/netdev-vport.c | 22 +++++++-- lib/packets.h | 54 ++++++++++++++++++++- tests/tunnel-push-pop.at | 10 ++++ 6 files changed, 135 insertions(+), 12 deletions(-) diff --git a/datapath/linux/compat/include/linux/openvswitch.h b/datapath/linux/compat/include/linux/openvswitch.h index 7990638..2ae1797 100644 --- a/datapath/linux/compat/include/linux/openvswitch.h +++ b/datapath/linux/compat/include/linux/openvswitch.h @@ -291,6 +291,7 @@ enum ovs_vport_attr { enum { OVS_VXLAN_EXT_UNSPEC, OVS_VXLAN_EXT_GBP, /* Flag or __u32 */ + OVS_VXLAN_EXT_GPE = 8, /* Flag or __u32 */ __OVS_VXLAN_EXT_MAX, }; diff --git a/include/openvswitch/automake.mk b/include/openvswitch/automake.mk index c0e276f..699d9d7 100644 --- a/include/openvswitch/automake.mk +++ b/include/openvswitch/automake.mk @@ -30,4 +30,3 @@ openvswitchinclude_HEADERS = \ include/openvswitch/version.h \ include/openvswitch/vconn.h \ include/openvswitch/vlog.h - diff --git a/lib/netdev-native-tnl.c b/lib/netdev-native-tnl.c index 0651322..c7a2993 100644 --- a/lib/netdev-native-tnl.c +++ b/lib/netdev-native-tnl.c @@ -499,6 +499,8 @@ netdev_vxlan_pop_header(struct dp_packet *packet) struct flow_tnl *tnl = &md->tunnel; struct vxlanhdr *vxh; unsigned int hlen; + ovs_be32 vx_flags; + enum packet_type next_pt = PT_ETH; pkt_metadata_init_tnl(md); if (VXLAN_HLEN > dp_packet_l4_size(packet)) { @@ -510,18 +512,43 @@ netdev_vxlan_pop_header(struct dp_packet *packet) goto err; } - if (get_16aligned_be32(&vxh->vx_flags) != htonl(VXLAN_FLAGS) || + vx_flags = get_16aligned_be32(&vxh->vx_flags); + if (vx_flags & htonl(VXLAN_HF_GPE)) { + vx_flags &= htonl(~VXLAN_GPE_USED_BITS); + /* Drop the OAM packets */ + if (vxh->vx_gpe.flags & VXLAN_GPE_FLAGS_O) { + goto err; + } + switch (vxh->vx_gpe.next_protocol) { + case VXLAN_GPE_NP_IPV4: + next_pt = PT_IPV4; + break; + case VXLAN_GPE_NP_IPV6: + next_pt = PT_IPV6; + break; + case VXLAN_GPE_NP_ETHERNET: + next_pt = PT_ETH; + break; + default: + goto err; + } + } + + if (vx_flags != htonl(VXLAN_FLAGS) || (get_16aligned_be32(&vxh->vx_vni) & htonl(0xff))) { VLOG_WARN_RL(&err_rl, "invalid vxlan flags=%#x vni=%#x\n", - ntohl(get_16aligned_be32(&vxh->vx_flags)), + ntohl(vx_flags), ntohl(get_16aligned_be32(&vxh->vx_vni))); goto err; } tnl->tun_id = htonll(ntohl(get_16aligned_be32(&vxh->vx_vni)) >> 8); tnl->flags |= FLOW_TNL_F_KEY; - packet->packet_type = htonl(PT_ETH); + packet->packet_type = htonl(next_pt); dp_packet_reset_packet(packet, hlen + VXLAN_HLEN); + if (next_pt != PT_ETH) { + packet->l3_ofs = 0; + } return packet; err: @@ -544,8 +571,30 @@ netdev_vxlan_build_header(const struct netdev *netdev, vxh = udp_build_header(tnl_cfg, data, params); - put_16aligned_be32(&vxh->vx_flags, htonl(VXLAN_FLAGS)); - put_16aligned_be32(&vxh->vx_vni, htonl(ntohll(params->flow->tunnel.tun_id) << 8)); + if (tnl_cfg->exts & (1 << OVS_VXLAN_EXT_GPE)) { + put_16aligned_be32(&vxh->vx_flags, htonl(VXLAN_FLAGS | VXLAN_HF_GPE)); + put_16aligned_be32(&vxh->vx_vni, + htonl(ntohll(params->flow->tunnel.tun_id) << 8)); + if (tnl_cfg->is_layer3) { + switch (ntohs(params->flow->dl_type)) { + case ETH_TYPE_IP: + vxh->vx_gpe.next_protocol = VXLAN_GPE_NP_IPV4; + break; + case ETH_TYPE_IPV6: + vxh->vx_gpe.next_protocol = VXLAN_GPE_NP_IPV6; + break; + case ETH_TYPE_TEB: + vxh->vx_gpe.next_protocol = VXLAN_GPE_NP_ETHERNET; + break; + } + } else { + vxh->vx_gpe.next_protocol = VXLAN_GPE_NP_ETHERNET; + } + } else { + put_16aligned_be32(&vxh->vx_flags, htonl(VXLAN_FLAGS)); + put_16aligned_be32(&vxh->vx_vni, + htonl(ntohll(params->flow->tunnel.tun_id) << 8)); + } ovs_mutex_unlock(&dev->mutex); data->header_len += sizeof *vxh; diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c index ba69461..d390f37 100644 --- a/lib/netdev-vport.c +++ b/lib/netdev-vport.c @@ -414,6 +414,7 @@ set_tunnel_config(struct netdev *dev_, const struct smap *args, char **errp) uint16_t dst_proto = 0, src_proto = 0; struct netdev_tunnel_config tnl_cfg; struct smap_node *node; + bool is_layer3 = false; int err; has_csum = strstr(type, "gre") || strstr(type, "geneve") || @@ -508,6 +509,9 @@ set_tunnel_config(struct netdev *dev_, const struct smap *args, char **errp) while (ext) { if (!strcmp(type, "vxlan") && !strcmp(ext, "gbp")) { tnl_cfg.exts |= (1 << OVS_VXLAN_EXT_GBP); + } else if (!strcmp(type, "vxlan") && !strcmp(ext, "gpe")) { + tnl_cfg.exts |= (1 << OVS_VXLAN_EXT_GPE); + optional_layer3 = true; } else { ds_put_format(&errors, "%s: unknown extension '%s'\n", name, ext); @@ -520,16 +524,23 @@ set_tunnel_config(struct netdev *dev_, const struct smap *args, char **errp) } else if (!strcmp(node->key, "egress_pkt_mark")) { tnl_cfg.egress_pkt_mark = strtoul(node->value, NULL, 10); tnl_cfg.set_egress_pkt_mark = true; - } else if (!strcmp(node->key, "layer3") && optional_layer3) { + } else if (!strcmp(node->key, "layer3")) { if (!strcmp(node->value, "true")) { - tnl_cfg.is_layer3 = true; + is_layer3 = true; } } else { - ds_put_format(&errors, "%s: unknown %s argument '%s'\n", - name, type, node->key); + ds_put_format(&errors, "%s: unknown %s argument '%s'\n", name, + type, node->key); } } + if (optional_layer3 && is_layer3) { + tnl_cfg.is_layer3 = is_layer3; + } else if (!optional_layer3 && is_layer3) { + ds_put_format(&errors, "%s: unknown %s argument '%s'\n", + name, type, "layer3"); + } + if (!ipv6_addr_is_set(&tnl_cfg.ipv6_dst) && !tnl_cfg.ip_dst_flow) { ds_put_format(&errors, "%s: %s type requires valid 'remote_ip' argument\n", @@ -660,7 +671,8 @@ get_tunnel_config(const struct netdev *dev, struct smap *args) smap_add(args, "csum", "true"); } - if (tnl_cfg.is_layer3 && !strcmp("gre", type)) { + if (tnl_cfg.is_layer3 && (!strcmp("gre", type) || + !strcmp("vxlan", type))) { smap_add(args, "layer3", "true"); } diff --git a/lib/packets.h b/lib/packets.h index d53e0b7..1dcd90d 100644 --- a/lib/packets.h +++ b/lib/packets.h @@ -1174,12 +1174,64 @@ struct gre_base_hdr { /* VXLAN protocol header */ struct vxlanhdr { - ovs_16aligned_be32 vx_flags; + union { + ovs_16aligned_be32 vx_flags; /* VXLAN flags. */ + struct { + uint8_t flags; /* VXLAN GPE flags. */ + uint8_t reserved[2]; /* 16 bits reserved. */ + uint8_t next_protocol; /* Next Protocol field for VXLAN GPE. */ + } vx_gpe; + }; ovs_16aligned_be32 vx_vni; }; +BUILD_ASSERT_DECL(sizeof(struct vxlanhdr) == 8); #define VXLAN_FLAGS 0x08000000 /* struct vxlanhdr.vx_flags required value. */ +/* + * VXLAN Generic Protocol Extension (VXLAN_F_GPE): + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * |R|R|Ver|I|P|R|O| Reserved |Next Protocol | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | VXLAN Network Identifier (VNI) | Reserved | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * Ver = Version. Indicates VXLAN GPE protocol version. + * + * P = Next Protocol Bit. The P bit is set to indicate that the + * Next Protocol field is present. + * + * O = OAM Flag Bit. The O bit is set to indicate that the packet + * is an OAM packet. + * + * Next Protocol = This 8 bit field indicates the protocol header + * immediately following the VXLAN GPE header. + * + * https://tools.ietf.org/html/draft-ietf-nvo3-vxlan-gpe-01 + */ + +/* Fields in struct vxlanhdr.vx_gpe.flags */ +#define VXLAN_GPE_FLAGS_VER 0x30 /* Version. */ +#define VLXAN_GPE_FLAGS_P 0x04 /* Next Protocol Bit. */ +#define VXLAN_GPE_FLAGS_O 0x01 /* OAM Bit. */ + +/* VXLAN-GPE header flags. */ +#define VXLAN_HF_VER ((1U <<29) | (1U <<28)) +#define VXLAN_HF_NP (1U <<26) +#define VXLAN_HF_OAM (1U <<24) + +#define VXLAN_GPE_USED_BITS (VXLAN_HF_VER | VXLAN_HF_NP | VXLAN_HF_OAM | \ + 0xff) + +/* VXLAN-GPE header Next Protocol. */ +#define VXLAN_GPE_NP_IPV4 0x01 +#define VXLAN_GPE_NP_IPV6 0x02 +#define VXLAN_GPE_NP_ETHERNET 0x03 +#define VXLAN_GPE_NP_NSH 0x04 + +#define VXLAN_F_GPE 0x4000 +#define VXLAN_HF_GPE 0x04000000 + /* Input values for PACKET_TYPE macros have to be in host byte order. * The _BE postfix indicates result is in network byte order. Otherwise result * is in host byte order. */ diff --git a/tests/tunnel-push-pop.at b/tests/tunnel-push-pop.at index afa345e..e3aecb4 100644 --- a/tests/tunnel-push-pop.at +++ b/tests/tunnel-push-pop.at @@ -16,6 +16,8 @@ AT_CHECK([ovs-vsctl add-port int-br t2 -- set Interface t2 type=vxlan \ options:remote_ip=1.1.2.93 options:out_key=flow options:egress_pkt_mark=1234 ofport_request=6\ -- add-port int-br t6 -- set Interface t6 type=gre \ options:remote_ip=1.1.2.92 options:key=456 options:layer3=true ofport_request=7\ + -- add-port int-br t7 -- set Interface t7 type=vxlan \ + options:remote_ip=1.1.2.92 options:key=345 options:exts=gpe ofport_request=8\ ], [0]) AT_CHECK([ovs-appctl dpif/show], [0], [dnl @@ -31,6 +33,7 @@ dummy@ovs-dummy: hit:0 missed:0 t4 5/6081: (geneve: key=123, remote_ip=flow) t5 6/6081: (geneve: egress_pkt_mark=1234, out_key=flow, remote_ip=1.1.2.93) t6 7/3: (gre: key=456, layer3=true, remote_ip=1.1.2.92) + t7 8/4789: (vxlan: key=345, remote_ip=1.1.2.92) ]) dnl First setup dummy interface IP address, then add the route @@ -113,6 +116,13 @@ AT_CHECK([tail -1 stdout], [0], [Datapath actions: tnl_push(tnl_port(4789),header(size=50,type=4,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=4789,csum=0x0),vxlan(flags=0x8000000,vni=0x7b)),out_port(100)) ]) +dnl Check VXLAN GPE tunnel push +AT_CHECK([ovs-ofctl add-flow int-br action=8]) +AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:01),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout]) +AT_CHECK([tail -1 stdout], [0], + [Datapath actions: tnl_push(tnl_port(4789),header(size=50,type=4,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=4789,csum=0x0),vxlan(flags=0xc000003,vni=0x159)),out_port(100)) +]) + dnl Check VXLAN tunnel push set tunnel id by flow and checksum AT_CHECK([ovs-ofctl add-flow int-br "actions=set_tunnel:124,4"]) AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])