aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ip/ip.c')
-rw-r--r--src/vnet/ip/ip.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/vnet/ip/ip.c b/src/vnet/ip/ip.c
index 785cd491b57..88eff4f4d59 100644
--- a/src/vnet/ip/ip.c
+++ b/src/vnet/ip/ip.c
@@ -312,6 +312,23 @@ format_ip_dscp (u8 * s, va_list * va)
return (format (s, "unknown"));
}
+u8 *
+format_ip_ecn (u8 * s, va_list * va)
+{
+ ip_ecn_t ecn = va_arg (*va, u32); // int promotion of u8
+
+ switch (ecn)
+ {
+#define _(n,v) \
+ case IP_ECN_##v: \
+ return (format (s, "%s", #v));
+ foreach_ip_ecn
+#undef _
+ }
+
+ return (format (s, "unknown"));
+}
+
/*
* fd.io coding-style-patch-verification: ON
*