From patchwork Thu Mar 3 18:20:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ben@skyportsystems.com X-Patchwork-Id: 591541 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 76DAE140C59 for ; Fri, 4 Mar 2016 05:21:36 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=skyportsystems.com header.i=@skyportsystems.com header.b=lsHcpckD; dkim-atps=neutral Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 3CEB322C39E; Thu, 3 Mar 2016 10:21:18 -0800 (PST) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 74ACB22C39B for ; Thu, 3 Mar 2016 10:21:17 -0800 (PST) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 0948C16245B for ; Thu, 3 Mar 2016 11:21:17 -0700 (MST) X-ASG-Debug-ID: 1457029275-0b32372d77412100001-byXFYA Received: from mx3-pf3.cudamail.com ([192.168.14.3]) by bar6.cudamail.com with ESMTP id FuKVRuPfKySwPve4 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 03 Mar 2016 11:21:15 -0700 (MST) X-Barracuda-Envelope-From: ben@skyportsystems.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.3 Received: from unknown (HELO mail-pf0-f175.google.com) (209.85.192.175) by mx3-pf3.cudamail.com with ESMTPS (RC4-SHA encrypted); 3 Mar 2016 19:11:07 -0000 Received-SPF: pass (mx3-pf3.cudamail.com: SPF record at _netblocks.google.com designates 209.85.192.175 as permitted sender) X-Barracuda-RBL-Trusted-Forwarder: 209.85.192.175 Received: by mail-pf0-f175.google.com with SMTP id 4so19253446pfd.1 for ; Thu, 03 Mar 2016 10:21:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skyportsystems.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=sAYgyQyZZ4zm1dvivlXug61wZFp90Is4PP/XARlDepI=; b=lsHcpckDFFtCGdPrtRB5JI7dIBjtjdPdc49RTTQBBrb9TMxFHDgV63UM4UfUUZIAz4 6wLgGMokolNw4fnRSaQqlOCwVHgMaTq56BoErZmX9DRYMUxbJSlPmijh7r8jzHwvJ4U2 j4rKzgYWnVBUTDjVM2xWDXg1BtJpaVPd+9GNk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=sAYgyQyZZ4zm1dvivlXug61wZFp90Is4PP/XARlDepI=; b=IzZL5+WxjKASO0tVJJy9G5rL4JEmJbPzMukHtMTdVs1XugOay10vhSX2U1YZhZr6wV cnujfDxeqwVbSDuoARbQuDdcmMH/GFU1EiCjX2KOaNtLI7v+l2PBu/noQnOusQ/Nx/LL esm/myLCOhNskteeSwpA5ScoYdCiNyaer9WdzJXuvCd8mWU+tA2tqiF/LmVaRmhIOp8+ F35NtWABeDpKMa2EyysEL1FhL80vc6bogs89E8H55jQFvw6ws7KjAdyyZsC/cN53T1+C aefNKlI+Y/yANqrRfLKnSLiPSgNvoB7I3CkK9aMIiJdk5kogOl/7sv/cDRuKlLZI1t4Q rn4A== X-Gm-Message-State: AD7BkJJdnsblgW0e1qm5tcHNmphezlMcUH7JNS0oi7QjPXLCKj69lhO7jNHGQSDxW0CeORm+ X-Received: by 10.98.43.194 with SMTP id r185mr5654429pfr.24.1457029274456; Thu, 03 Mar 2016 10:21:14 -0800 (PST) Received: from Arrow.corp.skyportsystems.com (67-207-112-138.static.wiline.com. [67.207.112.138]) by smtp.gmail.com with ESMTPSA id g25sm62149841pfg.35.2016.03.03.10.21.13 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 03 Mar 2016 10:21:13 -0800 (PST) X-CudaMail-Envelope-Sender: ben@skyportsystems.com X-Barracuda-Apparent-Source-IP: 67.207.112.138 From: ben@skyportsystems.com To: dev@openvswitch.org X-CudaMail-MID: CM-V3-302039367 X-CudaMail-DTE: 030316 X-CudaMail-Originating-IP: 209.85.192.175 Date: Thu, 3 Mar 2016 10:20:42 -0800 X-ASG-Orig-Subj: [##CM-V3-302039367##][PATCH v2 02/23] Move lib/geneve.h to include/openvswitch directory Message-Id: <3f4dedee02f8eb0dba005520bc56d6a2b0c7801c.1457026915.git.ben@skyportsystems.com> X-Mailer: git-send-email 2.5.4 (Apple Git-61) In-Reply-To: References: In-Reply-To: References: X-GBUdb-Analysis: 0, 209.85.192.175, Ugly c=0.363392 p=-0.352941 Source Normal X-MessageSniffer-Rules: 0-0-0-10742-c X-Barracuda-Connect: UNKNOWN[192.168.14.3] X-Barracuda-Start-Time: 1457029275 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_SC5_MJ1963, DKIM_SIGNED, NO_REAL_NAME, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.27543 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 NO_REAL_NAME From: does not include a real name 0.00 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 Cc: Ben Warren Subject: [ovs-dev] [PATCH v2 02/23] Move lib/geneve.h to include/openvswitch directory X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" From: Ben Warren Signed-off-by: Ben Warren --- include/openvswitch/automake.mk | 1 + include/openvswitch/geneve.h | 63 +++++++++++++++++++++++++++++++++++++++++ lib/automake.mk | 1 - lib/geneve.h | 63 ----------------------------------------- lib/packets.h | 2 +- lib/tun-metadata.h | 2 +- 6 files changed, 66 insertions(+), 66 deletions(-) create mode 100644 include/openvswitch/geneve.h delete mode 100644 lib/geneve.h diff --git a/include/openvswitch/automake.mk b/include/openvswitch/automake.mk index 46416be..9fc5d5b 100644 --- a/include/openvswitch/automake.mk +++ b/include/openvswitch/automake.mk @@ -1,6 +1,7 @@ openvswitchincludedir = $(includedir)/openvswitch openvswitchinclude_HEADERS = \ include/openvswitch/compiler.h \ + include/openvswitch/geneve.h \ include/openvswitch/list.h \ include/openvswitch/ofp-parse.h \ include/openvswitch/thread.h \ diff --git a/include/openvswitch/geneve.h b/include/openvswitch/geneve.h new file mode 100644 index 0000000..7311985 --- /dev/null +++ b/include/openvswitch/geneve.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2015 Nicira, 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. + */ + +#ifndef OPENVSWITCH_GENEVE_H +#define OPENVSWITCH_GENEVE_H 1 + +#include "openvswitch/types.h" + +#define TLV_MAX_OPT_SIZE 124 +#define TLV_TOT_OPT_SIZE 252 + +#define GENEVE_CRIT_OPT_TYPE (1 << 7) + +struct geneve_opt { + ovs_be16 opt_class; + uint8_t type; +#ifdef WORDS_BIGENDIAN + uint8_t r1:1; + uint8_t r2:1; + uint8_t r3:1; + uint8_t length:5; +#else + uint8_t length:5; + uint8_t r3:1; + uint8_t r2:1; + uint8_t r1:1; +#endif + /* Option data */ +}; + +struct genevehdr { +#ifdef WORDS_BIGENDIAN + uint8_t ver:2; + uint8_t opt_len:6; + uint8_t oam:1; + uint8_t critical:1; + uint8_t rsvd1:6; +#else + uint8_t opt_len:6; + uint8_t ver:2; + uint8_t rsvd1:6; + uint8_t critical:1; + uint8_t oam:1; +#endif + ovs_be16 proto_type; + ovs_16aligned_be32 vni; + struct geneve_opt options[]; +}; + +#endif /* geneve.h */ diff --git a/lib/automake.mk b/lib/automake.mk index ea2f898..183dcdb 100644 --- a/lib/automake.mk +++ b/lib/automake.mk @@ -84,7 +84,6 @@ lib_libopenvswitch_la_SOURCES = \ lib/fatal-signal.h \ lib/flow.c \ lib/flow.h \ - lib/geneve.h \ lib/guarded-list.c \ lib/guarded-list.h \ lib/hash.c \ diff --git a/lib/geneve.h b/lib/geneve.h deleted file mode 100644 index db84129..0000000 --- a/lib/geneve.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2015 Nicira, 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. - */ - -#ifndef GENEVE_H -#define GENEVE_H 1 - -#include "openvswitch/types.h" - -#define TLV_MAX_OPT_SIZE 124 -#define TLV_TOT_OPT_SIZE 252 - -#define GENEVE_CRIT_OPT_TYPE (1 << 7) - -struct geneve_opt { - ovs_be16 opt_class; - uint8_t type; -#ifdef WORDS_BIGENDIAN - uint8_t r1:1; - uint8_t r2:1; - uint8_t r3:1; - uint8_t length:5; -#else - uint8_t length:5; - uint8_t r3:1; - uint8_t r2:1; - uint8_t r1:1; -#endif - /* Option data */ -}; - -struct genevehdr { -#ifdef WORDS_BIGENDIAN - uint8_t ver:2; - uint8_t opt_len:6; - uint8_t oam:1; - uint8_t critical:1; - uint8_t rsvd1:6; -#else - uint8_t opt_len:6; - uint8_t ver:2; - uint8_t rsvd1:6; - uint8_t critical:1; - uint8_t oam:1; -#endif - ovs_be16 proto_type; - ovs_16aligned_be32 vni; - struct geneve_opt options[]; -}; - -#endif /* geneve.h */ diff --git a/lib/packets.h b/lib/packets.h index bf12937..a54748f 100644 --- a/lib/packets.h +++ b/lib/packets.h @@ -23,7 +23,7 @@ #include #include #include "compiler.h" -#include "geneve.h" +#include "openvswitch/geneve.h" #include "openvswitch/types.h" #include "odp-netlink.h" #include "random.h" diff --git a/lib/tun-metadata.h b/lib/tun-metadata.h index 4b0993e..14471de 100644 --- a/lib/tun-metadata.h +++ b/lib/tun-metadata.h @@ -20,10 +20,10 @@ #include #include "dynamic-string.h" -#include "geneve.h" #include "netlink.h" #include "ofpbuf.h" #include "openflow/openflow.h" +#include "openvswitch/geneve.h" struct flow_tnl; struct match;