From e162bc3884680b0b477b4b958eed246fcb938654 Mon Sep 17 00:00:00 2001 From: Christophe Fontaine Date: Fri, 9 Sep 2016 16:18:43 +0200 Subject: classify: fix issue with output classify node using wrong sw_if_index Output classify node should use sw_if_index[VLIB_TX] Like in l2_output.c, we have to use sw_if_index[VLIB_TX] to get the appropriate configuration. Change-Id: I96b1a03ddf5c9e9c45fa3f5df3ea88895ed4345e Signed-off-by: Christophe Fontaine --- vnet/vnet/l2/l2_output_classify.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'vnet') diff --git a/vnet/vnet/l2/l2_output_classify.c b/vnet/vnet/l2/l2_output_classify.c index e5c7bd18..27d5eb39 100644 --- a/vnet/vnet/l2/l2_output_classify.c +++ b/vnet/vnet/l2/l2_output_classify.c @@ -97,12 +97,12 @@ static char *l2_output_classify_error_strings[] = { * @par Graph mechanics: buffer metadata, next index usage * * @em Uses: - * - (l2_input_classify_runtime_t *) + * - (l2_output_classify_runtime_t *) * rt->classify_table_index_by_sw_if_index * Head of the per-interface, perprotocol classifier table chain * for a specific interface. ~0 => send pkts to the next * feature in the L2 feature chain. - * - vnet_buffer(b)->sw_if_index[VLIB_RX] + * - vnet_buffer(b)->sw_if_index[VLIB_TX] * - Indicates the @c sw_if_index value of the interface that the * packet was received on. * - vnet_buffer (b0)->l2.feature_bitmap @@ -197,10 +197,10 @@ l2_output_classify_node_fn (vlib_main_t * vm, b1 = vlib_get_buffer (vm, bi1); h1 = vlib_buffer_get_current (b1); - sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX]; + sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_TX]; vnet_buffer (b0)->l2_classify.table_index = ~0; - sw_if_index1 = vnet_buffer (b1)->sw_if_index[VLIB_RX]; + sw_if_index1 = vnet_buffer (b1)->sw_if_index[VLIB_TX]; vnet_buffer (b1)->l2_classify.table_index = ~0; /* Select classifier table based on ethertype */ @@ -264,7 +264,7 @@ l2_output_classify_node_fn (vlib_main_t * vm, b0 = vlib_get_buffer (vm, bi0); h0 = vlib_buffer_get_current (b0); - sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX]; + sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_TX]; vnet_buffer (b0)->l2_classify.table_index = ~0; /* Select classifier table based on ethertype */ @@ -425,7 +425,7 @@ l2_output_classify_node_fn (vlib_main_t * vm, { l2_output_classify_trace_t *t = vlib_add_trace (vm, node, b0, sizeof (*t)); - t->sw_if_index = vnet_buffer (b0)->sw_if_index[VLIB_RX]; + t->sw_if_index = vnet_buffer (b0)->sw_if_index[VLIB_TX]; t->table_index = table_index0; t->next_index = next0; t->session_offset = e0 ? vnet_classify_get_offset (t0, e0) : 0; -- cgit 1.2.3-korg