2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +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

@@ -535,7 +535,8 @@ process_packet_in(struct lswitch *sw, const struct ofp_header *oh)
/* Extract flow data from 'opi' into 'flow'. */
ofpbuf_use_const(&pkt, pi.packet, pi.packet_len);
flow_extract(&pkt, 0, pi.fmd.tun_id, pi.fmd.in_port, &flow);
flow_extract(&pkt, 0, NULL, pi.fmd.in_port, &flow);
flow.tunnel.tun_id = pi.fmd.tun_id;
/* Choose output port. */
out_port = lswitch_choose_destination(sw, &flow);