X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ofproto%2Fofproto-dpif-xlate.h;fp=ofproto%2Fofproto-dpif-xlate.h;h=760736a645d984859e63a4385491b17880230c58;hb=7d78f21c057ff50a823220d809ac38c3d907243c;hp=8b53e10d3fcfb04933dac97818b9e50cb8854bc4;hpb=8d25251929c8f325bed0fff24192d5a87034b32e;p=sliver-openvswitch.git diff --git a/ofproto/ofproto-dpif-xlate.h b/ofproto/ofproto-dpif-xlate.h index 8b53e10d3..760736a64 100644 --- a/ofproto/ofproto-dpif-xlate.h +++ b/ofproto/ofproto-dpif-xlate.h @@ -31,11 +31,12 @@ struct lacp; struct dpif_ipfix; struct dpif_sflow; struct mac_learning; +struct xlate_cache; struct xlate_recirc { uint32_t recirc_id; /* !0 Use recirculation instead of output. */ uint8_t hash_alg; /* !0 Compute hash for recirc before. */ - uint32_t hash_bias; /* Compute hash for recirc before. */ + uint32_t hash_basis; /* Compute hash for recirc before. */ }; struct xlate_out { @@ -56,9 +57,6 @@ struct xlate_out { ofp_port_t nf_output_iface; /* Output interface index for NetFlow. */ mirror_mask_t mirrors; /* Bitmap of associated mirrors. */ - bool use_recirc; /* Should generate recirc? */ - struct xlate_recirc recirc; /* Information used for generating - * recirculation actions */ uint64_t odp_actions_stub[256 / 8]; struct ofpbuf odp_actions; }; @@ -127,6 +125,15 @@ struct xlate_in { * This is normally null so the client has to set it manually after * calling xlate_in_init(). */ const struct dpif_flow_stats *resubmit_stats; + + /* If nonnull, flow translation populates this cache with references to all + * modules that are affected by translation. This 'xlate_cache' may be + * passed to xlate_push_stats() to perform the same function as + * xlate_actions() without the full cost of translation. + * + * This is normally null so the client has to set it manually after + * calling xlate_in_init(). */ + struct xlate_cache *xcache; }; extern struct ovs_rwlock xlate_rwlock; @@ -179,4 +186,10 @@ void xlate_out_copy(struct xlate_out *dst, const struct xlate_out *src); int xlate_send_packet(const struct ofport_dpif *, struct ofpbuf *); +struct xlate_cache *xlate_cache_new(void); +void xlate_push_stats(struct xlate_cache *, bool may_learn, + const struct dpif_flow_stats *); +void xlate_cache_clear(struct xlate_cache *); +void xlate_cache_delete(struct xlate_cache *); + #endif /* ofproto-dpif-xlate.h */