Merge into master from pull request #238:
shrink of_object_t (https://github.com/floodlight/loxigen/pull/238)
diff --git a/c_gen/c_code_gen.py b/c_gen/c_code_gen.py
index 45eca7f..b43675a 100644
--- a/c_gen/c_code_gen.py
+++ b/c_gen/c_code_gen.py
@@ -2143,6 +2143,10 @@
if not type_maps.class_is_virtual(cls):
gen_wire_push_fn(cls, out)
+ uclass = loxi_globals.unified.class_by_name(cls)
+ is_fixed_length = uclass and uclass.is_fixed_length
+ max_length = is_fixed_length and "bytes" or "OF_WIRE_BUFFER_MAX_LENGTH"
+
out.write("""
/**
* Create a new %(cls)s object
@@ -2167,13 +2171,12 @@
bytes = of_object_fixed_len[version][%(enum)s] + of_object_extra_len[version][%(enum)s];
- /* Allocate a maximum-length wire buffer assuming we'll be appending to it. */
- if ((obj = (%(cls)s_t *)of_object_new(OF_WIRE_BUFFER_MAX_LENGTH)) == NULL) {
+ if ((obj = (%(cls)s_t *)of_object_new(%(max_length)s)) == NULL) {
return NULL;
}
%(cls)s_init(obj, version, bytes, 0);
-""" % dict(cls=cls, enum=enum_name(cls)))
+""" % dict(cls=cls, enum=enum_name(cls), max_length=max_length))
if not type_maps.class_is_virtual(cls):
out.write("""
if (%(cls)s_push_wire_values(obj) < 0) {
diff --git a/java_gen/java_type.py b/java_gen/java_type.py
index f55e7d3..f345e08 100644
--- a/java_gen/java_type.py
+++ b/java_gen/java_type.py
@@ -649,6 +649,7 @@
'of_bsn_set_l2_table_request': { 'l2_table_enable': boolean },
'of_bsn_set_l2_table_reply': { 'l2_table_enable': boolean },
'of_bsn_set_pktin_suppression_request': { 'enabled': boolean },
+ 'of_bsn_controller_connection': { 'auxiliary_id' : of_aux_id},
'of_flow_stats_request': { 'out_group': of_group_default_any },
'of_aggregate_stats_request': { 'out_group': of_group_default_any },
diff --git a/java_gen/pre-written/pom.xml b/java_gen/pre-written/pom.xml
index 4f0dc74..b4e81cc 100644
--- a/java_gen/pre-written/pom.xml
+++ b/java_gen/pre-written/pom.xml
@@ -179,7 +179,7 @@
<failOnNoGitDirectory>false</failOnNoGitDirectory>
<gitDescribe>
- <skip>false</skip>
+ <skip>true</skip>
<always>true</always>
<abbrev>7</abbrev>
<dirty>-dirty</dirty>
@@ -211,10 +211,20 @@
<projectName>${project.name}</projectName>
<version>${project.version}</version>
<vcsRevision>${git.commit.id.abbrev}</vcsRevision>
- <vcsBranch>${git.branch}</vcsBranch>
- <vcsDirty>${git.commit.id.describe}</vcsDirty>
+ <!-- note: git.branch does not work in jenkins, because jenkins
+ builds the system in 'detached head' state. Because we mostly
+ about jenkins builds, we instead use the environment variable
+ GIT_BRANCH set by jenkins here -->
+ <vcsBranch>${env.GIT_BRANCH}</vcsBranch>
<buildUser>${user.name}</buildUser>
<buildDate>${git.build.time}</buildDate>
+ <!-- continuous integration information from jenkins env variables:
+ https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-below -->
+ <ciBuildNumber>${env.BUILD_NUMBER}</ciBuildNumber>
+ <ciBuildId>${env.BUILD_ID}</ciBuildId>
+ <ciBuildTag>${env.BUILD_TAG}</ciBuildTag>
+ <ciJobName>${env.JOB_NAME}</ciJobName>
+i <ciNodeName>${env.NODE_NAME}</ciNodeName>
</manifestEntries>
</manifestSection>
</manifestSections>
diff --git a/openflow_input/bsn_tlv b/openflow_input/bsn_tlv
index 2805f1e..01d7683 100644
--- a/openflow_input/bsn_tlv
+++ b/openflow_input/bsn_tlv
@@ -148,3 +148,9 @@
uint16_t length;
uint16_t value;
};
+
+struct of_bsn_tlv_vrf : of_bsn_tlv {
+ uint16_t type == 19;
+ uint16_t length;
+ uint32_t value;
+};