diff --git a/src/python/loxi/of13/common.py b/src/python/loxi/of13/common.py
index 43e1ee6..31eecb3 100644
--- a/src/python/loxi/of13/common.py
+++ b/src/python/loxi/of13/common.py
@@ -972,7 +972,7 @@
 class bsn_vport_l2gre(bsn_vport):
     type = 1
 
-    def __init__(self, flags=None, port_no=None, loopback_port_no=None, local_mac=None, nh_mac=None, src_ip=None, dst_ip=None, dscp=None, ttl=None, vpn=None, if_name=None):
+    def __init__(self, flags=None, port_no=None, loopback_port_no=None, local_mac=None, nh_mac=None, src_ip=None, dst_ip=None, dscp=None, ttl=None, vpn=None, rate_limit=None, if_name=None):
         if flags != None:
             self.flags = flags
         else:
@@ -1013,6 +1013,10 @@
             self.vpn = vpn
         else:
             self.vpn = 0
+        if rate_limit != None:
+            self.rate_limit = rate_limit
+        else:
+            self.rate_limit = 0
         if if_name != None:
             self.if_name = if_name
         else:
@@ -1034,6 +1038,7 @@
         packed.append(struct.pack("!B", self.ttl))
         packed.append('\x00' * 2)
         packed.append(struct.pack("!L", self.vpn))
+        packed.append(struct.pack("!L", self.rate_limit))
         packed.append(struct.pack("!16s", self.if_name))
         length = sum([len(x) for x in packed])
         packed[1] = struct.pack("!H", length)
@@ -1058,6 +1063,7 @@
         obj.ttl = reader.read("!B")[0]
         reader.skip(2)
         obj.vpn = reader.read("!L")[0]
+        obj.rate_limit = reader.read("!L")[0]
         obj.if_name = reader.read("!16s")[0].rstrip("\x00")
         return obj
 
@@ -1073,6 +1079,7 @@
         if self.dscp != other.dscp: return False
         if self.ttl != other.ttl: return False
         if self.vpn != other.vpn: return False
+        if self.rate_limit != other.rate_limit: return False
         if self.if_name != other.if_name: return False
         return True
 
@@ -1111,6 +1118,9 @@
                 q.text("vpn = ");
                 q.text("%#x" % self.vpn)
                 q.text(","); q.breakable()
+                q.text("rate_limit = ");
+                q.text("%#x" % self.rate_limit)
+                q.text(","); q.breakable()
                 q.text("if_name = ");
                 q.pp(self.if_name)
             q.breakable()
diff --git a/src/python/loxi/of13/const.py b/src/python/loxi/of13/const.py
index 22fc76e..0d2e531 100644
--- a/src/python/loxi/of13/const.py
+++ b/src/python/loxi/of13/const.py
@@ -395,12 +395,14 @@
 OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2
 OF_BSN_VPORT_L2GRE_DSCP_COPY = 4
 OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID = 8
+OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID = 16
 
 ofp_bsn_vport_l2gre_flags_map = {
     1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID',
     2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN',
     4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY',
     8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID',
+    16: 'OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID',
 }
 
 # Identifiers from group ofp_bsn_vport_q_in_q_untagged
diff --git a/src/python/loxi/of13/instruction.py b/src/python/loxi/of13/instruction.py
index 22d202f..787c958 100644
--- a/src/python/loxi/of13/instruction.py
+++ b/src/python/loxi/of13/instruction.py
@@ -715,6 +715,54 @@
 
 bsn.subtypes[8] = bsn_require_vlan_xlate
 
+class bsn_span_destination(bsn):
+    type = 65535
+    experimenter = 6035143
+    subtype = 10
+
+    def __init__(self):
+        return
+
+    def pack(self):
+        packed = []
+        packed.append(struct.pack("!H", self.type))
+        packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
+        packed.append(struct.pack("!L", self.experimenter))
+        packed.append(struct.pack("!L", self.subtype))
+        packed.append('\x00' * 4)
+        length = sum([len(x) for x in packed])
+        packed[1] = struct.pack("!H", length)
+        return ''.join(packed)
+
+    @staticmethod
+    def unpack(reader):
+        obj = bsn_span_destination()
+        _type = reader.read("!H")[0]
+        assert(_type == 65535)
+        _len = reader.read("!H")[0]
+        orig_reader = reader
+        reader = orig_reader.slice(_len - (2 + 2))
+        _experimenter = reader.read("!L")[0]
+        assert(_experimenter == 6035143)
+        _subtype = reader.read("!L")[0]
+        assert(_subtype == 10)
+        reader.skip(4)
+        return obj
+
+    def __eq__(self, other):
+        if type(self) != type(other): return False
+        return True
+
+    def pretty_print(self, q):
+        q.text("bsn_span_destination {")
+        with q.group():
+            with q.indent(2):
+                q.breakable()
+            q.breakable()
+        q.text('}')
+
+bsn.subtypes[10] = bsn_span_destination
+
 class clear_actions(instruction):
     type = 5
 
diff --git a/src/python/loxi/of13/instruction_id.py b/src/python/loxi/of13/instruction_id.py
index 28fc0f0..b08b27a 100644
--- a/src/python/loxi/of13/instruction_id.py
+++ b/src/python/loxi/of13/instruction_id.py
@@ -673,6 +673,52 @@
 
 bsn.subtypes[8] = bsn_require_vlan_xlate
 
+class bsn_span_destination(bsn):
+    type = 65535
+    experimenter = 6035143
+    subtype = 10
+
+    def __init__(self):
+        return
+
+    def pack(self):
+        packed = []
+        packed.append(struct.pack("!H", self.type))
+        packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
+        packed.append(struct.pack("!L", self.experimenter))
+        packed.append(struct.pack("!L", self.subtype))
+        length = sum([len(x) for x in packed])
+        packed[1] = struct.pack("!H", length)
+        return ''.join(packed)
+
+    @staticmethod
+    def unpack(reader):
+        obj = bsn_span_destination()
+        _type = reader.read("!H")[0]
+        assert(_type == 65535)
+        _len = reader.read("!H")[0]
+        orig_reader = reader
+        reader = orig_reader.slice(_len - (2 + 2))
+        _experimenter = reader.read("!L")[0]
+        assert(_experimenter == 6035143)
+        _subtype = reader.read("!L")[0]
+        assert(_subtype == 10)
+        return obj
+
+    def __eq__(self, other):
+        if type(self) != type(other): return False
+        return True
+
+    def pretty_print(self, q):
+        q.text("bsn_span_destination {")
+        with q.group():
+            with q.indent(2):
+                q.breakable()
+            q.breakable()
+        q.text('}')
+
+bsn.subtypes[10] = bsn_span_destination
+
 class clear_actions(instruction_id):
     type = 5
 
