summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/dpdk.h
diff options
context:
space:
mode:
authorGeorgy Borodin <bor1-go@yandex-team.ru>2024-02-28 17:04:44 +0100
committerDamjan Marion <dmarion@0xa5.net>2024-03-05 18:53:01 +0000
commit904459ff32ffce73b97dd3cb40f0b367a6b558f9 (patch)
tree5151e6190448302f553b27fb01df654ac7926edc /src/plugins/dpdk/device/dpdk.h
parent29e916a07c31d63ed6935354b99f16743842fdc6 (diff)
dpdk: correct waiting times
When link state interval is 3 and stats interval is 10, updates for stats will be made every 12 seconds (next number after 10, that divisible by 3). And if you get counters every 30 secs, you will get ideal "saw"-line instead of real smooth chart. This commit makes smooth line on stats intervals that are divisors of the charts update interval (regardless of link state interval), and makes it possible to configure them. Type: fix Fixes: cb9cadad578297ffd78fa8a33670bdf1ab669e7e Change-Id: Ia4350467be2b0ec0c1be37c7fda63f43b3330f44 Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
Diffstat (limited to 'src/plugins/dpdk/device/dpdk.h')
-rw-r--r--src/plugins/dpdk/device/dpdk.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h
index 28647913d1c..c22a67a07e7 100644
--- a/src/plugins/dpdk/device/dpdk.h
+++ b/src/plugins/dpdk/device/dpdk.h
@@ -222,11 +222,13 @@ typedef struct
dpdk_port_conf_t conf;
} dpdk_device_t;
+#define DPDK_MIN_POLL_INTERVAL (0.001) /* 1msec */
+
#define DPDK_STATS_POLL_INTERVAL (10.0)
-#define DPDK_MIN_STATS_POLL_INTERVAL (0.001) /* 1msec */
+#define DPDK_MIN_STATS_POLL_INTERVAL DPDK_MIN_POLL_INTERVAL
#define DPDK_LINK_POLL_INTERVAL (3.0)
-#define DPDK_MIN_LINK_POLL_INTERVAL (0.001) /* 1msec */
+#define DPDK_MIN_LINK_POLL_INTERVAL DPDK_MIN_POLL_INTERVAL
#define foreach_dpdk_device_config_item \
_ (num_rx_queues) \