summaryrefslogtreecommitdiff
path: root/lib/if.h
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2022-10-19 14:34:43 +0200
committerLouis Scalbert <louis.scalbert@6wind.com>2022-10-27 18:15:12 +0200
commitd5a313e074efeb19f7ed173bb6f6cc275ef2d783 (patch)
treeb1225eacf46b783f289d7a3a249c7aab20d11354 /lib/if.h
parentc3a02dde41f419a540f17a3521eb87310e5a88b9 (diff)
lib: fix the default TE bandwidth
When enabling the interface link-params, a default bandwidth is assigned to the Max, Reservable and Unreserved Bandwidth variables. If the bandwidth is set at in the interface context, this value is used. Otherwise, a default bandwidth value of 10 Gbps is set. Revert the default value to 10 Mbps as it was intended in the initial commit. 10 Mbps is a low value so that the link will not be prioritized when computing the paths. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'lib/if.h')
-rw-r--r--lib/if.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/if.h b/lib/if.h
index 478a90d63a..91dcd46247 100644
--- a/lib/if.h
+++ b/lib/if.h
@@ -143,9 +143,13 @@ struct if_stats {
#define TE_EXT_MASK 0x0FFFFFFF
#define TE_EXT_ANORMAL 0x80000000
#define LOSS_PRECISION 0.000003
+/* TE_MEGA_BIT and TE_BYTE are utilized to convert TE bandwidth */
#define TE_MEGA_BIT 1000000
#define TE_BYTE 8
-#define DEFAULT_BANDWIDTH 10000
+/* Default TE bandwidth when no value in config.
+ * The value is in Mbps (will be multiplied by TE_BYTE)
+ */
+#define DEFAULT_BANDWIDTH 10
#define MAX_CLASS_TYPE 8
#define MAX_PKT_LOSS 50.331642