diff options
author | Jesse Gross <jesse@nicira.com> | 2010-04-12 11:49:16 -0400 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2010-04-19 09:11:51 -0400 |
commit | 659586efcf6f9539282da9447007897907c41112 (patch) | |
tree | baffec5ba051a06cfb2a6fa84d0837068aca54f3 /lib/vconn.c | |
parent | db0e2ad101f10288c002bd537047f3d9e1979c9f (diff) |
tunneling: Add support for tunnel ID.
Add a tun_id field which contains the ID of the encapsulating tunnel
on which a packet was received (0 if not received on a tunnel). Also
add an action which allows the tunnel ID to be set for outgoing
packets. At this point there aren't any tunnel implementations so
these fields don't have any effect.
The matching is exposed to OpenFlow by overloading the high 32 bits
of the cookie as the tunnel ID. ovs-ofctl is capable of turning
on this special behavior using a new "tun-cookie" command but this
command is intentially undocumented to avoid it being used without
a full understanding of the consequences.
Diffstat (limited to 'lib/vconn.c')
-rw-r--r-- | lib/vconn.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/vconn.c b/lib/vconn.c index 99d5a54d..80ba471b 100644 --- a/lib/vconn.c +++ b/lib/vconn.c @@ -1358,6 +1358,7 @@ check_nicira_action(const union ofp_action *a, unsigned int len) switch (ntohs(nah->subtype)) { case NXAST_RESUBMIT: + case NXAST_SET_TUNNEL: return check_action_exact_len(a, len, 16); default: return ofp_mkerr(OFPET_BAD_ACTION, OFPBAC_BAD_VENDOR_TYPE); @@ -1466,7 +1467,7 @@ normalize_match(struct ofp_match *m) enum { OFPFW_TP = OFPFW_TP_SRC | OFPFW_TP_DST }; uint32_t wc; - wc = ntohl(m->wildcards) & OFPFW_ALL; + wc = ntohl(m->wildcards) & OVSFW_ALL; if (wc & OFPFW_DL_TYPE) { m->dl_type = 0; |