#include <vnet/mpls/packet.h>
#include <vnet/dpo/dpo.h>
+
+/**
+ * Maximum number of labels in one DPO
+ */
+#define MPLS_LABEL_DPO_MAX_N_LABELS 12
/**
* A representation of an MPLS label for imposition in the data-path
*/
{
/**
* The MPLS label header to impose. Outer most label first.
+ * Each DPO will occupy one cache line, stuff that many labels in.
*/
- mpls_unicast_header_t mld_hdr[8];
+ mpls_unicast_header_t mld_hdr[MPLS_LABEL_DPO_MAX_N_LABELS];
/**
* Next DPO in the graph
* Should this get any bigger then we will need to reconsider how many labels
* can be pushed in one object.
*/
-_Static_assert((sizeof(mpls_label_dpo_t) <= CLIB_CACHE_LINE_BYTES),
- "MPLS label DPO is larger than one cache line.");
+STATIC_ASSERT((sizeof(mpls_label_dpo_t) <= CLIB_CACHE_LINE_BYTES),
+ "MPLS label DPO is larger than one cache line.");
/**
* @brief Create an MPLS label object