[PATCH] net: add special-purpose MPLS label values
Morten Brørup
mb at smartsharesystems.com
Tue Nov 10 11:39:52 CET 2026
Added definitions of Special-Purpose MPLS Label Values,
with reference to IANA registry.
Signed-off-by: Morten Brørup <mb at smartsharesystems.com>
---
lib/net/rte_mpls.h | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/lib/net/rte_mpls.h b/lib/net/rte_mpls.h
index 53614a0b88..39c69e1ea9 100644
--- a/lib/net/rte_mpls.h
+++ b/lib/net/rte_mpls.h
@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2016 6WIND S.A.
+ * Copyright(c) 2026 SmartShare Systems
*/
#ifndef _RTE_MPLS_H_
@@ -14,6 +15,24 @@
#include <stdint.h>
#include <rte_byteorder.h>
+/*
+ * Special-Purpose MPLS Label Values
+ * https://www.iana.org/assignments/mpls-label-values
+ */
+#define RTE_MPLS_LABEL_IPV4 0 /**< IPv4 Explicit NULL Label (RFC 3032). */
+#define RTE_MPLS_LABEL_ROUTER_ALERT 1 /**< Router Alert Label (RFC 3032). */
+#define RTE_MPLS_LABEL_IPV6 2 /**< IPv6 Explicit NULL Label (RFC 3032). */
+#define RTE_MPLS_LABEL_NULL 3 /**< Implicit NULL Label (RFC 3032). */
+#define RTE_MPLS_LABEL_MNA 4 /**< MPLS Network Actions (RFC 9994). */
+#define RTE_MPLS_LABEL_ELI 7 /**< Entropy Label Indicator (ELI) (RFC 6790). */
+#define RTE_MPLS_LABEL_GAL 13 /**< Generic Associated Channel Label (GAL) (RFC 5586). */
+#define RTE_MPLS_LABEL_OAM_ALERT 14 /**< OAM Alert Label (RFC 3429). */
+#define RTE_MPLS_LABEL_XL 15 /**< Extension Label (XL) (RFC 7274; RFC 9017). */
+/* Extended Special-Purpose MPLS Label Values (valid when following an Extension Label) */
+#define RTE_MPLS_LABEL_MLI 16 /**< Metadata Label Indicator (MLI) (RFC 8595). */
+#define RTE_MPLS_LABEL_MPI 17 /**< Metadata Present Indicator (MPI) (RFC 8595). */
+#define RTE_MPLS_LABEL_FLI 18 /**< Flow-ID Label Indicator (FLI) (RFC 9714). */
+
/**
* MPLS header.
*/
--
2.43.0
More information about the dev
mailing list