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-cache.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-cache.h')
-rw-r--r-- | ofproto/ofproto-dpif-xlate-cache.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ofproto/ofproto-dpif-xlate-cache.h b/ofproto/ofproto-dpif-xlate-cache.h index 4b30181a7..a15adbe64 100644 --- a/ofproto/ofproto-dpif-xlate-cache.h +++ b/ofproto/ofproto-dpif-xlate-cache.h @@ -130,12 +130,14 @@ struct xlate_cache { struct ofpbuf entries; }; +void xlate_cache_init(struct xlate_cache *); struct xlate_cache *xlate_cache_new(void); struct xc_entry *xlate_cache_add_entry(struct xlate_cache *, enum xc_type); void xlate_push_stats_entry(struct xc_entry *, const struct dpif_flow_stats *); void xlate_push_stats(struct xlate_cache *, const struct dpif_flow_stats *); void xlate_cache_clear_entry(struct xc_entry *); void xlate_cache_clear(struct xlate_cache *); +void xlate_cache_uninit(struct xlate_cache *); void xlate_cache_delete(struct xlate_cache *); #endif /* ofproto-dpif-xlate-cache.h */ |