diff options
author | Jarno Rajahalme <jarno@ovn.org> | 2016-09-14 16:51:27 -0700 |
---|---|---|
committer | Jarno Rajahalme <jarno@ovn.org> | 2016-09-14 16:51:27 -0700 |
commit | 1f4a893366826e392722d5b1ba59e94331bfe5c9 (patch) | |
tree | 78c6b3d23395707020e9cb5d41f3d0bc5d616c5f /ofproto/ofproto-dpif-xlate.h | |
parent | 493f017d8ad57aff226fb26e177b64b02a15cea4 (diff) | |
download | openvswitch-1f4a893366826e392722d5b1ba59e94331bfe5c9.tar.gz |
ofproto: Refactor packet_out handling.
Refactor handle_packet_out() to prepare for bundle support for packet
outs in a later patch.
Two new callbacks are introduced in ofproto-provider class:
->packet_xlate() and ->packet_execute(). ->packet_xlate() translates
the packet using the flow and actions provided by the caller, but
defers all OpenFlow-visible side-effects (stats, learn actions, actual
packet output, etc.) to be explicitly executed with the
->packet_execute() call.
Adds a new ofproto_rule_reduce_timeouts__() that must be called with
'ofproto_mutex' held. This is used in the next patch.
Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto/ofproto-dpif-xlate.h')
-rw-r--r-- | ofproto/ofproto-dpif-xlate.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ofproto/ofproto-dpif-xlate.h b/ofproto/ofproto-dpif-xlate.h index fbe1ad52f..1768740ed 100644 --- a/ofproto/ofproto-dpif-xlate.h +++ b/ofproto/ofproto-dpif-xlate.h @@ -46,6 +46,7 @@ struct xlate_out { struct xlate_in { struct ofproto_dpif *ofproto; + ovs_version_t tables_version; /* Lookup in this version. */ /* Flow to which the OpenFlow actions apply. xlate_actions() will modify * this flow when actions change header fields. */ @@ -202,7 +203,7 @@ const char *xlate_strerror(enum xlate_error error); enum xlate_error xlate_actions(struct xlate_in *, struct xlate_out *); -void xlate_in_init(struct xlate_in *, struct ofproto_dpif *, +void xlate_in_init(struct xlate_in *, struct ofproto_dpif *, ovs_version_t, const struct flow *, ofp_port_t in_port, struct rule_dpif *, uint16_t tcp_flags, const struct dp_packet *packet, struct flow_wildcards *, struct ofpbuf *odp_actions); |