From patchwork Mon Feb 22 23:46:52 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: 586589 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 4EEB6140B9E for ; Tue, 23 Feb 2016 10:48:12 +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=gRH+3gTp; dkim-atps=neutral Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id E2F071092B; Mon, 22 Feb 2016 15:47:26 -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 060C0108EA for ; Mon, 22 Feb 2016 15:47:24 -0800 (PST) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 92D1C16171F for ; Mon, 22 Feb 2016 16:47:23 -0700 (MST) X-ASG-Debug-ID: 1456184842-0b32373df304610001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar6.cudamail.com with ESMTP id 4r8inJCW8SkbfAqU (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 22 Feb 2016 16:47:22 -0700 (MST) X-Barracuda-Envelope-From: ben@skyportsystems.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.2 Received: from unknown (HELO mail-pa0-f50.google.com) (209.85.220.50) by mx3-pf1.cudamail.com with ESMTPS (RC4-SHA encrypted); 22 Feb 2016 23:47:15 -0000 Received-SPF: pass (mx3-pf1.cudamail.com: SPF record at _netblocks.google.com designates 209.85.220.50 as permitted sender) X-Barracuda-Apparent-Source-IP: 209.85.220.50 X-Barracuda-RBL-IP: 209.85.220.50 Received: by mail-pa0-f50.google.com with SMTP id ho8so101683303pac.2 for ; Mon, 22 Feb 2016 15:47:15 -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; bh=WGBjR4SFKqn4c4yEtVuaAMQflmTqWQI/PccHF98Q8fY=; b=gRH+3gTp+lDpICuw+evik7CndOJduenHTG+lgITQF6QYImUSb4Nc7KmJefuFih+E9q pkD0ggZaTVEsiqPkMQ+a7L4p7gZ8N0hLF9IZIvj4ngXP90x8apv57mmvq2kLUd2E28J6 zMpI6x9Rn4+XGIyuxaG9fL0+hccg8Lj8jrotQ= 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; bh=WGBjR4SFKqn4c4yEtVuaAMQflmTqWQI/PccHF98Q8fY=; b=mcjGyGeewp6QYwGVn4rOFx/to25OIbbFb0brzkzye2/EBkrnJ1WXFLxAbnuPtjXpay hAvpgeXWXZW6oCtlh8vIMo6MuCwbQdHBRG1PWE8/L6Zyq8MKjFy8/I1erUbWVlVqjlJr Yr8E2K352YhI7CuA95HbCObm4LPmp203dRxC1yM5FRLZOzJ7/61/Gp98i/4R71qwmanw h2ozRJ/EJbk2Cv9/SdVEG9jPvt+IhqEgnOyXR0XHOAZURIoHLBN5caXORdpiUyF0wL/q F+/rhEoI1qTkdLRIPBaL+NQOCfo1C8Y+Hzo7fdN+4J/tW2jBCEP0OVLtgE3XLavtKIu9 idrA== X-Gm-Message-State: AG10YOQObEUHpoz6pEtTwn+8kckIKWh4HbsU20Zggrki95T/qCnhAxXTaH0W0HTNn3AjaDFf X-Received: by 10.66.138.74 with SMTP id qo10mr27146935pab.140.1456184834751; Mon, 22 Feb 2016 15:47: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 cq4sm39516565pad.28.2016.02.22.15.47.14 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 22 Feb 2016 15:47:14 -0800 (PST) X-CudaMail-Envelope-Sender: ben@skyportsystems.com From: ben@skyportsystems.com To: dev@openvswitch.org X-CudaMail-MID: CM-V1-221059757 X-CudaMail-DTE: 022216 X-CudaMail-Originating-IP: 209.85.220.50 Date: Mon, 22 Feb 2016 15:46:52 -0800 X-ASG-Orig-Subj: [##CM-V1-221059757##][PATCH 2/9] Move lib/geneve.h to include/openvswitch directory Message-Id: <1456184819-56124-3-git-send-email-ben@skyportsystems.com> X-Mailer: git-send-email 2.5.4 (Apple Git-61) In-Reply-To: <1456184819-56124-1-git-send-email-ben@skyportsystems.com> References: <1456184819-56124-1-git-send-email-ben@skyportsystems.com> X-GBUdb-Analysis: 0, 209.85.220.50, Ugly c=0.387593 p=-0.302326 Source Normal X-MessageSniffer-Rules: 0-0-0-10568-c X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1456184842 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.27250 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 2/9] 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 f1445de..916ad51 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;