2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00

flow: Extend struct flow to contain tunnel outer header.

Soon the kernel will begin supplying the information about the outer
IP header for tunneled packets and userspace will need to be able to
track it as part of the flow.  For the time being this is only used
internally by OVS and not exposed outwards to OpenFlow.  As a result,
this threads the information throughout userspace but simply stores
the existing tun_id in it.

Signed-off-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
Jesse Gross
2012-09-13 20:11:08 -07:00
parent f0b8759908
commit 296e07ace0
21 changed files with 162 additions and 107 deletions

View File

@@ -139,7 +139,7 @@ ofputil_match_from_ofp10_match(const struct ofp10_match *ofmatch,
uint32_t ofpfw = ntohl(ofmatch->wildcards) & OFPFW10_ALL;
/* Initialize match->wc. */
memset(match->flow.zeros, 0, sizeof match->flow.zeros);
memset(&match->flow, 0, sizeof match->flow);
ofputil_wildcard_from_ofpfw10(ofpfw, &match->wc);
/* Initialize most of match->flow. */
@@ -934,7 +934,7 @@ ofputil_usable_protocols(const struct match *match)
}
/* Only NXM supports matching tun_id. */
if (wc->masks.tun_id != htonll(0)) {
if (wc->masks.tunnel.tun_id != htonll(0)) {
return OFPUTIL_P_NXM_ANY;
}
@@ -2055,7 +2055,7 @@ ofputil_decode_packet_in_finish(struct ofputil_packet_in *pin,
pin->packet_len = b->size;
pin->fmd.in_port = match->flow.in_port;
pin->fmd.tun_id = match->flow.tun_id;
pin->fmd.tun_id = match->flow.tunnel.tun_id;
pin->fmd.metadata = match->flow.metadata;
memcpy(pin->fmd.regs, match->flow.regs, sizeof pin->fmd.regs);
}