aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fontaine <christophe.fontaine@qosmos.com>2016-11-22 14:52:57 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2016-11-22 21:10:56 +0000
commitd28bc62a726c51bcfb9b90a6dd381b4727421004 (patch)
tree8cceea0c87fb6d789622430d593859d197b8eba2
parent8817061c7337c936da2553a4881098e1646d05dc (diff)
Span node configuration fix
Prefer to use the sw_if_index instead of the hw_if_index to be compatible with vhost-user interfaces. Change-Id: Id1e4255a992d428b8de47b3dd6175ed86e08c803 Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
-rw-r--r--vnet/vnet/span/span.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vnet/vnet/span/span.c b/vnet/vnet/span/span.c
index de43af0bded..52300454427 100644
--- a/vnet/vnet/span/span.c
+++ b/vnet/vnet/span/span.c
@@ -32,11 +32,11 @@ span_add_delete_entry (vlib_main_t * vm,
vnet_sw_interface_t *sw =
vnet_get_sw_interface (sm->vnet_main, src_sw_if_index);
- vec_validate_aligned (sm->dst_by_src_sw_if_index, sw->hw_if_index,
+ vec_validate_aligned (sm->dst_by_src_sw_if_index, sw->sw_if_index,
CLIB_CACHE_LINE_BYTES);
- sm->dst_by_src_sw_if_index[sw->hw_if_index] = is_add ? dst_sw_if_index : 0;
+ sm->dst_by_src_sw_if_index[sw->sw_if_index] = is_add ? dst_sw_if_index : 0;
vnet_feature_enable_disable ("device-input", "span-input",
- sw->hw_if_index, is_add, 0, 0);
+ sw->sw_if_index, is_add, 0, 0);
return 0;
}