diff options
author | SatyaValli <satyavalli.rama@tcs.com> | 2018-05-10 21:56:54 +0530 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-05-16 15:29:46 -0700 |
commit | c7b02b800615c0bf383f3a740fe62b3f1759a997 (patch) | |
tree | cbdf95ba2890c3ef54926ac44efaa5ac35932133 /include/openflow/openflow-1.5.h | |
parent | 7c0cb293eea321b934ff6398dd7e938ce3a0511f (diff) | |
download | openvswitch-c7b02b800615c0bf383f3a740fe62b3f1759a997.tar.gz |
Add support for OpenFlow 1.5 statistics (OXS).
This patch provides implementation Existing flow entry statistics are
redefined as standard OXS(OpenFlow Extensible Statistics) fields for
displaying the arbitrary flow stats.
To support this implementation below messages are newly added
OFPRAW_OFPT15_FLOW_REMOVED,
OFPRAW_OFPST15_AGGREGATE_REQUEST,
OFPRAW_OFPST15_FLOW_REPLY,
OFPRAW_OFPST15_AGGREGATE_REPLY,
The current commit adds support for the new feature in flow statistics
multipart messages, aggregate multipart messages and OXS support for flow
removal message, individual flow description messages.
Signed-off-by: Satya Valli <satyavalli.rama@tcs.com>
Co-authored-by: Lavanya Harivelam <harivelam.lavanya@tcs.com>
Signed-off-by: Lavanya Harivelam <harivelam.lavanya@tcs.com>
Co-authored-by: Surya Muttamsetty <muttamsetty.surya@tcs.com>
Signed-off-by: Surya Muttamsetty <muttamsetty.surya@tcs.com>
Co-authored-by: Manasa Cherukupally <manasa.cherukupally@tcs.com>
Signed-off-by: Manasa Cherukupally <manasa.cherukupally@tcs.com>
Co-authored-by: Pavani Panthagada <p.pavani1@tcs.com>
Signed-off-by: Pavani Panthagada <p.pavani1@tcs.com>
[blp@ovn.org simplified and rewrote much of the code]
Co-authored-by: Ben Pfaff <blp@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'include/openflow/openflow-1.5.h')
-rw-r--r-- | include/openflow/openflow-1.5.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/include/openflow/openflow-1.5.h b/include/openflow/openflow-1.5.h index 73b76d883..d9b867cf2 100644 --- a/include/openflow/openflow-1.5.h +++ b/include/openflow/openflow-1.5.h @@ -163,4 +163,55 @@ struct ofp15_packet_out { }; OFP_ASSERT(sizeof(struct ofp15_packet_out) == 8); +/* Body of reply to OFPMP_FLOW_DESC request. */ +struct ofp15_flow_desc { + ovs_be16 length; /* Length of this entry. */ + uint8_t pad2[2]; /* Align to 64 bits. */ + uint8_t table_id; /* ID of table flow came from. */ + uint8_t pad; + ovs_be16 priority; /* Priority of the entry. */ + ovs_be16 idle_timeout; /* Number of seconds + idle before expiration. */ + ovs_be16 hard_timeout; /* Number of seconds + before expiration. */ + ovs_be16 flags; /* Bitmap of OFPFF_*. flags. */ + ovs_be16 importance; /* Eviction precedence. */ + ovs_be64 cookie; /* Opaque controller issued identifier. */ +}; + +OFP_ASSERT(sizeof(struct ofp15_flow_desc) == 24); + +/* Body of reply to OFPMP_FLOW_STATS request + * and body for OFPIT_STAT_TRIGGER generated status. */ +struct ofp15_flow_stats_reply { + ovs_be16 length; /* Length of this entry. */ + uint8_t pad2[2]; /* Align to 64 bits. */ + uint8_t table_id; /* ID of table flow came from. */ + uint8_t reason; /* One of OFPFSR_*. */ + ovs_be16 priority; /* Priority of the entry. */ +}; + +OFP_ASSERT(sizeof(struct ofp15_flow_stats_reply) == 8); + +/* OXS flow stat field types for OpenFlow basic class. */ +enum oxs_ofb_stat_fields { + OFPXST_OFB_DURATION = 0, /* Time flow entry has been alive. */ + OFPXST_OFB_IDLE_TIME = 1, /* Time flow entry has been idle. */ + OFPXST_OFB_FLOW_COUNT = 3, /* Number of aggregated flow entries. */ + OFPXST_OFB_PACKET_COUNT = 4, /* Number of packets in flow entry. */ + OFPXST_OFB_BYTE_COUNT = 5, /* Number of bytes in flow entry. */ +}; + +/* Flow removed (datapath -> controller). */ +struct ofp15_flow_removed { + uint8_t table_id; /* ID of the table */ + uint8_t reason; /* One of OFPRR_*. */ + ovs_be16 priority; /* Priority level of flow entry. */ + ovs_be16 idle_timeout; /* Idle timeout from original flow mod. */ + ovs_be16 hard_timeout; /* Hard timeout from original flow mod. */ + ovs_be64 cookie; /* Opaque controller issued identifier. */ +}; + +OFP_ASSERT(sizeof (struct ofp15_flow_removed) == 16); + #endif /* openflow/openflow-1.5.h */ |