From: SatyaValli <satyavalli.r...@tcs.com> OXS support for FLOW REMOVED messages
Signed-off-by: Satya Valli <satyavalli.r...@tcs.com> Co-authored-by: Harivelam Lavanya <harivelam.lava...@tcs.com> --- include/openflow/openflow-1.5.h | 11 +++++++++++ include/openvswitch/ofp-msgs.h | 3 +++ lib/ox-stat.h | 6 ++++++ 3 files changed, 20 insertions(+) diff --git a/include/openflow/openflow-1.5.h b/include/openflow/openflow-1.5.h index 3b66f7f..f8a95dd 100644 --- a/include/openflow/openflow-1.5.h +++ b/include/openflow/openflow-1.5.h @@ -200,4 +200,15 @@ enum oxs_ofb_stat_fields { OFPXST_OFB_BYTE_COUNT = 4, /* Number of bytes in flow entry. */ }; +/* Flow removed (datapath -> controller). */ +struct ofp15_flow_removed { + ovs_be64 cookie; /* Opaque controller-issued identifier. */ + ovs_be16 priority; /* Priority level of flow entry. */ + uint8_t reason; /* One of OFPRR_*. */ + uint8_t table_id; /* ID of the table */ + uint8_t pad2[4]; /* Align to 64-bits. */ +}; + +OFP_ASSERT(sizeof (struct ofp15_flow_removed) == 16); + #endif /* openflow/openflow-1.5.h */ diff --git a/include/openvswitch/ofp-msgs.h b/include/openvswitch/ofp-msgs.h index 7d49bc7..3763261 100644 --- a/include/openvswitch/ofp-msgs.h +++ b/include/openvswitch/ofp-msgs.h @@ -163,6 +163,8 @@ enum ofpraw { OFPRAW_OFPT10_FLOW_REMOVED, /* OFPT 1.1+ (11): struct ofp11_flow_removed, uint8_t[8][]. */ OFPRAW_OFPT11_FLOW_REMOVED, + /* OFPT 1.5+ (35): struct ofp15_flow_removed,uint8_t[8][]. */ + OFPRAW_OFPT15_FLOW_REMOVED, /* NXT 1.0+ (14): struct nx_flow_removed, uint8_t[8][]. */ OFPRAW_NXT_FLOW_REMOVED, @@ -561,6 +563,7 @@ enum ofptype { * OFPRAW_NXT_PACKET_IN. */ OFPTYPE_FLOW_REMOVED, /* OFPRAW_OFPT10_FLOW_REMOVED. * OFPRAW_OFPT11_FLOW_REMOVED. + * OFPRAW_OFPT15_FLOW_REMOVED. * OFPRAW_NXT_FLOW_REMOVED. */ OFPTYPE_PORT_STATUS, /* OFPRAW_OFPT10_PORT_STATUS. * OFPRAW_OFPT11_PORT_STATUS. diff --git a/lib/ox-stat.h b/lib/ox-stat.h index 3ff7f07..826bbe4 100644 --- a/lib/ox-stat.h +++ b/lib/ox-stat.h @@ -33,4 +33,10 @@ int oxs_pull_stat(struct ofpbuf *,struct ofputil_flow_stats *, int oxs_put_agg_stat(struct ofpbuf *, const struct ofputil_aggregate_stats *, enum ofp_version); int oxs_pull_agg_stat(struct ofpbuf , struct ofputil_aggregate_stats *); +int oxs_flow_removed_stat_put(struct ofpbuf *b, + const struct ofputil_flow_removed *fr, + enum ofp_version version); +int oxs_flow_removed_stat_pull(struct ofpbuf *b, + struct ofputil_flow_removed *ofr); + #endif /* ox_stat.h */ -- 1.9.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev