Merge remote-tracking branch 'origin/master' into pyloxi-ir
Conflicts:
py_gen/oftype.py
diff --git a/.abat-automerge b/.abat-automerge
new file mode 100755
index 0000000..1c2b4cb
--- /dev/null
+++ b/.abat-automerge
@@ -0,0 +1,5 @@
+#!/bin/bash -eux
+ROOTDIR=$(dirname $(readlink -f $0))
+cd "$ROOTDIR"
+
+make all check check-c check-py
diff --git a/Makefile b/Makefile
index 2fb303e..133b6fb 100644
--- a/Makefile
+++ b/Makefile
@@ -87,9 +87,9 @@
@echo "INPUT_FILES=\"${INPUT_FILES}\""
check:
- PYTHONPATH=. ./utest/test_parser.py
- PYTHONPATH=. ./utest/test_frontend.py
- PYTHONPATH=. ./utest/test_test_data.py
+ ./utest/test_parser.py
+ ./utest/test_frontend.py
+ ./utest/test_test_data.py
check-py: python
PYTHONPATH=${LOXI_OUTPUT_DIR}/pyloxi:. python py_gen/tests/generic_util.py
@@ -98,20 +98,19 @@
PYTHONPATH=${LOXI_OUTPUT_DIR}/pyloxi:. python py_gen/tests/of12.py
PYTHONPATH=${LOXI_OUTPUT_DIR}/pyloxi:. python py_gen/tests/of13.py
+CTEST_EXEC = ${LOXI_OUTPUT_DIR}/locitest/locitest
+CTEST_SOURCE = ${LOXI_OUTPUT_DIR}/locitest/src/*.c
+CTEST_SOURCE += ${LOXI_OUTPUT_DIR}/loci/src/*.c
+CTEST_INC = -I ${LOXI_OUTPUT_DIR}/loci/inc
+CTEST_INC += -I ${LOXI_OUTPUT_DIR}/locitest/inc
+CTEST_INC += -I ${LOXI_OUTPUT_DIR}/loci/src
+CTEST_CFLAGS = -Wall -Werror -g
+
check-c: c
- gcc -o ${LOXI_OUTPUT_DIR}/locitest/locitest ${LOXI_OUTPUT_DIR}/locitest/src/*.c ${LOXI_OUTPUT_DIR}/loci/src/*.c \
- -I ${LOXI_OUTPUT_DIR}/loci/inc -I ${LOXI_OUTPUT_DIR}/locitest/inc -I ${LOXI_OUTPUT_DIR}/loci/src
- ${LOXI_OUTPUT_DIR}/locitest/locitest
+ gcc ${CTEST_CFLAGS} -o ${CTEST_EXEC} ${CTEST_SOURCE} ${CTEST_INC}
+ ${CTEST_EXEC}
pylint:
pylint -E ${LOXI_PY_FILES}
.PHONY: all clean debug check pylint c python
-
-ifdef BIGCODE
-# Internal build system compatibility
-MODULE := LoxiGen
-LOXI_OUTPUT_DIR = ${BIGCODE}/Modules
-modulemake:
-.PHONY: modulemake
-endif
diff --git a/c_gen/c_code_gen.py b/c_gen/c_code_gen.py
index 0d44a6d..b9a5560 100644
--- a/c_gen/c_code_gen.py
+++ b/c_gen/c_code_gen.py
@@ -796,6 +796,7 @@
def common_top_matter(out, name):
loxi_utils.gen_c_copy_license(out)
out.write("""\
+
/****************************************************************
* File: %s
*
diff --git a/c_gen/c_match.py b/c_gen/c_match.py
index 84bc782..331b2c3 100644
--- a/c_gen/c_match.py
+++ b/c_gen/c_match.py
@@ -274,6 +274,8 @@
OF_OXM_INDEX_IPV6_ND_TLL = 33, /* Target link-layer for ND. */
OF_OXM_INDEX_MPLS_LABEL = 34, /* MPLS label. */
OF_OXM_INDEX_MPLS_TC = 35, /* MPLS TC. */
+ OF_OXM_INDEX_SRC_META_ID = 36,
+ OF_OXM_INDEX_DST_META_ID = 37,
};
#define OF_OXM_BIT(index) (((uint64_t) 1) << (index))
diff --git a/c_gen/templates/_copyright.c b/c_gen/templates/_copyright.c
new file mode 100644
index 0000000..4d38f6d
--- /dev/null
+++ b/c_gen/templates/_copyright.c
@@ -0,0 +1,31 @@
+:: # Copyright 2013, Big Switch Networks, Inc.
+:: #
+:: # LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
+:: # the following special exception:
+:: #
+:: # LOXI Exception
+:: #
+:: # As a special exception to the terms of the EPL, you may distribute libraries
+:: # generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided
+:: # that copyright and licensing notices generated by LoxiGen are not altered or removed
+:: # from the LoxiGen Libraries and the notice provided below is (i) included in
+:: # the LoxiGen Libraries, if distributed in source code form and (ii) included in any
+:: # documentation for the LoxiGen Libraries, if distributed in binary form.
+:: #
+:: # Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler."
+:: #
+:: # You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain
+:: # a copy of the EPL at:
+:: #
+:: # http://www.eclipse.org/legal/epl-v10.html
+:: #
+:: # 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
+:: # EPL for the specific language governing permissions and limitations
+:: # under the EPL.
+::
+/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University */
+/* Copyright (c) 2011, 2012 Open Networking Foundation */
+/* Copyright (c) 2012, 2013 Big Switch Networks, Inc. */
+/* See the file LICENSE.loci which should have been included in the source distribution */
diff --git a/c_gen/templates/bsn_ext.h b/c_gen/templates/bsn_ext.h
index 6afa211..d810ab3 100644
--- a/c_gen/templates/bsn_ext.h
+++ b/c_gen/templates/bsn_ext.h
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2013, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/**
* BSN OpenFlow extension definition header file
diff --git a/c_gen/templates/loci_dox.h b/c_gen/templates/loci_dox.h
index 86c29db..d37a6c1 100644
--- a/c_gen/templates/loci_dox.h
+++ b/c_gen/templates/loci_dox.h
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2013, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/**************************************************************************//**
*
diff --git a/c_gen/templates/loci_dump.h b/c_gen/templates/loci_dump.h
index 12bba6e..c2fd53a 100644
--- a/c_gen/templates/loci_dump.h
+++ b/c_gen/templates/loci_dump.h
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2012, Big Switch Networks, Inc. */
+:: include('_copyright.c')
#if !defined(_LOCI_DUMP_H_)
#define _LOCI_DUMP_H_
diff --git a/c_gen/templates/loci_int.h b/c_gen/templates/loci_int.h
index ce5ecb0..87cfd1e 100644
--- a/c_gen/templates/loci_int.h
+++ b/c_gen/templates/loci_int.h
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2013, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/******************************************************************************
*
diff --git a/c_gen/templates/loci_log.c b/c_gen/templates/loci_log.c
index cf34eae..2a06811 100644
--- a/c_gen/templates/loci_log.c
+++ b/c_gen/templates/loci_log.c
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2012, Big Switch Networks, Inc. */
+:: include('_copyright.c')
#include <stdarg.h>
diff --git a/c_gen/templates/loci_log.h b/c_gen/templates/loci_log.h
index 3e22d81..25b9a67 100644
--- a/c_gen/templates/loci_log.h
+++ b/c_gen/templates/loci_log.h
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2012, Big Switch Networks, Inc. */
+:: include('_copyright.c')
#if !defined(_LOCI_LOG_H_)
#define _LOCI_LOG_H_
diff --git a/c_gen/templates/loci_show.h b/c_gen/templates/loci_show.h
index a28a7d4..bf9b93b 100644
--- a/c_gen/templates/loci_show.h
+++ b/c_gen/templates/loci_show.h
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2012, Big Switch Networks, Inc. */
+:: include('_copyright.c')
#if !defined(_LOCI_SHOW_H_)
#define _LOCI_SHOW_H_
@@ -332,6 +332,8 @@
#define LOCI_SHOW_u32_ipv4_netmask(writer, cookie, val) LOCI_SHOW_ipv4(writer, cookie, val)
#define LOCI_SHOW_u8_l2_table_enable(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
#define LOCI_SHOW_u16_l2_table_priority(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_u8_src_meta_id(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_u8_dst_meta_id(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
diff --git a/c_gen/templates/locitest/locitest_config.c b/c_gen/templates/locitest/locitest_config.c
index c7c6fa2..837010e 100644
--- a/c_gen/templates/locitest/locitest_config.c
+++ b/c_gen/templates/locitest/locitest_config.c
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2012, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/******************************************************************************
*
diff --git a/c_gen/templates/locitest/locitest_enums.c b/c_gen/templates/locitest/locitest_enums.c
index 7c3f074..193f7cd 100644
--- a/c_gen/templates/locitest/locitest_enums.c
+++ b/c_gen/templates/locitest/locitest_enums.c
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2012, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/******************************************************************************
*
diff --git a/c_gen/templates/locitest/locitest_int.h b/c_gen/templates/locitest/locitest_int.h
index b058604..b4d6c7f 100644
--- a/c_gen/templates/locitest/locitest_int.h
+++ b/c_gen/templates/locitest/locitest_int.h
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2012, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/******************************************************************************
*
diff --git a/c_gen/templates/locitest/main.c b/c_gen/templates/locitest/main.c
index c3c9a77..df80f9f 100644
--- a/c_gen/templates/locitest/main.c
+++ b/c_gen/templates/locitest/main.c
@@ -1,3 +1,5 @@
+:: include('_copyright.c')
+
/**
* @file test_main
*
diff --git a/c_gen/templates/locitest/test_ext.c b/c_gen/templates/locitest/test_ext.c
index 1efcaf6..87f9916 100644
--- a/c_gen/templates/locitest/test_ext.c
+++ b/c_gen/templates/locitest/test_ext.c
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2012, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/**
* Test extensions
diff --git a/c_gen/templates/locitest/test_list_limits.c b/c_gen/templates/locitest/test_list_limits.c
index aef91d8..d8368ff 100644
--- a/c_gen/templates/locitest/test_list_limits.c
+++ b/c_gen/templates/locitest/test_list_limits.c
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2013, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/**
* Test that list append fails gracefully when running out of wire buffer
diff --git a/c_gen/templates/locitest/test_match_utils.c b/c_gen/templates/locitest/test_match_utils.c
index 6e4a95e..8b116bf 100644
--- a/c_gen/templates/locitest/test_match_utils.c
+++ b/c_gen/templates/locitest/test_match_utils.c
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2013, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/**
*
diff --git a/c_gen/templates/locitest/test_setup_from_add.c b/c_gen/templates/locitest/test_setup_from_add.c
index 6988572..d8911f3 100644
--- a/c_gen/templates/locitest/test_setup_from_add.c
+++ b/c_gen/templates/locitest/test_setup_from_add.c
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2013, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/**
* Test code for setup from flow add routines
diff --git a/c_gen/templates/locitest/test_utils.c b/c_gen/templates/locitest/test_utils.c
index adc6d42..bcd4194 100644
--- a/c_gen/templates/locitest/test_utils.c
+++ b/c_gen/templates/locitest/test_utils.c
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2013, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/**
*
diff --git a/c_gen/templates/locitest/test_validator.c b/c_gen/templates/locitest/test_validator.c
index cac67f7..db8079e 100644
--- a/c_gen/templates/locitest/test_validator.c
+++ b/c_gen/templates/locitest/test_validator.c
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2013, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/**
* Test message validator
diff --git a/c_gen/templates/locitest/unittest.h b/c_gen/templates/locitest/unittest.h
index 7ffc413..c897d67 100644
--- a/c_gen/templates/locitest/unittest.h
+++ b/c_gen/templates/locitest/unittest.h
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2013, Big Switch Networks, Inc. */
+:: include('_copyright.c')
#ifndef UNITTEST_H
#define UNITTEST_H
diff --git a/c_gen/templates/of_buffer.h b/c_gen/templates/of_buffer.h
index 05cc587..1788939 100644
--- a/c_gen/templates/of_buffer.h
+++ b/c_gen/templates/of_buffer.h
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2013, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/****************************************************************
*
diff --git a/c_gen/templates/of_doc.h b/c_gen/templates/of_doc.h
index 9e352f0..d9bf64b 100644
--- a/c_gen/templates/of_doc.h
+++ b/c_gen/templates/of_doc.h
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2013, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/**
* @file of_doc.h
diff --git a/c_gen/templates/of_message.h b/c_gen/templates/of_message.h
index 77066bc..944f6d2 100644
--- a/c_gen/templates/of_message.h
+++ b/c_gen/templates/of_message.h
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2013, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/*
* These routines manipulate a low level buffer assuming it holds
diff --git a/c_gen/templates/of_object.c b/c_gen/templates/of_object.c
index a5cfecd..0b3ec3a 100644
--- a/c_gen/templates/of_object.c
+++ b/c_gen/templates/of_object.c
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2013, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/****************************************************************
*
diff --git a/c_gen/templates/of_object.h b/c_gen/templates/of_object.h
index cb9342e..ff4c9c5 100644
--- a/c_gen/templates/of_object.h
+++ b/c_gen/templates/of_object.h
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2013, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/*
* @fixme THIS FILE NEEDS CLEANUP. It may just go away.
diff --git a/c_gen/templates/of_type_maps.c b/c_gen/templates/of_type_maps.c
index f1fab57..2c1032d 100644
--- a/c_gen/templates/of_type_maps.c
+++ b/c_gen/templates/of_type_maps.c
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2013, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/****************************************************************
*
diff --git a/c_gen/templates/of_utils.c b/c_gen/templates/of_utils.c
index f9c1972..ba22536 100644
--- a/c_gen/templates/of_utils.c
+++ b/c_gen/templates/of_utils.c
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2013, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/****************************************************************
* File: of_utils.h
diff --git a/c_gen/templates/of_utils.h b/c_gen/templates/of_utils.h
index 1a3a29a..5510d67 100644
--- a/c_gen/templates/of_utils.h
+++ b/c_gen/templates/of_utils.h
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2013, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/****************************************************************
* File: of_utils.h
diff --git a/c_gen/templates/of_wire_buf.c b/c_gen/templates/of_wire_buf.c
index acfcb84..054dc01 100644
--- a/c_gen/templates/of_wire_buf.c
+++ b/c_gen/templates/of_wire_buf.c
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2013, Big Switch Networks, Inc. */
+:: include('_copyright.c')
/****************************************************************
*
diff --git a/c_gen/templates/of_wire_buf.h b/c_gen/templates/of_wire_buf.h
index cf1ee17..9e91b9b 100644
--- a/c_gen/templates/of_wire_buf.h
+++ b/c_gen/templates/of_wire_buf.h
@@ -25,7 +25,7 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
-/* Copyright 2013, Big Switch Networks, Inc. */
+:: include('_copyright.c')
#if !defined(_OF_WIRE_BUF_H_)
#define _OF_WIRE_BUF_H_
diff --git a/loxi_front_end/match.py b/loxi_front_end/match.py
index 42c0a9e..5c83859 100644
--- a/loxi_front_end/match.py
+++ b/loxi_front_end/match.py
@@ -394,6 +394,28 @@
takes_mask_in_spec=False,
order=501,
),
+
+ src_meta_id = dict(
+ name="src_meta_id",
+ m_type="uint8_t",
+ v1_wc_shift=23,
+ v2_wc_shift=23,
+ print_type="PRIx8",
+ conditions="",
+ takes_mask_in_spec=False,
+ order=600,
+ ),
+
+ dst_meta_id = dict(
+ name="dst_meta_id",
+ m_type="uint8_t",
+ v1_wc_shift=24,
+ v2_wc_shift=24,
+ print_type="PRIx8",
+ conditions="",
+ takes_mask_in_spec=False,
+ order=601,
+ ),
)
match_keys_sorted = of_match_members.keys()
@@ -411,7 +433,9 @@
"tcp_dst", # Means UDP too for 1.0 and 1.1
"tcp_src", # Means UDP too for 1.0 and 1.1
"vlan_pcp",
- "vlan_vid"
+ "vlan_vid",
+ "src_meta_id",
+ "dst_meta_id",
]
of_v2_keys = [
diff --git a/loxi_utils/loxi_utils.py b/loxi_utils/loxi_utils.py
index d14cb43..648e109 100644
--- a/loxi_utils/loxi_utils.py
+++ b/loxi_utils/loxi_utils.py
@@ -476,12 +476,8 @@
"""
Generate the top comments for copyright and license
"""
- out.write("""\
-/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University */
-/* Copyright (c) 2011, 2012 Open Networking Foundation */
-/* Copyright (c) 2012, 2013 Big Switch Networks, Inc. */
-
-""")
+ import c_gen.util
+ c_gen.util.render_template(out, '_copyright.c')
def accessor_returns_error(a_type, m_type):
is_var_len = (not type_is_scalar(m_type)) and \
diff --git a/openflow_input/bsn_pktin_suppression b/openflow_input/bsn_pktin_suppression
index 4dcf71d..281d6d4 100644
--- a/openflow_input/bsn_pktin_suppression
+++ b/openflow_input/bsn_pktin_suppression
@@ -55,7 +55,7 @@
// The switch should reject the message if both 'hard_timeout' and 'idle_timeout'
// are zero, since the suppression flows would never expire.
-struct of_bsn_set_pktin_suppression {
+struct of_bsn_set_pktin_suppression_request {
uint8_t version;
uint8_t type == 4;
uint16_t length;
@@ -69,3 +69,13 @@
uint16_t priority;
uint64_t cookie;
};
+
+struct of_bsn_set_pktin_suppression_reply {
+ uint8_t version;
+ uint8_t type == 4;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter == 0x5c16c7;
+ uint32_t subtype == 25;
+ uint32_t status; // 0 means success
+};
diff --git a/openflow_input/bsn_vport b/openflow_input/bsn_vport
index cb197dd..476527a 100644
--- a/openflow_input/bsn_vport
+++ b/openflow_input/bsn_vport
@@ -80,11 +80,12 @@
uint32_t xid; // Must match create_request
uint32_t experimenter == 0x5c16c7;
uint32_t subtype == 16;
+ uint32_t status; // 0 means success
uint32_t vport_no; // The OF port number created. 16-bits for OF 1.0
};
// Request from controller to switch to remove a vport
-struct of_bsn_virtual_port_remove {
+struct of_bsn_virtual_port_remove_request {
uint8_t version;
uint8_t type == 4;
uint16_t length;
@@ -93,3 +94,14 @@
uint32_t subtype == 17;
uint32_t vport_no; // The OF port number to be removed
};
+
+// Request from controller to switch to remove a vport
+struct of_bsn_virtual_port_remove_reply {
+ uint8_t version;
+ uint8_t type == 4;
+ uint16_t length;
+ uint32_t xid; // Must match request xid
+ uint32_t experimenter == 0x5c16c7;
+ uint32_t subtype == 26;
+ uint32_t status; // 0 means success
+};
diff --git a/openflow_input/oxm-1.2 b/openflow_input/oxm-1.2
index b18c6fb..37737c1 100644
--- a/openflow_input/oxm-1.2
+++ b/openflow_input/oxm-1.2
@@ -433,3 +433,25 @@
uint16_t value;
uint16_t value_mask;
};
+
+struct of_oxm_src_meta_id {
+ uint32_t type_len == 0x0003f001;
+ uint8_t value;
+};
+
+struct of_oxm_src_meta_id_masked {
+ uint32_t type_len == 0x0003f102;
+ uint8_t value;
+ uint8_t value_mask;
+};
+
+struct of_oxm_dst_meta_id {
+ uint32_t type_len == 0x0003f201;
+ uint8_t value;
+};
+
+struct of_oxm_dst_meta_id_masked {
+ uint32_t type_len == 0x0003f302;
+ uint8_t value;
+ uint8_t value_mask;
+};
diff --git a/openflow_input/standard-1.0 b/openflow_input/standard-1.0
index 5d4405c..895a0b9 100644
--- a/openflow_input/standard-1.0
+++ b/openflow_input/standard-1.0
@@ -156,6 +156,8 @@
OFPFW_NW_DST_MASK = 0xfc000,
OFPFW_DL_VLAN_PCP = 0x100000,
OFPFW_NW_TOS = 0x200000,
+ OFPFW_SRC_META_ID = 0x400000,
+ OFPFW_DST_META_ID = 0x800000,
OFPFW_ALL = 0x3fffff,
};
@@ -562,7 +564,8 @@
uint16_t eth_type;
uint8_t ip_dscp;
uint8_t ip_proto;
- pad(2);
+ uint8_t src_meta_id;
+ uint8_t dst_meta_id;
uint32_t ipv4_src;
uint32_t ipv4_dst;
uint16_t tcp_src;
diff --git a/py_gen/templates/_copyright.py b/py_gen/templates/_copyright.py
index 24dc1b6..6084abe 100644
--- a/py_gen/templates/_copyright.py
+++ b/py_gen/templates/_copyright.py
@@ -28,3 +28,4 @@
# Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
# Copyright (c) 2011, 2012 Open Networking Foundation
# Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+# See the file LICENSE.pyloxi which should have been included in the source distribution
diff --git a/test_data/of10/flow_add.data b/test_data/of10/flow_add.data
index 9801a36..42fca89 100644
--- a/test_data/of10/flow_add.data
+++ b/test_data/of10/flow_add.data
@@ -42,6 +42,8 @@
eth_type = 0x0,
ip_dscp = 0x0,
ip_proto = 0x0,
+ src_meta_id = 0x0,
+ dst_meta_id = 0x0,
ipv4_src = 192.168.3.127,
ipv4_dst = 255.255.255.255,
tcp_src = 0x0,
diff --git a/utest/test_frontend.py b/utest/test_frontend.py
index 1f284b0..01b8270 100755
--- a/utest/test_frontend.py
+++ b/utest/test_frontend.py
@@ -26,7 +26,13 @@
# EPL for the specific language governing permissions and limitations
# under the EPL.
+import sys
+import os
import unittest
+
+root_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')
+sys.path.insert(0, root_dir)
+
import loxi_front_end.parser as parser
import loxi_front_end.frontend as frontend
from loxi_ir import *
diff --git a/utest/test_parser.py b/utest/test_parser.py
index cb22a9c..40d2913 100755
--- a/utest/test_parser.py
+++ b/utest/test_parser.py
@@ -26,7 +26,13 @@
# EPL for the specific language governing permissions and limitations
# under the EPL.
+import sys
+import os
import unittest
+
+root_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')
+sys.path.insert(0, root_dir)
+
import pyparsing
import loxi_front_end.parser as parser
diff --git a/utest/test_test_data.py b/utest/test_test_data.py
index 16cf440..d0ed683 100755
--- a/utest/test_test_data.py
+++ b/utest/test_test_data.py
@@ -26,7 +26,13 @@
# EPL for the specific language governing permissions and limitations
# under the EPL.
+import sys
+import os
import unittest
+
+root_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')
+sys.path.insert(0, root_dir)
+
import test_data
class DataFileTests(unittest.TestCase):