summaryrefslogtreecommitdiff
path: root/ofproto/ofproto-dpif-ipfix.h
diff options
context:
space:
mode:
authorPrzemyslaw Szczerbik <przemyslawx.szczerbik@intel.com>2017-07-28 07:17:44 +0100
committerBen Pfaff <blp@ovn.org>2017-08-02 16:00:20 -0700
commit564230b6c982fc5b6df06b139a938edce874a5f7 (patch)
treef56e6371c5c01e790c37ac5a56c94f5d46512394 /ofproto/ofproto-dpif-ipfix.h
parent5071802a6c9090dcd13d39e4e06b550d478ef6fc (diff)
downloadopenvswitch-564230b6c982fc5b6df06b139a938edce874a5f7.tar.gz
ofproto-dpif-ipfix: add support for per-flow drop counters
Patch based on RFC 5102, section 5.10. It implements per-flow drop counters: - droppedPacketDeltaCount - droppedPacketTotalCount - droppedOctetDeltaCount - droppedOctetTotalCount In order to determine if packet is going to be dropped, flow actions associated with packet are read. If at least one of the following conditions is met, packet is not marked as dropped. Packet has at least one: - OVS_ACTION_ATTR_OUTPUT action - OVS_ACTION_ATTR_CLONE action with nested OVS_ACTION_ATTR_OUTPUT action - OVS_ACTION_ATTR_SAMPLE action with nested OVS_ACTION_ATTR_OUTPUT action and sampling probability is set to 100% Signed-off-by: Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto/ofproto-dpif-ipfix.h')
-rw-r--r--ofproto/ofproto-dpif-ipfix.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/ofproto/ofproto-dpif-ipfix.h b/ofproto/ofproto-dpif-ipfix.h
index 0808ede7c..f91d04181 100644
--- a/ofproto/ofproto-dpif-ipfix.h
+++ b/ofproto/ofproto-dpif-ipfix.h
@@ -29,6 +29,11 @@ struct ofproto_ipfix_flow_exporter_options;
struct flow_tnl;
struct ofport;
+struct dpif_ipfix_actions {
+ bool output_action; /* Set to true if packet has at least one
+ OVS_ACTION_ATTR_OUTPUT action. */
+};
+
struct dpif_ipfix *dpif_ipfix_create(void);
struct dpif_ipfix *dpif_ipfix_ref(const struct dpif_ipfix *);
void dpif_ipfix_unref(struct dpif_ipfix *);
@@ -52,12 +57,19 @@ int dpif_ipfix_get_stats(const struct dpif_ipfix *, bool, struct ovs_list *);
void dpif_ipfix_bridge_sample(struct dpif_ipfix *, const struct dp_packet *,
const struct flow *,
- odp_port_t, odp_port_t, const struct flow_tnl *);
+ odp_port_t, odp_port_t, const struct flow_tnl *,
+ const struct dpif_ipfix_actions *);
void dpif_ipfix_flow_sample(struct dpif_ipfix *, const struct dp_packet *,
const struct flow *, const union user_action_cookie *,
- odp_port_t, const struct flow_tnl *);
+ odp_port_t, const struct flow_tnl *,
+ const struct dpif_ipfix_actions *);
void dpif_ipfix_run(struct dpif_ipfix *);
void dpif_ipfix_wait(struct dpif_ipfix *);
+void dpif_ipfix_read_actions(const struct flow *flow,
+ const struct nlattr *actions,
+ size_t actions_len,
+ struct dpif_ipfix_actions *ipfix_actions);
+
#endif /* ofproto/ofproto-dpif-ipfix.h */