Re: [ovs-dev] [PATCH v3] OF1.5/EXT-334 OXS/Extensible Flow Entry Statistics Support
On Thu, Feb 22, 2018 at 08:29:11PM +0530, Satyavalli Rama wrote: > Jan and Ben we requesting you both kindly provide your valuable inputs with > respect new enhancement i.e adding --oxs-stats option to the existing > commands. > If everything mentioned above is fine then we will share the updated patch > soon. Seems reasonable, please send the revised patch. ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH v3] OF1.5/EXT-334 OXS/Extensible Flow Entry Statistics Support
Hi Ben and Jan, Much Thanks to both of your for you valuable inputs, we've addressed almost all the modifications you both mentioned. Consolidating all the Inputs below are the quick updates and clarifications required. >> JAN and BEN Comment - 1) ovs-ofctl dump-flows" should provide similar >> results for all versions of OpenFlow. In OpenFlow 1.5, that means that it should use a "flow desc" requestrather than a "flow stats" request. We've modified our patch as per the above comment i.e as per OF 1.5+ the OFPMP_FLOW_DESC request is used instead of the earlier OFPMP_FLOW. >> JAN Comment - 2) I suggest to introduce a new command or add an option to >> dump-flows to force use of this particular MP message. The output would be >> limited to flow match and stats in that case. As per Jan's suggestion we've added an option to the dump-flows for the OF 1.5 which will give an output which will show only flow stats for the requested OXS fields. Like below: dump-flows switch [flows] By default, ovs-ofctl prints flow entries in the same order that the switch sends them along with the flow description flags Use --oxs-stats[=field] Which displays the output with the requested OXS field/fields (packet-count, byte-count etc.,) >> Jan Comment - 3 ) The new command to dump aggregate flow stats is of course >> a welcome addition. This requirement will also get fulfilled with the addition of --oxs-stats option to the existing dump-aggregate command. Like Below dump-aggregate switch [flows] Use --oxs-stats[=field] Prints to the console aggregate statistics for flows with the requested OXS field/fields (packet-count, byte-count etc.,) Jan and Ben we requesting you both kindly provide your valuable inputs with respect new enhancement i.e adding --oxs-stats option to the existing commands. If everything mentioned above is fine then we will share the updated patch soon. Thanks & Regards Satya Valli Tata Consultancy Services Mailto: satyavalli.r...@tcs.com Website: http://www.tcs.com Experience certainty. IT Services Business Solutions Consulting -Ben Pfaff wrote: - To: SatyaValli From: Ben Pfaff Date: 02/09/2018 11:23PM Cc: d...@openvswitch.org, Manasa Cherukupally , Surya Muttamsetty , Pavani Panthagada , Satya Valli , Lavanya Harivelam Subject: Re: [ovs-dev] [PATCH v3] OF1.5/EXT-334 OXS/Extensible Flow Entry Statistics Support On Tue, Feb 06, 2018 at 05:17:19PM +0530, SatyaValli wrote: > From: SatyaValli > > This Patch provides implementation Existing flow entry statistics are > redefined as standard OXS(OpenFlow Extensible Statistics) fields for > displaying the arbitrary flow stats.The existing Flow Stats were renamed > as Flow Description. Thanks for the updated patch. After a small amount of reading, I agree with Jan Scheurich. "ovs-ofctl dump-flows" should provide similar results for all versions of OpenFlow. In OpenFlow 1.5, that means that it should use a "flow desc" request rather than a "flow stats" request. Thanks, Ben. =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH v3] OF1.5/EXT-334 OXS/Extensible Flow Entry Statistics Support
On Tue, Feb 06, 2018 at 05:17:19PM +0530, SatyaValli wrote: > From: SatyaValli > > This Patch provides implementation Existing flow entry statistics are > redefined as standard OXS(OpenFlow Extensible Statistics) fields for > displaying the arbitrary flow stats.The existing Flow Stats were renamed > as Flow Description. Thanks for the updated patch. After a small amount of reading, I agree with Jan Scheurich. "ovs-ofctl dump-flows" should provide similar results for all versions of OpenFlow. In OpenFlow 1.5, that means that it should use a "flow desc" request rather than a "flow stats" request. Thanks, Ben. ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
[ovs-dev] [PATCH v3] OF1.5/EXT-334 OXS/Extensible Flow Entry Statistics Support
From: SatyaValli This Patch provides implementation Existing flow entry statistics are redefined as standard OXS(OpenFlow Extensible Statistics) fields for displaying the arbitrary flow stats.The existing Flow Stats were renamed as Flow Description. To support this implementation below messages are newly added OFPRAW_OFPT15_FLOW_REMOVED, OFPRAW_OFPST15_FLOW_REQUEST, OFPRAW_OFPST15_FLOW_DESC_REQUEST, OFPRAW_OFPST15_AGGREGATE_REQUEST, OFPRAW_OFPST15_FLOW_REPLY, OFPRAW_OFPST15_FLOW_DESC_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. "ovs-ofctl dump-flows" needs to be provided with the arbitrary OXS fields for displaying the desired flow stats. Below are Commands to display OXS stats field wise Flow Statistics Multipart ovs-ofctl dump-flows -O OpenFlow15 idle_time ovs-ofctl dump-flows -O OpenFlow15 packet_count ovs-ofctl dump-flows -O OpenFlow15 byte_count Aggregate Flow Statistics Multipart ovs-ofctl dump-aggregate -O OpenFlow15 packet_count ovs-ofctl dump-aggregate -O OpenFlow15 byte_count Flow Descritption ovs-ofctl dump-flow-desc -O OpenFlow15 idle_time ovs-ofctl dump-flow-desc -O OpenFlow15 packet_count ovs-ofctl dump-flow-desc -O OpenFlow15 byte_count Signed-off-by: Satya Valli Co-authored-by: Lavanya Harivelam Signed-off-by: Lavanya Harivelam Co-authored-by: Surya Muttamsetty Signed-off-by: Surya Muttamsetty Co-authored-by: Manasa Cherukupally Signed-off-by: Manasa Cherukupally Co-authored-by: Pavani Panthagada Signed-off-by: Pavani Panthagada --- NEWS| 9 + include/openflow/openflow-1.5.h | 81 include/openvswitch/ofp-msgs.h | 31 +- include/openvswitch/ofp-parse.h | 6 +- include/openvswitch/ofp-util.h | 18 +- lib/automake.mk | 2 + lib/ofp-parse.c | 71 ++- lib/ofp-print.c | 2 + lib/ofp-util.c | 287 +++- lib/ox-stat.c | 984 lib/ox-stat.h | 52 +++ lib/rconn.c | 2 + ofproto/ofproto.c | 9 +- tests/ofp-print.at | 127 ++ tests/ofproto-dpif.at | 84 tests/ofproto.at| 5 + utilities/ovs-ofctl.8.in| 48 +- utilities/ovs-ofctl.c | 34 +- 18 files changed, 1796 insertions(+), 56 deletions(-) create mode 100644 lib/ox-stat.c create mode 100644 lib/ox-stat.h diff --git a/NEWS b/NEWS index 8c360ba..87d2228 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,15 @@ Post-v2.9.0 - ovs-vswitchd: * New options --l7 and --l7-len to "ofproto/trace" command. - ovs-ofctl: + * Existing flow entry statistics are redefined as standard OXS(OpenFlow +Extensible Statistics) fields for displaying the arbitrary flow stats. + * Now "ovs-ofctl dump-flows" needs to be provided with the arbitrary OXS + fields i.e flow duration, flow count, packet count, byte count or all + for displaying the desired flow stats.By default with "ovs-ofctl dump- + flows" displays only flow duration. See ovs-ofctl(8) for details. + * The existing flow statistics are renamed as Flow Description. Now the + information about individual flow entries will be displayed with the + help of ovs-ofctl dump-flow-desc. See ovs-ofctl(8) for details. * ovs-ofctl now accepts and display table names in place of numbers. By default it always accepts names and in interactive use it displays them; use --names or --no-names to override. See ovs-ofctl(8) for details. diff --git a/include/openflow/openflow-1.5.h b/include/openflow/openflow-1.5.h index 73b76d8..d1870ce 100644 --- a/include/openflow/openflow-1.5.h +++ b/include/openflow/openflow-1.5.h @@ -163,4 +163,85 @@ struct ofp15_packet_out { }; OFP_ASSERT(sizeof(struct ofp15_packet_out) == 8); +struct ofp_oxs_stat { +ovs_be16 reserved; /* Reserved for future use, + * currently zeroed. */ +ovs_be16 length;/* Stats Length */ +}; + +OFP_ASSERT(sizeof(struct ofp_oxs_stat) == 4); + +/* Body for ofp_multipart_request of type + * OFPMP_FLOW_DESC & OFPMP_FLOW_STATS. */ +struct ofp15_flow_stats_request { +uint8_t table_id; /* ID of table to read (from ofp_table_desc), + * OFPTT_ALL for all tables. */ +uint8_t pad[3]; /* Align to 32 bits. */ +ovs_be32 out_port; /* Require matching entries to include this as + * an output port. A value of OFP_ANY + * indicates no restriction. */ +ovs_be32 out_group; /* Require matching entries to include this as + * an output group. A value of OFPG_ANY