uword indent = format_get_indent (s);
adj = ip_get_adjacency (&im->lookup_main, t->adj_index);
- s = format (s, "fib: %d adjacency: %U flow hash: 0x%08x",
- t->fib_index, format_ip_adjacency,
+ s = format (s, "fib %d adj-idx %d : %U flow hash: 0x%08x",
+ t->fib_index, t->adj_index, format_ip_adjacency,
vnm, &im->lookup_main, t->adj_index, t->flow_hash);
switch (adj->lookup_next_index)
{
/* Adjacency taken. */
u32 adj_index;
u32 flow_hash;
+ u32 fib_index;
/* Packet data, possibly *after* rewrite. */
u8 packet_data[64 - 1*sizeof(u32)];
uword indent = format_get_indent (s);
adj = ip_get_adjacency (&im->lookup_main, t->adj_index);
- s = format (s, "adjacency: %U flow hash: 0x%08x",
- format_ip_adjacency,
+ s = format (s, "fib %d adj-idx %d : %U flow hash: 0x%08x",
+ t->fib_index, t->adj_index, format_ip_adjacency,
vnm, &im->lookup_main, t->adj_index, t->flow_hash);
switch (adj->lookup_next_index)
{
vlib_rx_or_tx_t which_adj_index)
{
u32 * from, n_left;
+ ip6_main_t * im = &ip6_main;
n_left = frame->n_vectors;
from = vlib_frame_vector_args (frame);
t0 = vlib_add_trace (vm, node, b0, sizeof (t0[0]));
t0->adj_index = vnet_buffer (b0)->ip.adj_index[which_adj_index];
t0->flow_hash = vnet_buffer (b0)->ip.flow_hash;
+ t0->fib_index = vec_elt (im->fib_index_by_sw_if_index,
+ vnet_buffer(b0)->sw_if_index[VLIB_RX]);
memcpy (t0->packet_data,
vlib_buffer_get_current (b0),
sizeof (t0->packet_data));
t1 = vlib_add_trace (vm, node, b1, sizeof (t1[0]));
t1->adj_index = vnet_buffer (b1)->ip.adj_index[which_adj_index];
t1->flow_hash = vnet_buffer (b1)->ip.flow_hash;
+ t1->fib_index = vec_elt (im->fib_index_by_sw_if_index,
+ vnet_buffer(b1)->sw_if_index[VLIB_RX]);
memcpy (t1->packet_data,
vlib_buffer_get_current (b1),
sizeof (t1->packet_data));
t0 = vlib_add_trace (vm, node, b0, sizeof (t0[0]));
t0->adj_index = vnet_buffer (b0)->ip.adj_index[which_adj_index];
t0->flow_hash = vnet_buffer (b0)->ip.flow_hash;
+ t0->fib_index = vec_elt (im->fib_index_by_sw_if_index,
+ vnet_buffer(b0)->sw_if_index[VLIB_RX]);
memcpy (t0->packet_data,
vlib_buffer_get_current (b0),
sizeof (t0->packet_data));
/* Reset to look up tunnel partner in the configured FIB */
vnet_buffer(b0)->sw_if_index[VLIB_TX] = t0->encap_fib_index;
vnet_buffer(b1)->sw_if_index[VLIB_TX] = t1->encap_fib_index;
+ vnet_buffer(b0)->sw_if_index[VLIB_RX] = sw_if_index0;
+ vnet_buffer(b1)->sw_if_index[VLIB_RX] = sw_if_index1;
pkts_encapsulated += 2;
len0 = vlib_buffer_length_in_chain (vm, b0);
/* Reset to look up tunnel partner in the configured FIB */
vnet_buffer(b0)->sw_if_index[VLIB_TX] = t0->encap_fib_index;
+ vnet_buffer(b0)->sw_if_index[VLIB_RX] = sw_if_index0;
pkts_encapsulated ++;
len0 = vlib_buffer_length_in_chain (vm, b0);
vxlan_main_t * vxm = &vxlan_main;
vxlan_tunnel_t *t = 0;
vnet_main_t * vnm = vxm->vnet_main;
+ ip4_main_t * im4 = &ip4_main;
vnet_hw_interface_t * hi;
uword * p;
u32 hw_if_index = ~0;
}
vnet_sw_interface_set_flags (vnm, sw_if_index,
VNET_SW_INTERFACE_FLAG_ADMIN_UP);
+ vec_validate (im4->fib_index_by_sw_if_index, sw_if_index);
+ im4->fib_index_by_sw_if_index[sw_if_index] = t->encap_fib_index;
}
else
{