#include "ofproto.h"
#include "stp.h"
#include "ovs-lldp.h"
+#include "uuid.h"
struct bfd;
struct bond;
struct xlate_cache;
struct xlate_out {
- enum slow_path_reason slow; /* 0 if fast path may be used. */
+ /* Caching exceptions:
+ *
+ * - If 'slow' is nonzero, the translation needs to be slow-pathed for
+ * one reason or another. (The particular value is only important for
+ * explaining to an administrator why the flow is slow-pathed.) This
+ * makes OVS install a datapath flow with a send-to-userspace action.
+ * Only on revalidation will the flow be replaced, if appropriate, by
+ * one that does something else with the traffic.
+ *
+ * - If 'avoid_caching' is true, then OVS won't install a datapath flow
+ * at all. If the reason to avoid caching goes away, the next upcall
+ * will immediately install a correct datapath flow.
+ *
+ * - Otherwise a datapath flow can be installed in the usual way.
+ *
+ * If 'avoid_caching' is true then 'slow' doesn't matter.
+ */
+ enum slow_path_reason slow;
+ bool avoid_caching;
- struct recirc_refs recircs; /* Recirc action IDs on which references are
- * held. */
+ /* Recirc action IDs on which references are held. */
+ struct recirc_refs recircs;
};
struct xlate_in {
/* The frozen state to be resumed, as returned by xlate_lookup(). */
const struct frozen_state *frozen_state;
+
+ /* If true, the packet to be translated is from a packet_out msg. */
+ bool in_packet_out;
+
+ /* ofproto/trace maintains this queue to trace flows that require
+ * recirculation. */
+ struct ovs_list *recirc_queue;
+
+ /* UUID of first non-patch port packet was received on.*/
+ struct uuid xport_uuid;
};
void xlate_ofproto_set(struct ofproto_dpif *, const char *name, struct dpif *,
void xlate_remove_ofproto(struct ofproto_dpif *);
void xlate_bundle_set(struct ofproto_dpif *, struct ofbundle *,
- const char *name, enum port_vlan_mode, int vlan,
- unsigned long *trunks, bool use_priority_tags,
+ const char *name, enum port_vlan_mode,
+ uint16_t qinq_ethtype, int vlan,
+ unsigned long *trunks, unsigned long *cvlans,
+ bool use_priority_tags,
const struct bond *, const struct lacp *,
bool floodable, bool protected);
void xlate_bundle_remove(struct ofbundle *);
XLATE_RECIRCULATION_CONFLICT,
XLATE_TOO_MANY_MPLS_LABELS,
XLATE_INVALID_TUNNEL_METADATA,
+ XLATE_UNSUPPORTED_PACKET_TYPE,
};
const char *xlate_strerror(enum xlate_error error);
enum ofperr xlate_resume(struct ofproto_dpif *,
const struct ofputil_packet_in_private *,
- struct ofpbuf *odp_actions, enum slow_path_reason *);
-
+ struct ofpbuf *odp_actions, enum slow_path_reason *,
+ struct flow *, struct xlate_cache *);
int xlate_send_packet(const struct ofport_dpif *, bool oam, struct dp_packet *);
void xlate_mac_learning_update(const struct ofproto_dpif *ofproto,
ofp_port_t in_port, struct eth_addr dl_src,
int vlan, bool is_grat_arp);
-void xlate_disable_dp_clone(const struct ofproto_dpif *);
+void xlate_set_support(const struct ofproto_dpif *,
+ const struct dpif_backer_support *);
void xlate_txn_start(void);
void xlate_txn_commit(void);