diff options
author | 2016-09-09 16:18:43 +0200 | |
---|---|---|
committer | 2016-09-27 22:35:10 +0000 | |
commit | e162bc3884680b0b477b4b958eed246fcb938654 (patch) | |
tree | 37afe34654764556f3bc93130ec6afd7da17fec9 /vnet | |
parent | 62f88d881306a1f628e3a25d3e3b00b8acf7ec5e (diff) |
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 <christophe.fontaine@qosmos.com>
Diffstat (limited to 'vnet')
-rw-r--r-- | vnet/vnet/l2/l2_output_classify.c | 12 |
1 files changed, 6 insertions, 6 deletions
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: - * - <code>(l2_input_classify_runtime_t *) + * - <code>(l2_output_classify_runtime_t *) * rt->classify_table_index_by_sw_if_index</code> * 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. - * - <code>vnet_buffer(b)->sw_if_index[VLIB_RX]</code> + * - <code>vnet_buffer(b)->sw_if_index[VLIB_TX]</code> * - Indicates the @c sw_if_index value of the interface that the * packet was received on. * - <code>vnet_buffer (b0)->l2.feature_bitmap</code> @@ -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; |