diff options
author | Eelco Chaudron <echaudro@redhat.com> | 2023-03-08 13:55:44 +0100 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2023-03-15 21:22:22 +0100 |
commit | 29720e378e96b27bc250aac9b287a67e023650fd (patch) | |
tree | 7e24547ac2ee0b42fba83c7384272b72fea9f0b8 /vswitchd | |
parent | 51778134d4c8a84801230b1e5a7d59e180d9e8b5 (diff) | |
download | openvswitch-29720e378e96b27bc250aac9b287a67e023650fd.tar.gz |
ofproto-dpif-upcall: Wait for valid hw flow stats before applying min-revalidate-pps.
Depending on the driver implementation, it can take from 0.2 seconds
up to 2 seconds before offloaded flow statistics are updated. This is
true for both TC and rte_flow-based offloading. This is causing a
problem with min-revalidate-pps, as old statistic values are used
during this period.
This fix will wait for at least 2 seconds, by default, before assuming no
packets where received during this period.
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'vswitchd')
-rw-r--r-- | vswitchd/bridge.c | 3 | ||||
-rw-r--r-- | vswitchd/vswitch.xml | 13 |
2 files changed, 16 insertions, 0 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 307a51527..f5dc59ad0 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -832,6 +832,9 @@ bridge_reconfigure(const struct ovsrec_open_vswitch *ovs_cfg) ofproto_set_min_revalidate_pps( smap_get_uint(&ovs_cfg->other_config, "min-revalidate-pps", OFPROTO_MIN_REVALIDATE_PPS_DEFAULT)); + ofproto_set_offloaded_stats_delay( + smap_get_uint(&ovs_cfg->other_config, "offloaded-stats-delay", + OFPROTO_OFFLOADED_STATS_DELAY)); ofproto_set_vlan_limit(smap_get_int(&ovs_cfg->other_config, "vlan-limit", LEGACY_MAX_VLAN_HEADERS)); ofproto_set_bundle_idle_timeout(smap_get_uint(&ovs_cfg->other_config, diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index 12708a313..3e94b969c 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -216,6 +216,19 @@ </p> </column> + <column name="other_config" key="offloaded-stats-delay" + type='{"type": "integer", "minInteger": 0}'> + <p> + Set worst case delay (in ms) it might take before statistics of + offloaded flows are updated. Offloaded flows younger than this + delay will always be revalidated regardless of + <ref column="other_config" key="min-revalidate-pps"/>. + </p> + <p> + The default is 2000. + </p> + </column> + <column name="other_config" key="hw-offload" type='{"type": "boolean"}'> <p> |