adj_index0 = vnet_buffer (b0)->ip.adj_index[VLIB_TX];
adj0 = ip_get_adjacency (lm, adj_index0);
- table_index0 = adj0->classify_table_index;
+ table_index0 = adj0->classify.table_index;
adj_index1 = vnet_buffer (b1)->ip.adj_index[VLIB_TX];
adj1 = ip_get_adjacency (lm, adj_index1);
- table_index1 = adj1->classify_table_index;
+ table_index1 = adj1->classify.table_index;
t0 = pool_elt_at_index (vcm->tables, table_index0);
adj_index0 = vnet_buffer (b0)->ip.adj_index[VLIB_TX];
adj0 = ip_get_adjacency (lm, adj_index0);
- table_index0 = adj0->classify_table_index;
+ table_index0 = adj0->classify.table_index;
t0 = pool_elt_at_index (vcm->tables, table_index0);
vnet_buffer(b0)->l2_classify.hash =
if (classify_table_index != (u32) ~0)
{
adj->lookup_next_index = IP_LOOKUP_NEXT_CLASSIFY;
- adj->classify_table_index = classify_table_index;
+ adj->classify.table_index = classify_table_index;
}
else
adj->lookup_next_index = IP_LOOKUP_NEXT_LOCAL;
if (classify_table_index != (u32) ~0)
{
adj->lookup_next_index = IP_LOOKUP_NEXT_CLASSIFY;
- adj->classify_table_index = classify_table_index;
+ adj->classify.table_index = classify_table_index;
}
else
adj->lookup_next_index = IP_LOOKUP_NEXT_LOCAL;
adj[i].rewrite_header.sw_if_index = ~0;
adj[i].explicit_fib_index = ~0;
adj[i].mcast_group_index = ~0;
- adj[i].classify_table_index = ~0;
+ adj[i].classify.table_index = ~0;
adj[i].saved_lookup_next_index = 0;
if (copy_adj)
break;
case IP_LOOKUP_NEXT_CLASSIFY:
- s = format (s, " table %d", adj->classify_table_index);
+ s = format (s, " table %d", adj->classify.table_index);
default:
break;
(void) unformat (input, "%d", &adj->if_address_index);
else if (next == IP_LOOKUP_NEXT_CLASSIFY)
{
- if (!unformat (input, "%d", &adj->classify_table_index))
+ if (!unformat (input, "%d", &adj->classify.table_index))
{
clib_warning ("classify adj must specify table index");
return 0;
i16 explicit_fib_index;
u16 mcast_group_index;
- /* When classifying, start here */
- u16 classify_table_index;
/* Highest possible perf subgraph arc interposition, e.g. for ip6 ioam */
u16 saved_lookup_next_index;
+ union {
+ /* IP_LOOKUP_NEXT_CLASSIFY only */
+ struct {
+ u16 table_index;
+ } classify;
+ };
+
STRUCT_MARK(signature_end);
/* Number of FIB entries sharing this adjacency */
memset(&adj, 0, sizeof (adj));
adj.explicit_fib_index = ~0;
adj.lookup_next_index = IP_LOOKUP_NEXT_CLASSIFY;
- adj.classify_table_index = classify_table_index;
+ adj.classify.table_index = classify_table_index;
if (!l2_only)
ip_add_adjacency (lm, &adj, 1 /* one adj */,
ip_adjacency_t cadj;
memset(&cadj, 0, sizeof(cadj));
cadj.lookup_next_index = IP_LOOKUP_NEXT_CLASSIFY;
- cadj.classify_table_index = ntohl(mp->classify_table_index);
- if (pool_is_free_index (cm->tables, cadj.classify_table_index)) {
+ cadj.classify.table_index = ntohl(mp->classify_table_index);
+ if (pool_is_free_index (cm->tables, cadj.classify.table_index)) {
dsunlock(sm);
return VNET_API_ERROR_NO_SUCH_TABLE;
}