Re: [ovs-dev] [PATCH v1 2/2] ofp-monitor: Support flow monitoring for OpenFlow 1.3, 1.4+
Great, thanks! *Vasu Dasari* On Tue, Aug 24, 2021 at 4:11 PM Ashish Varma wrote: > I will take a look. > > Thanks, > Ashish > > On Tue, Aug 24, 2021 at 9:29 AM Vasu Dasari wrote: > >> Hi Ben/Ashish, >> >> When you get a chance, Can you please take a look at my code? >> >> -Vasu >> >> *Vasu Dasari* >> >> >> On Thu, Jul 29, 2021 at 10:36 PM Vasu Dasari wrote: >> >>> Extended OpenFlow monitoring support >>> * OpenFlow 1.3 with ONF extensions >>> * OpenFlow 1.4+ as defined in OpenFlow specification 1.4+. >>> >>> ONF extensions are similar to Nicira extensions except for >>> onf_flow_monitor_request{} >>> where out_port is defined as 32-bit number OF(1.1) number, oxm match >>> formats are >>> used in update and request messages. >>> >>> Flow monitoring support in 1.4+ is slightly different from Nicira and ONF >>> extensions. >>> * More flow monitoring flags are defined. >>> * Monitor add/modify/delete command is intruduced in flow_monitor >>>request message. >>> * Addition of out_group as part of flow_monitor request message >>> >>> Description of changes: >>> 1. Generate ofp-msgs.inc to be able to support 1.3, 1.4+ flow Monitoring >>> messages. >>> include/openvswitch/ofp-msgs.h >>> >>> 2. Modify openflow header files with protocol specific headers. >>> include/openflow/openflow-1.3.h >>> include/openflow/openflow-1.4.h >>> >>> 3. Modify OvS abstraction of openflow headers. ofp-monitor.h leverages >>> enums >>>from on nicira extensions for creating protocol abstraction headers. >>> OF(1.4+) >>>enums are superset of nicira extensions. >>> include/openvswitch/ofp-monitor.h >>> >>> 4. Changes to these files reflect encoding and decoding of new protocol >>> messages. >>> lib/ofp-monitor.c >>> >>> 5. Changes to mmodules using ofp-monitor APIs. Most of the changes here >>> are to >>>migrate enums from nicira to OF 1.4+ versions. >>> ofproto/connmgr.c >>> ofproto/connmgr.h >>> ofproto/ofproto-provider.h >>> ofproto/ofproto.c >>> >>> 6. Extended protocol decoding tests to verify all protocol versions >>> FLOW_MONITOR_CANCEL >>> FLOW_MONITOR_PAUSED >>> FLOW_MONITOR_RESUMED >>> FLOW_MONITOR request >>> FLOW_MONITOR reply >>> tests/ofp-print.at >>> >>> 7. Modify flow monitoring tests to be able executed by all protocol >>> versions. >>> tests/ofproto.at >>> >>> 7. Modified documentation highlighting the change >>> utilities/ovs-ofctl.8.in >>> NEWS >>> >>> Signed-off-by: Vasu Dasari >>> Reported-at: >>> https://mail.openvswitch.org/pipermail/ovs-dev/2021-June/383915.html >>> --- >>> v1: >>> - Fixed 0-day Robot errors >>> >>> --- >>> NEWS | 6 +- >>> include/openflow/openflow-1.3.h | 89 >>> include/openflow/openflow-1.4.h | 93 +++- >>> include/openvswitch/ofp-monitor.h | 9 +- >>> include/openvswitch/ofp-msgs.h| 39 +- >>> lib/ofp-monitor.c | 844 -- >>> lib/ofp-print.c | 24 +- >>> ofproto/connmgr.c | 47 +- >>> ofproto/connmgr.h | 6 +- >>> ofproto/ofproto-provider.h| 4 +- >>> ofproto/ofproto.c | 89 +++- >>> tests/ofp-print.at| 122 - >>> tests/ofproto.at | 176 +-- >>> utilities/ovs-ofctl.8.in | 3 + >>> utilities/ovs-ofctl.c | 6 + >>> 15 files changed, 1265 insertions(+), 292 deletions(-) >>> >>> diff --git a/NEWS b/NEWS >>> index 02884b774..47ad9de2a 100644 >>> --- a/NEWS >>> +++ b/NEWS >>> @@ -25,8 +25,10 @@ v2.16.0 - xx xxx >>> - In ovs-vsctl and vtep-ctl, the "find" command now accept new >>> operators {in} and {not-in}. >>> - OpenFlow: >>> - * Extend Flow Monitoring support for OpenFlow 1.0-1.2 with Nicira >>> - Extensions >>> + * Extended Flow Monitoring support for all supported OpenFlow >>> versions >>> + OpenFlow versions 1.0-1.2 with Nicira Extensions >>> + OpenFlow versions 1.3 with Open Network Foundation extension >>> + OpenFlow versions 1.4+, as defined in the OpenFlow >>> specification >>> - Userspace datapath: >>> * Auto load balancing of PMDs now partially supports cross-NUMA >>> polling >>> cases, e.g if all PMD threads are running on the same NUMA node. >>> diff --git a/include/openflow/openflow-1.3.h >>> b/include/openflow/openflow-1.3.h >>> index c48a8ea7f..1a818dbb4 100644 >>> --- a/include/openflow/openflow-1.3.h >>> +++ b/include/openflow/openflow-1.3.h >>> @@ -374,4 +374,93 @@ struct ofp13_async_config { >>> }; >>> OFP_ASSERT(sizeof(struct ofp13_async_config) == 24); >>> >>> +struct onf_flow_monitor_request { >>> +ovs_be32 id;/* Controller-assigned ID for this >>> monitor. */ >>> +ovs_be16 flags; /* ONFFMF_*. */ >>> +ovs_be16 match_len; /* Length of oxm_fields. */ >>> +ovs_be32 out_port; /* Required output
Re: [ovs-dev] [PATCH v1 2/2] ofp-monitor: Support flow monitoring for OpenFlow 1.3, 1.4+
I will take a look. Thanks, Ashish On Tue, Aug 24, 2021 at 9:29 AM Vasu Dasari wrote: > Hi Ben/Ashish, > > When you get a chance, Can you please take a look at my code? > > -Vasu > > *Vasu Dasari* > > > On Thu, Jul 29, 2021 at 10:36 PM Vasu Dasari wrote: > >> Extended OpenFlow monitoring support >> * OpenFlow 1.3 with ONF extensions >> * OpenFlow 1.4+ as defined in OpenFlow specification 1.4+. >> >> ONF extensions are similar to Nicira extensions except for >> onf_flow_monitor_request{} >> where out_port is defined as 32-bit number OF(1.1) number, oxm match >> formats are >> used in update and request messages. >> >> Flow monitoring support in 1.4+ is slightly different from Nicira and ONF >> extensions. >> * More flow monitoring flags are defined. >> * Monitor add/modify/delete command is intruduced in flow_monitor >>request message. >> * Addition of out_group as part of flow_monitor request message >> >> Description of changes: >> 1. Generate ofp-msgs.inc to be able to support 1.3, 1.4+ flow Monitoring >> messages. >> include/openvswitch/ofp-msgs.h >> >> 2. Modify openflow header files with protocol specific headers. >> include/openflow/openflow-1.3.h >> include/openflow/openflow-1.4.h >> >> 3. Modify OvS abstraction of openflow headers. ofp-monitor.h leverages >> enums >>from on nicira extensions for creating protocol abstraction headers. >> OF(1.4+) >>enums are superset of nicira extensions. >> include/openvswitch/ofp-monitor.h >> >> 4. Changes to these files reflect encoding and decoding of new protocol >> messages. >> lib/ofp-monitor.c >> >> 5. Changes to mmodules using ofp-monitor APIs. Most of the changes here >> are to >>migrate enums from nicira to OF 1.4+ versions. >> ofproto/connmgr.c >> ofproto/connmgr.h >> ofproto/ofproto-provider.h >> ofproto/ofproto.c >> >> 6. Extended protocol decoding tests to verify all protocol versions >> FLOW_MONITOR_CANCEL >> FLOW_MONITOR_PAUSED >> FLOW_MONITOR_RESUMED >> FLOW_MONITOR request >> FLOW_MONITOR reply >> tests/ofp-print.at >> >> 7. Modify flow monitoring tests to be able executed by all protocol >> versions. >> tests/ofproto.at >> >> 7. Modified documentation highlighting the change >> utilities/ovs-ofctl.8.in >> NEWS >> >> Signed-off-by: Vasu Dasari >> Reported-at: >> https://mail.openvswitch.org/pipermail/ovs-dev/2021-June/383915.html >> --- >> v1: >> - Fixed 0-day Robot errors >> >> --- >> NEWS | 6 +- >> include/openflow/openflow-1.3.h | 89 >> include/openflow/openflow-1.4.h | 93 +++- >> include/openvswitch/ofp-monitor.h | 9 +- >> include/openvswitch/ofp-msgs.h| 39 +- >> lib/ofp-monitor.c | 844 -- >> lib/ofp-print.c | 24 +- >> ofproto/connmgr.c | 47 +- >> ofproto/connmgr.h | 6 +- >> ofproto/ofproto-provider.h| 4 +- >> ofproto/ofproto.c | 89 +++- >> tests/ofp-print.at| 122 - >> tests/ofproto.at | 176 +-- >> utilities/ovs-ofctl.8.in | 3 + >> utilities/ovs-ofctl.c | 6 + >> 15 files changed, 1265 insertions(+), 292 deletions(-) >> >> diff --git a/NEWS b/NEWS >> index 02884b774..47ad9de2a 100644 >> --- a/NEWS >> +++ b/NEWS >> @@ -25,8 +25,10 @@ v2.16.0 - xx xxx >> - In ovs-vsctl and vtep-ctl, the "find" command now accept new >> operators {in} and {not-in}. >> - OpenFlow: >> - * Extend Flow Monitoring support for OpenFlow 1.0-1.2 with Nicira >> - Extensions >> + * Extended Flow Monitoring support for all supported OpenFlow >> versions >> + OpenFlow versions 1.0-1.2 with Nicira Extensions >> + OpenFlow versions 1.3 with Open Network Foundation extension >> + OpenFlow versions 1.4+, as defined in the OpenFlow specification >> - Userspace datapath: >> * Auto load balancing of PMDs now partially supports cross-NUMA >> polling >> cases, e.g if all PMD threads are running on the same NUMA node. >> diff --git a/include/openflow/openflow-1.3.h >> b/include/openflow/openflow-1.3.h >> index c48a8ea7f..1a818dbb4 100644 >> --- a/include/openflow/openflow-1.3.h >> +++ b/include/openflow/openflow-1.3.h >> @@ -374,4 +374,93 @@ struct ofp13_async_config { >> }; >> OFP_ASSERT(sizeof(struct ofp13_async_config) == 24); >> >> +struct onf_flow_monitor_request { >> +ovs_be32 id;/* Controller-assigned ID for this >> monitor. */ >> +ovs_be16 flags; /* ONFFMF_*. */ >> +ovs_be16 match_len; /* Length of oxm_fields. */ >> +ovs_be32 out_port; /* Required output port, if not OFPP_NONE. >> */ >> +uint8_ttable_id; /* One table’s ID or 0xff for all tables. >> */ >> +uint8_tzeros[3]; /* Align to 64 bits (must be zero). */ >> +/* Followed by an ofp11_match
Re: [ovs-dev] [PATCH v1 2/2] ofp-monitor: Support flow monitoring for OpenFlow 1.3, 1.4+
Hi Ben/Ashish, When you get a chance, Can you please take a look at my code? -Vasu *Vasu Dasari* On Thu, Jul 29, 2021 at 10:36 PM Vasu Dasari wrote: > Extended OpenFlow monitoring support > * OpenFlow 1.3 with ONF extensions > * OpenFlow 1.4+ as defined in OpenFlow specification 1.4+. > > ONF extensions are similar to Nicira extensions except for > onf_flow_monitor_request{} > where out_port is defined as 32-bit number OF(1.1) number, oxm match > formats are > used in update and request messages. > > Flow monitoring support in 1.4+ is slightly different from Nicira and ONF > extensions. > * More flow monitoring flags are defined. > * Monitor add/modify/delete command is intruduced in flow_monitor >request message. > * Addition of out_group as part of flow_monitor request message > > Description of changes: > 1. Generate ofp-msgs.inc to be able to support 1.3, 1.4+ flow Monitoring > messages. > include/openvswitch/ofp-msgs.h > > 2. Modify openflow header files with protocol specific headers. > include/openflow/openflow-1.3.h > include/openflow/openflow-1.4.h > > 3. Modify OvS abstraction of openflow headers. ofp-monitor.h leverages > enums >from on nicira extensions for creating protocol abstraction headers. > OF(1.4+) >enums are superset of nicira extensions. > include/openvswitch/ofp-monitor.h > > 4. Changes to these files reflect encoding and decoding of new protocol > messages. > lib/ofp-monitor.c > > 5. Changes to mmodules using ofp-monitor APIs. Most of the changes here > are to >migrate enums from nicira to OF 1.4+ versions. > ofproto/connmgr.c > ofproto/connmgr.h > ofproto/ofproto-provider.h > ofproto/ofproto.c > > 6. Extended protocol decoding tests to verify all protocol versions > FLOW_MONITOR_CANCEL > FLOW_MONITOR_PAUSED > FLOW_MONITOR_RESUMED > FLOW_MONITOR request > FLOW_MONITOR reply > tests/ofp-print.at > > 7. Modify flow monitoring tests to be able executed by all protocol > versions. > tests/ofproto.at > > 7. Modified documentation highlighting the change > utilities/ovs-ofctl.8.in > NEWS > > Signed-off-by: Vasu Dasari > Reported-at: > https://mail.openvswitch.org/pipermail/ovs-dev/2021-June/383915.html > --- > v1: > - Fixed 0-day Robot errors > > --- > NEWS | 6 +- > include/openflow/openflow-1.3.h | 89 > include/openflow/openflow-1.4.h | 93 +++- > include/openvswitch/ofp-monitor.h | 9 +- > include/openvswitch/ofp-msgs.h| 39 +- > lib/ofp-monitor.c | 844 -- > lib/ofp-print.c | 24 +- > ofproto/connmgr.c | 47 +- > ofproto/connmgr.h | 6 +- > ofproto/ofproto-provider.h| 4 +- > ofproto/ofproto.c | 89 +++- > tests/ofp-print.at| 122 - > tests/ofproto.at | 176 +-- > utilities/ovs-ofctl.8.in | 3 + > utilities/ovs-ofctl.c | 6 + > 15 files changed, 1265 insertions(+), 292 deletions(-) > > diff --git a/NEWS b/NEWS > index 02884b774..47ad9de2a 100644 > --- a/NEWS > +++ b/NEWS > @@ -25,8 +25,10 @@ v2.16.0 - xx xxx > - In ovs-vsctl and vtep-ctl, the "find" command now accept new > operators {in} and {not-in}. > - OpenFlow: > - * Extend Flow Monitoring support for OpenFlow 1.0-1.2 with Nicira > - Extensions > + * Extended Flow Monitoring support for all supported OpenFlow > versions > + OpenFlow versions 1.0-1.2 with Nicira Extensions > + OpenFlow versions 1.3 with Open Network Foundation extension > + OpenFlow versions 1.4+, as defined in the OpenFlow specification > - Userspace datapath: > * Auto load balancing of PMDs now partially supports cross-NUMA > polling > cases, e.g if all PMD threads are running on the same NUMA node. > diff --git a/include/openflow/openflow-1.3.h > b/include/openflow/openflow-1.3.h > index c48a8ea7f..1a818dbb4 100644 > --- a/include/openflow/openflow-1.3.h > +++ b/include/openflow/openflow-1.3.h > @@ -374,4 +374,93 @@ struct ofp13_async_config { > }; > OFP_ASSERT(sizeof(struct ofp13_async_config) == 24); > > +struct onf_flow_monitor_request { > +ovs_be32 id;/* Controller-assigned ID for this monitor. > */ > +ovs_be16 flags; /* ONFFMF_*. */ > +ovs_be16 match_len; /* Length of oxm_fields. */ > +ovs_be32 out_port; /* Required output port, if not OFPP_NONE. > */ > +uint8_ttable_id; /* One table’s ID or 0xff for all tables. */ > +uint8_tzeros[3]; /* Align to 64 bits (must be zero). */ > +/* Followed by an ofp11_match structure. */ > +}; > +OFP_ASSERT(sizeof(struct onf_flow_monitor_request) == 16); > + > +/* Header for experimenter requests and replies. */ > +struct onf_experimenter_header { > +struct ofp_header header; > +ovs_be32 vendor;
[ovs-dev] [PATCH v1 2/2] ofp-monitor: Support flow monitoring for OpenFlow 1.3, 1.4+
Extended OpenFlow monitoring support * OpenFlow 1.3 with ONF extensions * OpenFlow 1.4+ as defined in OpenFlow specification 1.4+. ONF extensions are similar to Nicira extensions except for onf_flow_monitor_request{} where out_port is defined as 32-bit number OF(1.1) number, oxm match formats are used in update and request messages. Flow monitoring support in 1.4+ is slightly different from Nicira and ONF extensions. * More flow monitoring flags are defined. * Monitor add/modify/delete command is intruduced in flow_monitor request message. * Addition of out_group as part of flow_monitor request message Description of changes: 1. Generate ofp-msgs.inc to be able to support 1.3, 1.4+ flow Monitoring messages. include/openvswitch/ofp-msgs.h 2. Modify openflow header files with protocol specific headers. include/openflow/openflow-1.3.h include/openflow/openflow-1.4.h 3. Modify OvS abstraction of openflow headers. ofp-monitor.h leverages enums from on nicira extensions for creating protocol abstraction headers. OF(1.4+) enums are superset of nicira extensions. include/openvswitch/ofp-monitor.h 4. Changes to these files reflect encoding and decoding of new protocol messages. lib/ofp-monitor.c 5. Changes to mmodules using ofp-monitor APIs. Most of the changes here are to migrate enums from nicira to OF 1.4+ versions. ofproto/connmgr.c ofproto/connmgr.h ofproto/ofproto-provider.h ofproto/ofproto.c 6. Extended protocol decoding tests to verify all protocol versions FLOW_MONITOR_CANCEL FLOW_MONITOR_PAUSED FLOW_MONITOR_RESUMED FLOW_MONITOR request FLOW_MONITOR reply tests/ofp-print.at 7. Modify flow monitoring tests to be able executed by all protocol versions. tests/ofproto.at 7. Modified documentation highlighting the change utilities/ovs-ofctl.8.in NEWS Signed-off-by: Vasu Dasari Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2021-June/383915.html --- v1: - Fixed 0-day Robot errors --- NEWS | 6 +- include/openflow/openflow-1.3.h | 89 include/openflow/openflow-1.4.h | 93 +++- include/openvswitch/ofp-monitor.h | 9 +- include/openvswitch/ofp-msgs.h| 39 +- lib/ofp-monitor.c | 844 -- lib/ofp-print.c | 24 +- ofproto/connmgr.c | 47 +- ofproto/connmgr.h | 6 +- ofproto/ofproto-provider.h| 4 +- ofproto/ofproto.c | 89 +++- tests/ofp-print.at| 122 - tests/ofproto.at | 176 +-- utilities/ovs-ofctl.8.in | 3 + utilities/ovs-ofctl.c | 6 + 15 files changed, 1265 insertions(+), 292 deletions(-) diff --git a/NEWS b/NEWS index 02884b774..47ad9de2a 100644 --- a/NEWS +++ b/NEWS @@ -25,8 +25,10 @@ v2.16.0 - xx xxx - In ovs-vsctl and vtep-ctl, the "find" command now accept new operators {in} and {not-in}. - OpenFlow: - * Extend Flow Monitoring support for OpenFlow 1.0-1.2 with Nicira - Extensions + * Extended Flow Monitoring support for all supported OpenFlow versions + OpenFlow versions 1.0-1.2 with Nicira Extensions + OpenFlow versions 1.3 with Open Network Foundation extension + OpenFlow versions 1.4+, as defined in the OpenFlow specification - Userspace datapath: * Auto load balancing of PMDs now partially supports cross-NUMA polling cases, e.g if all PMD threads are running on the same NUMA node. diff --git a/include/openflow/openflow-1.3.h b/include/openflow/openflow-1.3.h index c48a8ea7f..1a818dbb4 100644 --- a/include/openflow/openflow-1.3.h +++ b/include/openflow/openflow-1.3.h @@ -374,4 +374,93 @@ struct ofp13_async_config { }; OFP_ASSERT(sizeof(struct ofp13_async_config) == 24); +struct onf_flow_monitor_request { +ovs_be32 id;/* Controller-assigned ID for this monitor. */ +ovs_be16 flags; /* ONFFMF_*. */ +ovs_be16 match_len; /* Length of oxm_fields. */ +ovs_be32 out_port; /* Required output port, if not OFPP_NONE. */ +uint8_ttable_id; /* One table’s ID or 0xff for all tables. */ +uint8_tzeros[3]; /* Align to 64 bits (must be zero). */ +/* Followed by an ofp11_match structure. */ +}; +OFP_ASSERT(sizeof(struct onf_flow_monitor_request) == 16); + +/* Header for experimenter requests and replies. */ +struct onf_experimenter_header { +struct ofp_header header; +ovs_be32 vendor;/* ONF_EXPERIMENTER_ID. */ +ovs_be32 subtype; /* One of ONFT_*. */ +}; +OFP_ASSERT(sizeof(struct onf_experimenter_header) == 16); + +enum onf_flow_monitor_msg_type { +ONFT_FLOW_MONITOR_CANCEL = 1870, +ONFT_FLOW_MONITOR_PAUSED = 1871, +ONFT_FLOW_MONITOR_RESUMED = 1872 +}; + +/* ’flags’ bits in struct onf_flow_monitor_request. */ +enum onf_flow_monitor_flags { +/* When