diff options
author | Adrian Moreno <amorenoz@redhat.com> | 2023-02-24 12:05:04 +0100 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2023-02-27 21:18:59 +0100 |
commit | f1f278f5e125be47038379e208de6d2508ace277 (patch) | |
tree | 8424fb2959fb2d67c8bca161fe2d517132cd3b03 /vswitchd | |
parent | b5313a8ceca8ee45b3e8fd862324c6a43f562bd9 (diff) | |
download | openvswitch-f1f278f5e125be47038379e208de6d2508ace277.tar.gz |
ipfix: Make template and stats interval configurable.
Add options to the IPFIX table configure the interval to send statistics
and template information.
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'vswitchd')
-rw-r--r-- | vswitchd/bridge.c | 17 | ||||
-rw-r--r-- | vswitchd/vswitch.ovsschema | 14 | ||||
-rw-r--r-- | vswitchd/vswitch.xml | 20 |
3 files changed, 49 insertions, 2 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index abf2afe57..307a51527 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -1542,6 +1542,17 @@ bridge_configure_ipfix(struct bridge *br) if (be_cfg->cache_max_flows) { be_opts.cache_max_flows = *be_cfg->cache_max_flows; } + if (be_cfg->stats_interval) { + be_opts.stats_interval = *be_cfg->stats_interval; + } else { + be_opts.stats_interval = OFPROTO_IPFIX_DEFAULT_TEMPLATE_INTERVAL; + } + if (be_cfg->template_interval) { + be_opts.template_interval = *be_cfg->template_interval; + } else { + be_opts.template_interval = + OFPROTO_IPFIX_DEFAULT_TEMPLATE_INTERVAL; + } be_opts.enable_tunnel_sampling = smap_get_bool(&be_cfg->other_config, "enable-tunnel-sampling", true); @@ -1570,6 +1581,12 @@ bridge_configure_ipfix(struct bridge *br) ? *fe_cfg->ipfix->cache_active_timeout : 0; opts->cache_max_flows = fe_cfg->ipfix->cache_max_flows ? *fe_cfg->ipfix->cache_max_flows : 0; + opts->stats_interval = fe_cfg->ipfix->stats_interval + ? *fe_cfg->ipfix->stats_interval + : OFPROTO_IPFIX_DEFAULT_TEMPLATE_INTERVAL; + opts->template_interval = fe_cfg->ipfix->template_interval + ? *fe_cfg->ipfix->template_interval + : OFPROTO_IPFIX_DEFAULT_TEMPLATE_INTERVAL; opts->enable_tunnel_sampling = smap_get_bool( &fe_cfg->ipfix->other_config, "enable-tunnel-sampling", true); diff --git a/vswitchd/vswitch.ovsschema b/vswitchd/vswitch.ovsschema index 1a49cdffe..2d395ff95 100644 --- a/vswitchd/vswitch.ovsschema +++ b/vswitchd/vswitch.ovsschema @@ -1,6 +1,6 @@ {"name": "Open_vSwitch", - "version": "8.3.1", - "cksum": "3012963480 26720", + "version": "8.4.0", + "cksum": "2738838700 27127", "tables": { "Open_vSwitch": { "columns": { @@ -531,6 +531,16 @@ "minInteger": 0, "maxInteger": 4294967295}, "min": 0, "max": 1}}, + "stats_interval": { + "type": {"key": {"type": "integer", + "minInteger": 1, + "maxInteger": 3600}, + "min": 0, "max": 1}}, + "template_interval": { + "type": {"key": {"type": "integer", + "minInteger": 1, + "maxInteger": 3600}, + "min": 0, "max": 1}}, "other_config": { "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}}, diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index 05ac1fbe5..12708a313 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -6596,6 +6596,26 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \ disabled. </column> + <column name="stats_interval"> + <p> + Interval (in seconds) for sending IPFIX exporting process statistics + according to IETF RFC 5101 Section 4.3. + </p> + <p> + Default value is 600 + </p> + </column> + + <column name="template_interval"> + <p> + Interval (in seconds) for sending IPFIX Template information for each + Observation Domain ID. + </p> + <p> + Default value is 600 + </p> + </column> + <column name="other_config" key="enable-tunnel-sampling" type='{"type": "boolean"}'> <p> |