The innermost flow may now be obtained from the flow and thus does not need to be passed explicitly to flow_extract_l3_onwards()
Signed-off-by: Simon Horman <ho...@verge.net.au> --- v1.12 * First post --- lib/flow.c | 6 +++--- lib/flow.h | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/flow.c b/lib/flow.c index a1c1cc1..71e961a 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -411,7 +411,7 @@ flow_extract(struct ofpbuf *packet, uint32_t skb_priority, uint32_t skb_mark, } packet->l3 = b.data; - flow_extract_l3_onwards(packet, flow, flow->dl_type); + flow_extract_l3_onwards(packet, flow); } /* Initializes l3 and higher 'flow' members from 'packet' @@ -427,10 +427,10 @@ flow_extract(struct ofpbuf *packet, uint32_t skb_priority, uint32_t skb_mark, * present and has a correct length, and otherwise NULL. */ void -flow_extract_l3_onwards(struct ofpbuf *packet, struct flow *flow, - ovs_be16 dl_type) +flow_extract_l3_onwards(struct ofpbuf *packet, struct flow *flow) { struct ofpbuf b; + ovs_be16 dl_type = flow_innermost_dl_type(flow); ofpbuf_use_const(&b, packet->l3, packet->size - (size_t)((char *)packet->l3 - (char *)packet->l2)); diff --git a/lib/flow.h b/lib/flow.h index 4abd13f..9ba785b 100644 --- a/lib/flow.h +++ b/lib/flow.h @@ -126,8 +126,7 @@ struct flow_metadata { void flow_extract(struct ofpbuf *, uint32_t priority, uint32_t mark, const struct flow_tnl *, uint16_t in_port, struct flow *); -void flow_extract_l3_onwards(struct ofpbuf *, struct flow *, - ovs_be16 dl_type); +void flow_extract_l3_onwards(struct ofpbuf *, struct flow *); /* Returns the innermost dl_type. * If there's an outer and an inner type then the inner type is returned. -- 1.7.10.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev