#include <stdlib.h>
#include "../common.h"
#include "snippet_match_mpls.h"
static void
{
if (queue == NULL)
fprintf(stderr, "Failed to allocate memory for queue\n");
queue->
index = UINT16_MAX;
}
static void
{
if (mpls_item == NULL)
fprintf(stderr, "Failed to allocate memory for mpls_item\n");
pattern[5].
spec = mpls_item;
}
static struct rte_flow_pattern_template *
snippet_mpls_create_pattern_template(uint16_t port_id,
struct rte_flow_error *error)
{
};
{
},
{
},
{
},
{
},
{
},
{
.mask = &mpls_item,
},
{
},
};
.ingress = 1,
};
}
static struct rte_flow_actions_template *
snippet_mpls_create_actions_template(uint16_t port_id,
struct rte_flow_error *error)
{
};
};
{
.conf = &queue_v,
},
{
},
};
{
.conf = &queue_m,
},
{
},
};
};
}
static struct rte_flow_template_table *
snippet_mpls_create_table(uint16_t port_id,
struct rte_flow_error *error)
{
struct rte_flow_pattern_template *pt;
struct rte_flow_actions_template *at;
.priority = 0,
.ingress = 1,
},
.nb_flows = 1000,
};
pt = snippet_mpls_create_pattern_template(port_id, error);
if (pt == NULL) {
printf("Failed to create pattern template: %s (%s)\n",
return NULL;
}
at = snippet_mpls_create_actions_template(port_id, error);
if (at == NULL) {
printf("Failed to create actions template: %s (%s)\n",
return NULL;
}
}